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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: raffle_tickets_generator
by QuillMeantTen (Friar) on Dec 03, 2015 at 11:57 UTC | |
by GotToBTru (Prior) on Dec 04, 2015 at 14:01 UTC | |
by QuillMeantTen (Friar) on Dec 05, 2015 at 10:18 UTC |
In Section
Cool Uses for Perl