[Mon, Nov 08, 1999 at 04:49:01PM +0100] Roland Giersig: > Matthew Bafford wrote: > > 6) Using regular expressions needlessly: > > > > $_ = <INDEXFILE>; > > if ($_ =~ /(.+)/){$_ = $1;} > > else {die "Bad data in index $_[0].";} > > > > Why not just: > > > > chomp($_ = <INDEXFILE>); > > die "Bad data in index $_[0]." unless length; > > It doesn't untaint `$_' like the original version does. > Don't know if it matters in this case, could be just > a case of copy-n-paste-w/o-thinking from perlsec manpage. > But it definitely isn't exactly the same. Having never used Taint before, this didn't even enter my mind. Thanks, > -- Roland --Matthew ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe