dilip_val has asked for the wisdom of the Perl Monks concerning the following question:
&find_pattern($dir1); sub find_pattern { my $file3="/etc/filesystems"; my $pattern = $_; my $result = `grep $pattern $file3`; if ($result) { print "Entry for $pattern is updated in $file3/n!"; } else { print "Entry for $pattern not found in $file3/n!"; } return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: subroutine to search a pattern in a file
by Anonymous Monk on Apr 12, 2010 at 10:29 UTC | |
|
Re: subroutine to search a pattern in a file
by tospo (Hermit) on Apr 12, 2010 at 12:38 UTC | |
|
Re: subroutine to search a pattern in a file
by Marshall (Canon) on Apr 13, 2010 at 05:24 UTC |