Hi
I need to open a file where the name is obtained by concatenating a variable and a string of text.
the concatenation doesnt seem to get evaluated in the open statement. so the 2 line version below (predefining the filename)
works but the second, one line version, doesnt.
I don't want loads of "tempname" variables in my script. how can i get the one line version to work?
thanks
$basedir="results";
my $tempname=$basedir . '/output/file.txt';
open (OUTHANDLE, ">$tempname") or die;
open (OUTHANDLE, ">$basedir . /output/file.txt") or die ;