in reply to Perl Matching Question
if the result is empty, then the file does not contain the patterns you are looking for. Otherwise, it will return non-empty. The -q option will short circuit the grep so that grep will quit after the first match, this will improve the performance of grep.$result = `/usr/xpg4/bin/grep -e PASS -e sweeps -e Final -q $filename` +;
|
|---|