in reply to Re: search array for item, move to next item
in thread search array for item, move to next item
Actually it's trivial to still use an iterator-style for loop, you just have to pick something slightly different to iterate over.
my $target_word; for my $idx ( 0..($#arglist-1) ) { if( $arglist[ $idx ] eq '-iL' ) { $target_word = $arglist[ $idx + 1 ]; last; } }
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|