Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^3: Array of arrays

by Monk::Thomas (Friar)
on Jul 19, 2013 at 08:07 UTC ( #1045288=note: print w/replies, xml ) Need Help??

in reply to Re^2: Array of arrays
in thread Array of arrays

(Copy&Paste error in your 'sub secondRoutine'? You define $array1_ref, $array2_ref, $array3_ref but use $$array1[0])
sub secondRoutine { # there's nothing wrong here, but $aref (and $href) are shorter and # convey the same meaning #my ($array1_ref, $array2_ref, $array3_ref) = @_; my ($aref1, $aref2, $aref3) = @_; # - use references directly # - added newlines for clearer output # - brackets are unnecessary (just a style choice, no actual impact) #print ("Test first value in array1: $$array1[0]"); #print ("Test third value in array2: $$array2[2]"); #print ("Test fifth value in array3: $$array3[4]"); print "Test first value in array1: ", $aref1->[0], "\n"; print "Test third value in array2: ", $aref2->[2], "\n"; print "Test fifth value in array3: ", $aref3->[4], "\n"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045288]
[Discipulus]: better to ask a full SOPW
erix self-flagellates with the cluebat
[erix]: indeed had to be( time make check-world ) > test_run2.output 2>&1
[erix]: probably misremembered because of 2>&1 |
[erix]: oh nice, can do |& nowadays. Learned something new after all
LanX flagelates erix with a signed markov chain

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-03-23 08:53 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.