H
hekutu
Dear all:
The follwing small program runs well.
==================
my @b = (1..10);
print @b;
==================
The output is:12345678910
But I want to replace the range list with a
flexible scalar, the new program looks like:
=========================
my $a = "(1..10)";
my @b = $a;
print @b;
=========================
The output is1..10)
The scalar is still the scalar. How can I convert
the text scalar "(1..10)" to a range list?
Thank you!
The follwing small program runs well.
==================
my @b = (1..10);
print @b;
==================
The output is:12345678910
But I want to replace the range list with a
flexible scalar, the new program looks like:
=========================
my $a = "(1..10)";
my @b = $a;
print @b;
=========================
The output is1..10)
The scalar is still the scalar. How can I convert
the text scalar "(1..10)" to a range list?
Thank you!