You've already got answers to your questions, I just wanted to add: For some more info on strict see also Use strict and warnings. And, in this case, you can parameterize the width of a sprintf format without interpolating into the format string:
my $w = 5; my $str = "abc"; my $line = sprintf "%*s", $w, $str; print "<", $line, ">\n"; __END__ < abc>
Update: Athanasius beat me to it ;-)
In reply to Re: use of strict
by haukex
in thread use of strict
by geofflh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |