Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^3: Looking for syntactic shortcut

by virtualsue (Vicar)
on Jul 19, 2005 at 13:01 UTC ( #476071=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Looking for syntactic shortcut
in thread Looking for syntactic shortcut

That's not a very good test. Here's a very small program that does what you say you want:

#!/usr/bin/perl use warnings; use strict; sub retarray { my $param = shift; my @array=(1,2,3,4,5,56); return @array; } my $param = 2; my $val = (retarray($param))[3]; print "val is $val\n";

Comment on Re^3: Looking for syntactic shortcut
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-11-25 17:20 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (683 votes), past polls