Awww! Can't believe you missed the opportunity for a list assignment here. :)
($curr->{next}, $tail, $curr) = ($tail, $curr, $curr->{next});
In reply to Re^4: Reversing a singly linked list
by Anonymous Monk
in thread Reversing a singly linked list
by punitpawar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |