Help for this page

Select Code to Download


  1. or download this
     my $array2d = [];
     my @list = (split /,/,join (",",@array));
     $array2d->[$_%3][int($_/3)]=$list[$_] for (0..$#list);
    
  2. or download this
     my @array2d = ();
     my $c=0;
     $array2d[$c%3][int($c++/3)]=$_ for (split /,/, join (",",@array));
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    $t->mark('V4 end');
    
    $t->report();
    
  4. or download this
    Devel::Timer Report -- Total time: 0.1663 secs
    Interval  Time    Percent
    ...
    02 -> 03  0.0319  19.15%  V2 -> V3
    00 -> 01  0.0002   0.09%  INIT -> V1
    
  5. or download this
      push @{ $splitted_up[($cnt ++) % 3] }, $_ 
        foreach (split (/,/, join (",",@array)));