in reply to Re^2: Having an Issue updating hash of hashes
in thread Having an Issue updating hash of hashes
It could be done in an even shorter way (one single instruction), but I do not think this would be a good idea, because it would become somewhat more difficult to understand and to maintain. Whereas I think the above remains fairly clear and quite easy to understand and to maintain. Using a regex could also do the job, but I doubt it could be clearer or simpler than the above.while (my $row = <LIST> ) { my ($id, $first, $last, $age) = (split /[\s=]/, $row)[1, 3, +5, 7]; push @people, { 'id' => "$id", 'first' => "$first", 'last' => "$last", 'age' => "$age" }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Having an Issue updating hash of hashes
by AnomalousMonk (Archbishop) on Jul 06, 2014 at 00:24 UTC | |
by boftx (Deacon) on Jul 06, 2014 at 01:17 UTC | |
by Laurent_R (Canon) on Jul 06, 2014 at 08:11 UTC | |
|
Re^4: Having an Issue updating hash of hashes
by perlguyjoe (Novice) on Jul 06, 2014 at 19:48 UTC | |
by Laurent_R (Canon) on Jul 06, 2014 at 20:44 UTC |