Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: A Case with 5 Var's

by Melly (Hermit)
on Jan 25, 2007 at 11:59 UTC ( #596454=note: print w/ replies, xml ) Need Help??


in reply to A Case with 5 Var's

If restructuring your code to use a hash is too awkward, you can assign you vars to an array and quickly check that - e.g. (untested)

$var1 = 'hello'; $var2 = 0; $var3 = ''; @array = ($var1, $var2, $var3); foreach(@array){ print "empty\n" if $_ eq ''; }
map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm@tomandlu.co.uk


Comment on Re: A Case with 5 Var's
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2014-08-21 08:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (128 votes), past polls