Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: raffle_tickets_generator

by Athanasius (Archbishop)
on Dec 03, 2015 at 10:06 UTC ( [id://1149276]=note: print w/replies, xml ) Need Help??


in reply to raffle_tickets_generator

Hello QuillMeantTen,

As usual, I'm looking for ways to get better so constructive criticism is welcome.

I can’t try out your code, as I don’t currently have pdflatex installed. But I notice that you call open and close without testing for failure. It’s good practice to either test each call explicitly:

open(my $tombolatex, '>', 'int.tex') or die "Cannot open file 'int.tex' for writing: $!";

or to put:

use autodie;

at the head of your script. See autodie.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^2: raffle_tickets_generator
by QuillMeantTen (Friar) on Dec 03, 2015 at 11:47 UTC

    Yikes, I missed that, thank you. I already automatically add

    use strict; use warnings;
    but autodie does not come as easily to mind yet.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1149276]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-18 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found