in reply to Using expressions in string literals
So what's happening there is that you're dereferencing a reference, and since you can put any old statement1 in the dereference you can use your expression (make sure there is a reference operator so there's something to dereference).print "1 * 2 * 3 = ${\scalar 1 * 2 * 3}\n"; __output__ 1 * 2 * 3 = 6
Also, watch out on your array usage as you probably want $ParsedTime[$year], where as @ParsedTime[$year] is a single element array slice. This will be picked up by the ever useful warnings module.
HTH
_________
broquaint
1 this isn't strictly true, you can't have a straight compound statements in your dereference
|
|---|