in reply to storing grep output to variable
You are mixing Perl and a utility program in an odd way. Your example looks like it's trying to feed grep a slurp, and you want the file name, not the file contents. Either try:
Or try applying a regular expression to the contents of the file using only Perl.my $output = `/usr/bin/grep "$prop" /path/to/file`;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: storing grep output to variable
by Anonymous Monk on Jun 08, 2004 at 16:02 UTC | |
by pbeckingham (Parson) on Jun 08, 2004 at 19:05 UTC |