Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I think the OP is essentially asking (Sixtease please correct me if I'm wrong) how you would make something like the following snippet print "e", and not "2"
treating the combined arrays as if they had been written like
Kind of like this
but less ugly, and without having to take special care of the subtle problem you run into with older versions of Perl when the arrays are empty, and the selecting range for the slice becomes [0..-1] (what this thread is about, essentially). Irrespective of whether you'd actually need to do something like this in real-life programming, it's still a valid question in and of itself, IMO. In reply to Re^3: regexp list return 5.6 vs 5.8
by almut
|
|