Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: condensing code

by ady (Deacon)
on Sep 08, 2006 at 18:08 UTC ( [id://572044]=note: print w/replies, xml ) Need Help??


in reply to condensing code

And a C-way to do it..
#!/usr/bin/perl -w use strict; my $t= -181; for (my ($i,$j) = (30,1); $i <= 180; $i += 30, $j++) { if ($t <= $i) { print $j; last; } }

The div by 30 is much more straight forward tho'!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-19 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found