Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Converting array reference to list context

by Anonymous Monk
on Dec 31, 2010 at 06:00 UTC ( [id://879907]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $foo = [1,2,3];
    
    # assign (1,2,3) to @bar
    ...
    
    # assign ([1],[2],[3]) to @baz
    my @baz = map { [$_] } @$foo;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found