http://qs321.pair.com?node_id=465167


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-