[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [Fun With Perl] Idiom misuse (typos can getcha)



> >     open(FH, ">$file") or die;
> > 
> > 
> > # oops; that ran awfully fast ;^)
> 
> AHA!  A perl analog to the "rm -r * ~" Unix gotcha...
>                                    ^ whoops on that space...

The mistake, rather, was in matching the name with /.+/. It's utterly
wrong, of course. I would just say $_ eq '.' or $_ eq '..'.

--
Tushar Samant
~
~
:wq


==== Want to unsubscribe from this list? (Don't you love us anymore?)
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org