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

Re: What is substring working on here.

by robartes (Priest)
on Jun 09, 2005 at 15:16 UTC ( #465167=note: print w/replies, xml ) Need Help??


in reply to What is substring working on here.

As gellyfish correctly states, substr() is being used as an lvalue here, i.e. something you can assign to. In this case, you are replacing five characters (the third argument) of $DATE, starting at position two (the second argument, and counting from 0) with the concatenation $YEAR.$MONTH. Hence the output you observe.

CU
Robartes-

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2016-12-03 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (60 votes). Check out past polls.