On Wed, Mar 2, 2011 at 3:37 PM, Uri Guttman <[email protected]> wrote:
> >>>>> "M" == Matt <[email protected]> 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/ ; } ???
