in reply to format characters
You could always build the format dynamically and then eval it</slightly-evil> :)
I also think Perl6::Form has support for specifying a width numerically rather than by literal picture, but I'm not recalling how to do it offhand.
Update: Aaah, search for "Imperative field width".
use strict; use Perl6::Form; my( $name, $age ) = ( "Fred", 23 ); print join( " "x9, 0..7 ), "\n", "0123456789"x7, "012\n"; print form "{<{50}<}|{|||} ", $name, $age; exit 0;
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: format characters
by Tux (Canon) on Feb 07, 2008 at 07:45 UTC |