in reply to Regex and loop question
You want don't want to use eq and a pattern. Use something like this instead...
for (1..10) { ... last if ($charread =~ /\s/); }
or
for (1..10) { ... last if ($charread eq " " || $charread eq "\t" ....); }
Update: Reread the supplied code :)
Update 2: replace $_ with $charread.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex and loop question
by perl_seeker (Scribe) on Aug 22, 2003 at 09:56 UTC |