I agree that it was not what was expected but it does fulfill the criteria as stated.
No, as juerd pointed out, you're not changing $x[0] nor $x[1]: they both remain equal to \$_. All you show is that if you change ${$x[0]} then ${$x[1]} changes, which wasn't the exercise.
Note that I have no problem with unexpected solutions — I love the $[ one.. didn't think of that — but they do need to be valid. :-)
In reply to Re[7]: How's your Perl?
by xmath
in thread How's your Perl?
by xmath
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |