bichonfrise74 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; while (<DATA>) { my @rows; my ($name, $tel, $col3, $col4, # lines 7 $col5, $col6, @notes) = split; push (@rows, $name, $tel, $col3, $col4, # lines 10 $col5, $col6, (join " ", @notes) ); print join " ", @rows , "\n"; } __DATA__ abc 322 2/3/09 aaa aadda dasdas a1 a2 a3 def 433 3/4/08 dasd bdbdbd wings b1 b2 b3 b4 b5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Optimizing Splitting of Array
by lamprecht (Friar) on Jun 08, 2009 at 21:18 UTC | |
by Marshall (Canon) on Jun 09, 2009 at 05:31 UTC | |
by bichonfrise74 (Vicar) on Jun 08, 2009 at 21:39 UTC | |
|
Re: Optimizing Splitting of Array
by Fletch (Bishop) on Jun 08, 2009 at 21:13 UTC | |
|
Re: Optimizing Splitting of Array
by JavaFan (Canon) on Jun 08, 2009 at 21:22 UTC | |
|
Re: Optimizing Splitting of Array
by afoken (Chancellor) on Jun 08, 2009 at 21:13 UTC | |
|
Re: Optimizing Splitting of Array
by kcSkeptic (Initiate) on Jun 12, 2009 at 18:21 UTC |