Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-12-14 01:17 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (382 votes). Check out past polls.