http://www.perlmonks.org?node_id=1015426


in reply to Re: regexp wizardry needed
in thread regexp wizardry needed

my @date = map ucfirst, map lc, split ' ', $lines2;

I'm not sure why you are going with two maps, one would be sufficient.

$ perl -E ' > $line = q{PERIOD 13 OCT 06 OCT}; > say for map ucfirst lc, split q{ }, $line;' Period 13 Oct 06 Oct $

I hope this is of interest.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^3: regexp wizardry needed
by Kenosis (Priest) on Jan 26, 2013 at 00:44 UTC

    I'm not sure why you are going with two maps...

    I didn't think of it, so this is certainly of interest. Greatly appreciate you sharing this, JohnGG!