b00mIR has asked for the wisdom of the Perl Monks concerning the following question:
it's not a simiple conversion of rows to columns which i'm able to do but taking every pair of elements of a row and turning them into columns I've tried the following without successabcdef abcdef abcdef abcdef to abababab cdcdcdcd efefefef
foreach $line (@array) { chomp $line; @xox=split(//,$line); $cnt=0; for($i=0; $i<=scalar(@xox); $i+=2) { push $arr[$cnt], $xox[$i]."".$xox[1+$i]; $cnt++; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: convert rows to columns
by BrowserUk (Patriarch) on Nov 26, 2012 at 12:44 UTC | |
|
Re: convert rows to columns
by Athanasius (Archbishop) on Nov 26, 2012 at 12:53 UTC | |
by ack (Deacon) on Nov 26, 2012 at 20:30 UTC | |
by Athanasius (Archbishop) on Nov 27, 2012 at 01:43 UTC | |
|
Re: convert rows to columns
by Anonymous Monk on Nov 26, 2012 at 13:24 UTC | |
|
Re: convert rows to columns
by McA (Priest) on Nov 26, 2012 at 12:47 UTC | |
by ack (Deacon) on Nov 26, 2012 at 20:35 UTC | |
by choroba (Cardinal) on Nov 27, 2012 at 10:31 UTC |