Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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,, 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
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.


    Brother Marvell

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2015-11-29 21:04 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls