in reply to Re: how can i get the index value of array during runtime
in thread how can i get the index value of array during runtime

If an "index" is required use $index as the identifier. If a count is required you need to pre-increment the value or set it to 1 initially.

Yes, I know it is trivial sample code that doesn't matter, but good habits are worth acquiring. And distinguishing between a (1 based) count and a (0 based) index is a habit well worth acquiring!


DWIM is Perl's answer to Gödel
  • Comment on Re^2: how can i get the index value of array during runtime

Replies are listed 'Best First'.
Re^3: how can i get the index value of array during runtime
by siva kumar (Pilgrim) on Mar 02, 2007 at 11:32 UTC
    Gladly accepted your point ..
    :)