Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: What is substring working on here.

by robartes (Priest)
on Jun 09, 2005 at 15:16 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://465167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-25 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found