in reply to raffle_tickets_generator
Criticism invited, so here goes.
-
I'd write the long text strings as here-docs, or better yet, put them in __DATA__ section at the end.
Paragraph mode perhaps to cut it up.my ($header, $body, $footer) = do { local $/ = ""; <DATA> }; - I fail to see the reason to put $find through quotemeta. (And there's also the \Q\E).
- It is advisable to use named constants instead of magic numbers: use constant COLS => 7;
- For loop more concisely written using repetition operator: print $tombolatex $body x (1 + $N / COLS);
- ...
- All in all, it looks like a simple templating job.
In Section
Cool Uses for Perl