kevinw has asked for the wisdom of the Perl Monks concerning the following question:
and i want to have it printed into file "outfile" in the following way:name1 1 2 3 4 typex name2 3 4 5 6 typey name3 2 3 3 1 typex
i'm putting the file "temp" into an array in the following way:typex name1 1 2 3 4 name3 2 3 3 1 typey name2 3 4 5 6
but i'm stuck after this...any help would be appreciated since this is my first perl program...thanks in advancewhile (my $line = <TEMP>) { chomp($line); push @array, $line; my ($name, $column2, $column3, $column4, $column5, $type) = split/ +\s+/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Working With Arrays and Files
by thelenm (Vicar) on Jul 23, 2002 at 19:35 UTC | |
|
Re: Working With Arrays and Files
by broquaint (Abbot) on Jul 23, 2002 at 19:38 UTC | |
|
Re: Working With Arrays and Files
by fsn (Friar) on Jul 23, 2002 at 19:46 UTC | |
by kevinw (Novice) on Jul 23, 2002 at 20:08 UTC | |
|
Re: Working With Arrays and Files
by dpuu (Chaplain) on Jul 23, 2002 at 19:48 UTC | |
by kevinw (Novice) on Jul 23, 2002 at 20:16 UTC | |
by dpuu (Chaplain) on Jul 23, 2002 at 21:18 UTC | |
by kevinw (Novice) on Jul 23, 2002 at 21:33 UTC | |
by dpuu (Chaplain) on Jul 23, 2002 at 21:36 UTC | |
| |
|
Re: Working With Arrays and Files
by kevinw (Novice) on Jul 23, 2002 at 19:33 UTC | |
|
Re: Working With Arrays and Files
by sauoq (Abbot) on Jul 23, 2002 at 21:12 UTC |