Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: safety in system calls

by damian1301 (Curate)
on Jun 15, 2001 at 21:04 UTC ( [id://88855]=note: print w/replies, xml ) Need Help??


in reply to safety in system calls

If you want to make sure that you are safe you should always use warnings, strict.pm, and taint mode(if you can). As an extra, you should try using the CPAN module Safe.

Now since I am so bored, I just want to clean up a bit of that code.

my @identity = qw(identity1 identity2 identity3 identity4); foreach my $i (1..4) { my $identity = shift(@identity); #...


Wouldn't it be much better if you just iterated over the identity array because you don't use $i anywhere in there? ..:
my @identity = qw(identity1 identity2 identity3 identity4); foreach my $identity (@identity) { #...


Tiptoeing up to a Perl hacker.
Dave AKA damian

Replies are listed 'Best First'.
Re: Re: safety in system calls
by marvell (Pilgrim) on Jul 02, 2001 at 16:22 UTC

    Yeah, OK, I changed things round a bit here and there. It was a quick test hack.

    I'll look into those modules and modes.

    Cheers

    --
    Brother Marvell

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-03-28 11:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found