Use the string concatenation operator
$FileName= $File . $j . ".dat";
or use interpolation
$FileName= "$File$j.dat";
By the way,
for (my $j=1;$j<=2;$j++)
is not nearly as readable as
for my $j (1..2)
In reply to Re: Updating file name
by ikegami
in thread Updating file name
by F/lix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |