in reply to Re: perlform ^* variable field length
in thread perlform ^* variable field length
Hi, here's what I'm trying to do :
my @row = ('col1 : line1 col2 : line2', 'col2', 'col3 f1 col3 f2', 'col4', 'col5:line1 col5:line2', 'coll6 : line1,line1 coll6 : line2,line2 coll6 : line3,line3 coll6 : line4,line4' ); my $f = "format = \n" . ('^*' . '|') x scalar(@row) . "~~\n" . '@row' . "\n" . ".\n"; eval($f); write;
want desired result as :
col1:line1|col2|col3 f1 col3 f2|col4|col5:line1|col6: line1,line1 col2:line2||||col5:line2|col6:line2,line2 |||||col6:line3,line3 |||||col6:line4,line4
but running the code gives: Out of memory!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perlform ^* variable field length
by pme (Monsignor) on Apr 27, 2015 at 19:42 UTC | |
by Anonymous Monk on Apr 28, 2015 at 07:28 UTC | |
by Not_a_Number (Prior) on Apr 28, 2015 at 08:01 UTC | |
by Anonymous Monk on Apr 28, 2015 at 08:20 UTC | |
by pme (Monsignor) on Apr 28, 2015 at 08:37 UTC | |
by Anonymous Monk on Apr 28, 2015 at 08:47 UTC | |
by pme (Monsignor) on Apr 28, 2015 at 09:32 UTC | |
|