W
weijiay
I am confused by the behaviour of the following code:
$ranges="3-4";
@$ranges=split(/-/, $ranges);
print $ranges;
print @$ranges;
print $ranges prints out "3-4", while print @$ranges prints out "34".
Shouldnt $ranges now be a reference to an array?
Will
$ranges="3-4";
@$ranges=split(/-/, $ranges);
print $ranges;
print @$ranges;
print $ranges prints out "3-4", while print @$ranges prints out "34".
Shouldnt $ranges now be a reference to an array?
Will