Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Transposer

by Pied (Monk)
on Jul 14, 2005 at 06:29 UTC ( #474770=note: print w/replies, xml ) Need Help??


in reply to Re: Transposer
in thread Transposer

Well, it's not a matrix which is input, but it is a matrix that is output. input is a list of strings, with each string defining a tuple, whereas output is a LoL. Anyway, thanks for the code.

Replies are listed 'Best First'.
Re^3: Transposer
by jdporter (Canon) on Jul 14, 2005 at 14:31 UTC
    Yeah... but as already discussed, the part that converts those strings into actual arrays should probably be separated from the other part. But hey - if they must be integral, then here:
    # first arg: n # second arg: array(ref) of strings which are comma-separated lists. # return: list of nth elements. sub nth_elemS { map { (split ',')[$_[0]] } @{$_[1]} }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2020-05-30 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (171 votes). Check out past polls.

    Notices?