jamen has asked for the wisdom of the Perl Monks concerning the following question:
I have tried multiple other solutions with no luck. I am a newbie, trying to learn perl on my own so I apologize if this is a dumb question. Any thoughts or info is greatly appreciated... Thanks, Benmy @calarray; #puts data to @calarray like I want it to while (<OUTFILE>) { push (@calarray, $_); } my $key = ""; my $value = ""; #This is what I'm having trouble with. %sorting = map { my ($key, $value1) = split ";"; $key => $value } @calarray; print "$key, $value";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to assign a hash from an array?
by guha (Priest) on Mar 10, 2002 at 18:57 UTC | |
|
Re: How to assign a hash from an array?
by seattlejohn (Deacon) on Mar 10, 2002 at 19:23 UTC | |
|
Re: How to assign a hash from an array?
by particle (Vicar) on Mar 10, 2002 at 20:07 UTC | |
|
(jeffa) Re: How to assign a hash from an array?
by jeffa (Bishop) on Mar 10, 2002 at 20:08 UTC | |
by guha (Priest) on Mar 11, 2002 at 08:53 UTC | |
by jeffa (Bishop) on Mar 11, 2002 at 15:08 UTC | |
|
Re: How to assign a hash from an array?
by Juerd (Abbot) on Mar 10, 2002 at 18:36 UTC |