Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: reducing the number of lines

by pvaldes (Chaplain)
on Jan 12, 2013 at 13:26 UTC ( #1013038=note: print w/replies, xml ) Need Help??


in reply to reducing the number of lines

I need to rewrite this in a more simpler form

$k-2>0 $l-2>0

Same as:

$k>2 $l>2

And you can save one line here

$h=0; $c=0;

same as:

($h,$c) = (0,0);

Updated: the tobyink's solution is more elegant

$h = $c = 0

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013038]
help
Chatterbox?
and God said, "Let Newton be!"...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2016-12-03 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (52 votes). Check out past polls.