Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Passing a reference from a subroutine.

by toolic (Bishop)
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 ] ];

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007788]
[dazz]: Hi I have grabbed an image from an IP camera with Image::Grab. I then want to pass that image object to a subroutine where I do a read-only test on the image with Image:Magick.
[dazz]: How do I pass an image object to a subroutine and then apply a Image::Magick a read-only method to the image object???

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-03-27 07:35 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.