FAQ
Hi all,

here's my question :):

I define a hash array:
our %R=("first" => [ "one", "two" ], "second" => ["third", "fourth"]);

Now I can get back back array references from this using:
$R{"first"}

I also can get back the elements of this array:
$R{"first"}->[0] and so on..

but i would need to pass the whole array itself, not the reference to
another sub. How can I do that?

thanks much,
Balazs Pozsar.
--

Search Discussions

  • Jos I. Boumans at Jul 29, 2001 at 8:24 pm
    just dereference it:

    foo( @{ $R{"first"} } );

    it's as easy as that =)

    hth

    Jos Boumans

    Hi all,

    here's my question :):

    I define a hash array:
    our %R=("first" => [ "one", "two" ], "second" => ["third", "fourth"]);

    Now I can get back back array references from this using:
    $R{"first"}

    I also can get back the elements of this array:
    $R{"first"}->[0] and so on..

    but i would need to pass the whole array itself, not the reference to
    another sub. How can I do that?

    thanks much,
    Balazs Pozsar.
    --



    --
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupbeginners @
categoriesperl
postedJul 29, '01 at 6:46p
activeJul 29, '01 at 8:24p
posts2
users2
websiteperl.org

2 users in discussion

Jos I. Boumans: 1 post Pozsar Balazs: 1 post

People

Translate

site design / logo © 2023 Grokbase