[Pdx-pm] accessing list elements

Randal L. Schwartz merlyn at stonehenge.com
Wed Sep 3 19:50:35 CDT 2003


>>>>> "Michael" == Michael Rasmussen <mikeraz at patch.com> writes:

Michael> huh?  rand returns a "random fractional number". And lists are
Michael> accessed through integers.  

Michael> Or not?

Michael> A simple test case shows that you can access list members with
Michael> fractional numbers.  This is handy, but puzzling behavior.
Michael> I couldn't find a reference to this in the docs.

We write about it in Learning Perl, for example.

Michael> Is there any explanation to this besides "Perl does what you expect"?

Oddly enoughy, I though there was a canonical description in "perldata"
or something, but I couldn't find one.



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



More information about the Pdx-pm-list mailing list