in reply to regexp wizardry needed
Perhaps the following will be helpful:
use strict; use warnings; my $lines2 = " PERIOD 13 OCT 06 OCT"; my @date = map ucfirst lc, split ' ', $lines2; print "$date[2] $date[3] and $date[2] $date[1]";
Output:
Oct 06 and Oct 13
Update: Removed an unnecessary map. Thanks, johngg!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: regexp wizardry needed
by johngg (Canon) on Jan 25, 2013 at 23:24 UTC | |
by Kenosis (Priest) on Jan 26, 2013 at 00:44 UTC |
In Section
Seekers of Perl Wisdom