|
|
| Just another Perl shrine | |
| PerlMonks |
Re^3: Replace Array Elements with Hash Valuesby Cristoforo (Chaplain) |
| on Jun 13, 2012 at 18:19 UTC ( #976041=note: print w/ replies, xml ) | Need Help?? |
|
Just an observation. List::MoreUtils has a function apply which does the chomp and passes the modified, (line less the newline), line to @data my @data= apply {chomp} <$fh>;. Chris Update: Or more simply, chomp(my @data = <$fh>);
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||