in reply to opening files where name is a concatenation of variable
print "2+2" doesn't print 4.
print "2.2" doesn't print 22.
You can't place Perl code in Perl string literals and except it to get executed when the string is accessed.
That's why you were directed to use interpolation (a feature of string literals) instead of the concatenation operator (a Perl operator).
|
|---|