in reply to How do i get the variables to actually get in here....
I didn't complete the regex ... that's left as an exercise for the reader. :-)my @colNames = qw(name status class major po phone advisor email); while (<>) { chomp; my %hash; @hash(@colNames) = /^(\w+, \w+ (?:\w+)?)\s*(\w+)\s* .../; print "$hash{name}\n"; print OUTPUT "$hash{name}\n"; } close OUTPUT || die "Cannot close OUTPUT: $!\n";
Update: Fixed while (defined <>) as per wog's comment.
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|