http://qs321.pair.com?node_id=69537


in reply to Why does this happen?

Short answer is, use a hash for that :)

longer answer is that the array doesn't know how to iterate over 0..2 it just wants to return the specified value which it notices isn't numeric, to do what you were trying to do you would have to use a loop... see the short answer :)

--
my $chainsaw = 'Perl';