On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman <u...@stemsystems.com> wrote:
> >>>>> "M" == Matt <lm7...@gmail.com> writes: > > 2 lines will do it: > > use File::Slurp ; > > unless( read_file( $file ) =~ /$whatever/ ) { > > # do something > } > > > what's better about File::Slurp than just doing: my( $file, $string ) = @argv; open my $fh, '<', $file; while( <$fh> ) { print "found" if /$string/ ; } ???