I am trying to splice an array through a variable that gets processed/cleaned. However, I have found out that the following pieces of code are not equivalent.
is not equal to...but gets a runtime errorprint @array[2,3..7];
Which returns:my $splice_str = '2,3..7'; print @array[$splice_str];
Any ideas?
In reply to Splicing an array. by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |