Help for this page

Select Code to Download


  1. or download this
    print('-', (map { sprintf('%-10s', $_) } @header), "\n");
    foreach my $line (@data) {
       my @fields = split(/-->/, $line);
       print('-', (map { sprintf('%-10s', $_) } @fields), "\n");
    }
    
  2. or download this
    my $format = '-' . ('%-10s' x @header) . "\n";
    
    ...
    foreach my $line (@data) {
       printf($format, split(/-->/, $line));
    }