in reply to regular expressions query
Let us assume that this string is in $_
($meanH1, $meanH2) = /^\s{9}(.*?)\s{10}(.*?)$/; # Or you may be able to generalize it a bit more with: ($meanH1, $meanH2) = /^\s*(.*?)\s*(.*?)\s*$/; # Or, if the second option is true, you could event use: ($meanH1, $meanH2) = split; # Which is a short hand version for ($meanH1, $meanH2) = split /\s+/, $_;
All of the above are rather basic examples of regex and are well documented in perlre (perldoc or perldoc.com)
Ted
|
|---|