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`;
In reply to Re: storing grep output to variable
by pbeckingham
in thread storing grep output to variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |