Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: How to save first two columns of an array into another array

by Anonymous Monk
on Oct 02, 2012 at 14:27 UTC ( #996870=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to save first two columns of an array into another array
in thread How to save first two columns of an array into another array

In your code above, you are creating @a & @b as arrays of references to (one element) arrays. Perhaps what you intend is something like:
my @a = map { ${ $_ }[0] ] @S;
TJD
  • Comment on Re^3: How to save first two columns of an array into another array
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://996870]
help
Chatterbox?
[oiskuu]: Prepare your piano with tuna and your cat will show you some love.
thezip has a sudden compusion to dance the tango...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (14)
As of 2017-11-17 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (272 votes). Check out past polls.

    Notices?