Perl formats are controlled by built-in global variables. But global variables are deprecated. Where does this leave formats?
Formats should be deprecated as well. Conway for one, after a sympathetic discussion of their advantages and drawbacks in Perl Best Practices, concludes with
Don't use formats.
If you are used to formats and you get good results with them, this advice does not apply to you. But the current thread suggests otherwise.
So what are the alternatives?
Maybe something from the CPAN. Consider Perl6::Form.
If your needs are as simple as they sound, maybe you'll enjoy just doing it yourself:
my $page_heading; my @details; my $DETAILS_PER_PAGE; my $FORM_FEED_CHARACTER; PAGE: while (@details) { print $page_heading; DETAIL: for (1..$DETAILS_PER_PAGE) { print shift @details; } print $FORM_FEED_CHARACTER; }
In reply to Re: Format _top
by Narveson
in thread Format _top
by patmcl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |