in reply to Split a Line

To expand a little upon the unpack function (from Perl Best Practices)
use Readonly; Readonly my $FIELD_LAYOUT => 'A10 A20 A10'; # 10 ASCII characters, 20 +ASCII characters, 10 ASCII characters; foreach my $line (@file) { my ($program, $junk, $date) = unpack $FIELD_LAYOUT, $line; print "Program: $program\n"; print "Date: $date\n"; }

I found this code layout a bit easier to understand but it is still basically the same as what japhy Re: Split a Line posted.