Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Passing arrays and references to arrays

by GrandFather (Saint)
on Aug 10, 2005 at 11:10 UTC ( [id://482567]=note: print w/replies, xml ) Need Help??


in reply to Re: Passing arrays and references to arrays
in thread Passing arrays and references to arrays

It does work. Variant number 4 :). Guess I was array fixated by the first two variants.


Perl is Huffman encoded by design.
  • Comment on Re^2: Passing arrays and references to arrays

Replies are listed 'Best First'.
Re^3: Passing arrays and references to arrays
by simon.proctor (Vicar) on Aug 10, 2005 at 11:46 UTC
    If I understand everything correctly then I don't think this is a fourth variant:
    \@$choices
    compared to
    $choices
    I think you need to look up array refs and pay particular attention to referencing and dereferencing. In both cases you have an array ref, however in the first you deref it only to then make it a reference again. The second doesn't do this unneccessary merry go round.

    HTH.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-23 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found