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

Re: Pass local array by reference?

by Coruscate (Sexton)
on Jan 21, 2003 at 21:30 UTC ( [id://228852]=note: print w/replies, xml ) Need Help??


in reply to Pass local array by reference?

Maybe something like the following can help you... Untested:

#!/usr/bin/perl -w use strict; sub foo { my $array = shift; print join(",", @{$array}), "\n"; } sub bar { my $array = shift; return reverse @{$array}; } my @array = ('foo', 'bar', 'qux'); my @bar = bar( \@array ); foo( \@bar );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-20 02:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found