Update: And I just noticed the part in the OP where it says "without a flag variable"...oh, well...my $got_alpha; while (<FILE>) { unless ($got_alpha) { if (/alpha/) { #...alpha code $got_alpha++; next; } } # ...more code }
In reply to Re^2: A way to avoid repeated conditional loops
by runrig
in thread A way to avoid repeated conditional loops
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |