Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Syntactic Confectionery Delight
 
PerlMonks  

Re: safety in system calls

by damian1301 (Curate)
on Jun 15, 2001 at 21:04 UTC ( #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


Comment on Re: safety in system calls
Select or Download Code
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
Node Status?
node history
Node Type: note [id://88855]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-04-19 00:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (473 votes), past polls