use strict; use warnings; my @mon = qw (January Feburary March April May June July August Septe +mber October November December); my @date = (); while ( <DATA> ) { chomp; if ( /^\D/ ) { print "$mon[$date[0]-1]-$date[1]-$date[2]\n" if @date; @date = (); print "certification is $_ on "; next; } unless ( /^\d\|/ ) { push @date, $_; } } print "$mon[$date[0]-1]-$date[1]-$date[2]\n"; __DATA__ Advanced Water Safety Course 1 21 2004 1|2004 Emergecy Vehile Operator Course 4 21 2004 4|2004
certification is Advanced Water Safety Course on January-21-2004 certification is Emergecy Vehile Operator Course on April-21-2004
In reply to Re: Two loops
by holli
in thread Two loops
by loop362
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |