From:                   "Chas. Owens" <[EMAIL PROTECTED]>
> On Fri, May 2, 2008 at 10:44 AM, rubinsta <[EMAIL PROTECTED]> wrote:
> snip
> > Any thoughts as to why
> >  some of the matches are getting missed?
> snip
> 
> Not off hand.  I will extract your code and do some tests.  Can you
> send me your data or is it sensitive?
> 
> snip
> >  Just out of beginner curiosity, why did you suggest I use the 3
> >  argument filehandle instead of:
> >  open(EX, "exclude1.txt") or die $!
> snip
> 
> Because the three argument version of open is safer.  It doesn't
> matter in the code you wrote because you used a literal string, but if
> you say
> 
> open FH, $file or die "could not open $file: $!";
> 
> expecting FH to be a read filehandle and $file contains the filename
> ">important", you will wind up with a write filehandle.

And that means you were lucky. If the $file contained something like 
"|rm -rf /" or "rm -rf / |" ...

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to