Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use warnings; use strict; my %data = (); my $string = 'flinstones,fred,barney,willma,betty'; my @tmp = split(/\s*,\s*/, $string); my $key = shift @tmp; push @{$data{$key}}, [@tmp]; use Data::Dumper; print Dumper(%data);
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printing data structure
by ikegami (Patriarch) on Jan 08, 2007 at 19:49 UTC | |
by Anonymous Monk on Jan 08, 2007 at 19:54 UTC | |
by ikegami (Patriarch) on Jan 08, 2007 at 19:56 UTC | |
by Anonymous Monk on Jan 08, 2007 at 20:15 UTC | |
by ikegami (Patriarch) on Jan 08, 2007 at 20:19 UTC | |
by Anonymous Monk on Jan 08, 2007 at 20:03 UTC | |
|
Re: printing data structure
by planetscape (Chancellor) on Jan 09, 2007 at 08:56 UTC | |
|
Re: printing data structure
by siva kumar (Pilgrim) on Jan 09, 2007 at 07:29 UTC |