Help for this page

Select Code to Download


  1. or download this
    @x = (1,2,3,4,5,6);
    print STDOUT join(" ", map { sprintf "%7d", $_ } @x), "\n";
    
    #outputs:
          1       2       3       4       5      6
    
  2. or download this
    @x = (123456);
    print STDOUT join(" ", map { sprintf "%7d", $_ } map { split //, $_ } 
    +@x), "\n";
    
    #outputs:
          1       2       3       4       5       6
    
  3. or download this
    my @x = (1,2,3,4,5,6);
    my @new;
    ...
    
    #outputs:
          1       2       3       4       5       6