in reply to Re^2: Need to count the number of entries in a array
in thread Need to count the number of entries in a array
my ($title, $image, $counter...,@inventory) = map{chomp}<THEFILE>
Ok, I made a simple mistake, and one that is common: map{chomp} should be map{chomp; $_} The return from map is the last statement, here $_ is chomped and that result, the chomped version of $_ should be the last statement.
Thanks for pointing this out!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Need to count the number of entries in a array
by chromatic (Archbishop) on Jan 16, 2012 at 07:59 UTC | |
|
Re^4: Need to count the number of entries in a array
by Anonymous Monk on Jan 16, 2012 at 07:56 UTC | |
by Marshall (Canon) on Jan 16, 2012 at 09:51 UTC |