Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: If/else problems

by tfrayner (Curate)
on Nov 19, 2003 at 12:21 UTC ( #308278=note: print w/replies, xml ) Need Help??

in reply to If/else problems

Another (very minor) stylistic point: you can use sprintf to good effect and avoid having to set up a temporary array.
use strict; my $timediff=0; # set it to whatever # just get the month my $month = (localtime(time + ($timediff * 3600)))[4]; # move 0..11 month range into line with human convention $month = sprintf("%02d", ++$month); print ("$month\n");
Not to worry though, if you're comfortable with your method (TIMTOWTDI, after all).


Update: simplified to better make the point.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://308278]
[enrgyxprt]: how do I delete a question
[Lotus1]: you can't but you can request to have it deleted.
[Lotus1]: you can edit it as long as you were logged in when you submitted it

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (13)
As of 2017-01-17 13:15 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (156 votes). Check out past polls.