in reply to Use scalars to define a filename

Perl thinks you have a variable named $var1_.
my $fileName = "fileLocn/$var1_$var2.txt";
Change that to:
my $fileName = "fileLocn/${var1}_$var2.txt";
Scalar value constructors

Replies are listed 'Best First'.
Re^2: Use scalars to define a filename
by akrrs7 (Acolyte) on Oct 17, 2011 at 14:16 UTC
    Thanks Toolic...that fixed it.