Angharad has asked for the wisdom of the Perl Monks concerning the following question:
So, for each item, there are two columns of data. My question is, how might I go about writing new files that only contain the two columns for that particular item (and name each file item1.dat, item2.dat etc.) So, for example, item1.dat should look like this:item1 item2 item3 0 0 1 S 0 0 0 0 2 K 0 0 0 0 23 T 1 M 12 T 24 N 2 L 45 0 36 V 14 I 46 0 38 W 16 R 51 S 39 A 17 L 52 A 42 N 20 E 53 0 43 L 21 G
The actual original file is a fair bit larger than this and has more items. All of these items need to have their own files containing their two items of data. Any advice as to how to get started etc appreciated.0 0 0 0 0 0 12 T 45 0 46 0 51 S 52 A 53 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: creating smaller files from one large one
by jwkrahn (Abbot) on Jun 08, 2009 at 17:29 UTC | |
|
Re: creating smaller files from one large one
by toolic (Bishop) on Jun 08, 2009 at 17:28 UTC | |
|
Re: creating smaller files from one large one
by ikegami (Patriarch) on Jun 08, 2009 at 17:11 UTC | |
|
Re: creating smaller files from one large one
by jvector (Friar) on Jun 09, 2009 at 22:41 UTC |