How to create a new file using a variable value in perl?
Posted
by user295384
on Stack Overflow
See other posts from Stack Overflow
or by user295384
Published on 2010-03-17T05:24:34Z
Indexed on
2010/03/17
5:31 UTC
Read the original article
Hit count: 125
perl
Eg:
$variable = "10000";
for($i=0; $i<3;$i++)
{
$variable++;
$file = $variable."."."txt";
open output,'>$file' or die "Can't open the output file!";
}
This doesn't work...Please suggest a new way. Thanks in advance :)
© Stack Overflow or respective owner