in reply to A way to avoid repeated conditional loops
you can even change that second condition to 0: if ( (m/^alpha$/ .. 0 ) > 1)while (<$fh>) { if ( (m/^alpha$/ .. eof($fh) ) > 1) { # everything between alpha and end of file } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A way to avoid repeated conditional loops
by Deus Ex (Scribe) on Aug 24, 2011 at 12:44 UTC | |
by SuicideJunkie (Vicar) on Aug 24, 2011 at 13:57 UTC | |
by tinita (Parson) on Aug 24, 2011 at 15:10 UTC | |
by Anonymous Monk on Aug 24, 2011 at 16:27 UTC | |
by Deus Ex (Scribe) on Aug 24, 2011 at 14:43 UTC |