![]() |
|
We don't bite newbies here... much | |
PerlMonks |
Columns to arraysby Anonymous Monk |
on Jul 01, 2004 at 23:29 UTC ( [id://371260]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Major newbie here, so please forgive my ignorance... Here is what I am trying to do: I have some data in a CSV file. 112233AABBCC,Homer Simpson 223344BBCCDD,Marge Simpson There are about 3000 lines of it. I need to take this data and represent it like this: Homer Simpson 112233AABBCC Some info I want to take the file as input and output the data as a file. So basically, I got the data into an array like this: (I get the data in by using cat <filename> | ./myprogram) @LISTING=<STDIN>; Now what I want to do is get column 1 into an array and column 2 into a different array. I am assuming that Perl has some built in way to do this. I was looking at "split", but that is obviously not what I want. Thank you for helping me.
Back to
Seekers of Perl Wisdom
|
|