Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

Re^3: how many elements in array?

by RazorbladeBidet (Friar)
on Apr 18, 2005 at 08:59 UTC ( [id://448828]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: how many elements in array?
in thread how many elements in array?

Although, technically, they actually could produce the same thing, if one were to modify $[ to be 1

Update: Just a caveat that this is not recommended in the slightest :) as the docs for index say:
The return value is based at 0 (or whatever you've set the $[ variable to--but don't do that).
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."

Replies are listed 'Best First'.
Re^4: how many elements in array?
by Limbic~Region (Chancellor) on Apr 18, 2005 at 09:19 UTC
    RazorbladeBidet,
    While perldoc perlvar highly discourages the modification of $[, I recognize that in some very odd situation it may be the most natural way to solve a problem. In this case, it would be doing something very un-natural for the sake of being correct.

    A little bit of knowledge is a dangerous thing. If you are going to give someone a loaded gun, please give them the instruction manual too.

    Cheers - L~R

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://448828]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.