Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: How to swap rows with columns?

by BrowserUk (Patriarch)
on Oct 10, 2007 at 05:24 UTC ( [id://643867]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to swap rows with columns?
in thread How to swap rows with columns?

Why not just do away with the local var completely:

@a = ( [1..3],['a'..'c'],['x'..'z']);; @a = map{ [ map{ shift @$_ } @a ] } 1 .. @{ $a[0] };; print pp @a;; ([1, "a", "x"], [2, "b", "y"], [3, "c", "z"])

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^5: How to swap rows with columns?
by ikegami (Patriarch) on Oct 10, 2007 at 05:48 UTC
    Too much shifting for his taste, surely :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found