in reply to Re^2: Using '#' at the beginning of a format?
in thread Using '#' at the beginning of a format?
Perl6::Form is a lot better than format. The usage is a lot easier.
loris request can be done like so:
Output:use warnings; use strict; use Perl6::Form; my %name_n_price_tag; print form "#\tName\tPrice", "#\t------ -------"; while (<DATA>) { chomp; my ( $name, $price ) = split /:\s/, $_, 2; $name_n_price_tag{$name} = $price; } print form "\t{|||||}\t{|||||}", $_, $name_n_price_tag{$_}, $/ for sort keys %name_n_price_tag; __DATA__ large: 90.12 small: 12.34 medium: 57.78
NOTE however, I don't know how the OP gets it data. This is just a head up using the module Perl6::Form.# Name Price # ------ ------- large 90.12 medium 57.78 small 12.34
|
|---|