Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Push array into array of arrays

by kcott (Archbishop)
on Dec 18, 2018 at 14:50 UTC ( [id://1227400]=note: print w/replies, xml ) Need Help??


in reply to Push array into array of arrays

It sounds like you're doing something like:

$ perl -E 'my @x = ([qw{a b c}]); say "@x"' ARRAY(0x7fab41804248)

But you really wanted to do something more like:

$ perl -E 'my @x = ([qw{a b c}]); say "@{$x[0]}"' a b c

Please take a look at SSCCE. If you provide us with something we can run to reproduce your results, we'll be able to provide better help.

Also, just showing expected output — without showing the input and how it was processed — serves no useful purpose. Perhaps you accidentally omitted some important information; however, I see nothing in your post that indicates why "('x', 'y', 'z', 8,9,7)" would be expected.

— Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-19 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found