in reply to Re: Creating Filenames using variables
in thread Creating Filenames using variables

mirod wrote:

The '_' is a valid character for a variable name, hence Perl looks for $mon_ and doesn''t find it

You can also get around this by being a little more explicit in identifying $mon, like so:

print "${mon}_$date";

That way, perl knows precisely which var you want.

I use this whenever my data structs start getting complicated, kind of like using extra parentheses in an expression to make yourself clear.

Whether or not that should serve notice that my data structures are too crufty and I should rethink my design is left as an exercise for the Meditations section. :-)

Peace,
-McD