Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: padding/substr quirk

by Corion (Pope)
on Jan 10, 2004 at 21:38 UTC ( #320384=note: print w/ replies, xml ) Need Help??


in reply to padding/substr quirk

Operator precedence:
Your expression gets parsed as

("0" . localtime->mon()) + 1

which evaluates to "1". Putting parentheses around the expressions helps :

'0' . (localtime->mon +1)
perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web


Comment on Re: padding/substr quirk
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2014-09-18 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (124 votes), past polls