But just in case the assumption above is wrong, assign $2 to a named var ($second maybe) and remove spaces:
$second =~ s/\s*//g; ... say "C/D/E/F - $second"; ...
BUT that's not really the point of this post; rather (perhaps because /me is suffering brain-freeze, why the heck is the second capture ((.*\S)) a-greedy-anything followed by anything-not-whitespace working?
And in case my brain-freeze isn't clear, that chill is telling me that s+(.*\S)\s+(\S+) should capture the location-field and everything else up to the last space, before "HA". That's obviously wrong, but why?
Can someone, please, provide a the meat for a slap my forehead, grunt "Duh!" moment?
|Replies are listed 'Best First'.|
Re^3: How to substitute something from only between two specified charecters (sub_question)
by wind (Priest) on Jun 29, 2011 at 19:37 UTC