Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Passing a reference from a subroutine.

by toolic (Chancellor)
on Dec 07, 2012 at 16:42 UTC ( #1007788=note: print w/ replies, xml ) Need Help??


in reply to Passing a reference from a subroutine.

This works:

use warnings; use strict; use Data::Dumper; sub get_data { my @AoA; @AoA = ( [(1, 2)], [(3, 4)], ); #print Dumper(\@AoA); return \@AoA; } my $alldata = get_data(); print Dumper($alldata); __END__ $VAR1 = [ [ 1, 2 ], [ 3, 4 ] ];


Comment on Re: Passing a reference from a subroutine.
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-09-22 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (205 votes), past polls