Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^4: array refernce as hash value

by Crian (Chaplain)
on Jul 22, 2009 at 10:41 UTC ( #782243=note: print w/replies, xml ) Need Help??

in reply to Re^3: array refernce as hash value
in thread array refernce as hash value

And what is youre problem with this?

#!/usr/bin/perl use strict; use warnings; my %hash_merge; while (<DATA>) { chomp; my ($key, $value) = split /\|/, $_; push @{$hash_merge{$key}}, $value; print "key for $key merge values: ", $hash_merge{$key}->[0], "\n"; } use Data::Dumper; print Dumper \%hash_merge; __DATA__ 9344220001|sei10720013,21/07/2009-00-00-00,23/07/2009-12-34-44 9344220001|sei10720014,23/07/2009-20-00-23
key for 9344220001 merge values: sei10720013,21/07/2009-00-00-00,23/07 +/2009-12-34-44 key for 9344220001 merge values: sei10720013,21/07/2009-00-00-00,23/07 +/2009-12-34-44 $VAR1 = { '9344220001' => [ 'sei10720013,21/07/2009-00-00-00,23/07/200 +9-12-34-44', 'sei10720014,23/07/2009-20-00-23' ] };

Is this, what you want, or is it not, what you want? In the latter case, what exactly do you want to have as result?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://782243]
[LanX]: Network (1976 film) yeah
[LanX]: yeah, we just had a discussion at work that SciFi in the 70s had more inovation
[LanX]: (movies)
[Your Mother]: Real ideas. Ideas grounded in reality as well.
[LanX]: still some good newer ones. Oblivion had a great design, Moon was well acted
[Your Mother]: Moon was mind bending and lovely and what's his nose Sam is *always* fun.
[LanX]: the new BS Galactica series is my all time SoapFiction favourite ...
[Your Mother]: I even liked "The Arrival" and I generally hate time travel (oriented) stuff.
[Your Mother]: Gotta go. Stay out of trouble.
[LanX]: no worries ... mainland Europe is safe ;-P

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2018-03-19 15:10 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.