On Thu, Aug 08, 2013 at 11:30:29PM -0500, Andy Bach wrote:
> > And buggy, consider:
>    my @timings = ( 11, 22, 3, 14, 18, 45, 18, ... 86 );
> 
> Yeah, it's a constraint without a cause. Do you want to treat every "18" in 
> the "if " or only the first? Why not use a counter?  Is the data from a list, 
> a file or … ? Do we know it's the 5th element ahead of time?
> 
> But it seems like there'd have to be something else involved that eliminates 
> a counter var. 
 
I'm not sure if the original poster can't use a counter or was asking if there 
was an automagic indicator.
This example shows one reason why a counter isn't a bad thing.

-- 
            Michael Rasmussen, Portland Oregon  
          Be Appropriate && Follow Your Curiosity
  Other Adventures: http://www.jamhome.us/ or http://gplus.to/MichaelRpdx
A special random fortune cookie fortune:
We'll sit around talking about the good old days, when we wished that we were 
dead.
        ~  Samuel Beckett on the afterlife

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to