in reply to Re: index wrapping in tied FETCH and EXISTS
in thread index wrapping in tied FETCH and EXISTS
You can reach lower than the start of the array by using an index lower than -@array.
$ perl -wle'$|=1; @a=qw(a b c); print "$_: $a[$_]" for -@a-1..$#a+1' Use of uninitialized value in concatenation (.) or string -4: -3: a -2: b -1: c 0: a 1: b 2: c Use of uninitialized value in concatenation (.) or string 3:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: index wrapping in tied FETCH and EXISTS
by cmac (Monk) on Feb 04, 2009 at 20:11 UTC | |
by ikegami (Patriarch) on Feb 04, 2009 at 20:43 UTC | |
by cmac (Monk) on Feb 05, 2009 at 06:15 UTC |