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

Re: Finding the Day of Week in Windows

by fredopalus (Friar)
on Jan 07, 2003 at 00:01 UTC ( [id://224795]=note: print w/replies, xml ) Need Help??


in reply to Finding the Day of Week in Windows

The reason it was printing in numbers is because you weren't printing it in scalar context. Try:
$time = scalar localtime; $day = substr($time, 0,3); print $day;

If it's printed without scalar context, it gives a list of values in the format:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)

See the documentation page on localtime() for more info.

Log In?
Username:
Password:

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

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

    No recent polls found