Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Difference of localtime

by Lawliet (Curate)
on Feb 24, 2009 at 03:47 UTC ( #745886=note: print w/replies, xml ) Need Help??

in reply to Difference of localtime

$ perl -E 'say localtime time; say scalar localtime' 1946222311091530 Mon Feb 23 22:46:19 2009
$ perl -E'$foo = localtime time; say $foo; $bar = localtime; say $bar' Tue Feb 24 16:34:31 2009 Tue Feb 24 16:34:31 2009

You be the judge! :) (This time, be the judge with misleading code. Thanks, ysth and Annony.)

I guess I should have suggested for you to just try it yourself to begin with~

Update: Added smiley

And you didn't even know bears could type.

Replies are listed 'Best First'.
Re^2: Difference of localtime
by Anonymous Monk on Feb 24, 2009 at 08:33 UTC
    That is misleading because  my $foo = localtime; is scalar context.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://745886]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-05-24 00:40 GMT
Find Nodes?
    Voting Booth?