update: see also perlretut and perlre, perlvar (for the $/ variable) and perlfaq7 and perlsub (for info on local() )sub check_and_insert_into_database { my $filename = shift; open my $handle,"<",$filename or die "Can't open $filename: $!"; local $/; # read whole file instead of line-by-line my $contents = <$handle>; return if ($contents =~ /CLEAR/); # insert $contents into database }
In reply to Re: Filter File that have certain word
by Joost
in thread Filter File that have certain word
by phimtau123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |