in reply to regex to an array , is there a better way to do this
my @array = eval $number;
Or you could simplify your code a bit:
for (my $i=$1;$i<=$2;$i++){ push @arraydigit, $i; }
Can be written shorter and clearer as
push @array, $1..$2;
There's really no point in having @array and @arraydigit separate.
|
|---|