in reply to Better way to get the results of grep()?
Note that using the 'o' modifier on the regular expression does not offer a benefit in this instance. It is only useful when the regular expression would be re-evaluated on each execution (as when it includes a variable).($curFrom) = grep(/^From:/, @header); ($curSubject) = grep(/^Subject:/, @header);
|
|---|