in reply to Re: conditional regex
in thread conditional regex
If the expected input is y or yes in a line then following code can be used simply.
while(<>) { print "yes\n" if /(^y$|^yes$)/i; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: conditional regex
by ikegami (Patriarch) on Aug 23, 2010 at 17:01 UTC |