Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Join files using perl

by linseyr (Acolyte)
on Jan 11, 2013 at 19:46 UTC ( #1012965=note: print w/replies, xml ) Need Help??


in reply to Re^2: Join files using perl
in thread Join files using perl

Oh and both files contain more columns, that was my main problem. How do I assign an array as values in an hash?

Replies are listed 'Best First'.
Re^4: Join files using perl
by linseyr (Acolyte) on Jan 11, 2013 at 19:51 UTC
    I tried this:
    foreach $line (@FILE1){ chomp($line); my($ID, @values) = split("\t", $line); $aref = \@values; $common1{$ID} = $aref; } print $common1{"B01_05_121214_LAP_G1_87_20593"};
    But the output is: ARRAY(0x7f8f4b82d310)
      $aref is a reference, not the value you're looking for. You need to dereference to get the value, e.g., useful output. See ?node_id=3989;BIT=dereference, a quik'n'dirty list of links found with Super Search, which along with other search functions, can be very helpful, as long as you have the terminology to ask for relevant nodes).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012965]
help
Chatterbox?
[marto]: fun, in 2008 we (I) build a pilot system for $client, an in house youtube, they've asked me to do it again
[choroba]: again a pilot?
[marto]: yeah, the whole infrastructure has changed, and video codecs have moved on a great deal
[Corion]: marto: Redoing something on new infrastructure sounds fun. At least you can reuse your previous experience :)

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-07-28 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (425 votes). Check out past polls.