in reply to Regex and loop question

MidLifeXis already answered your question with
last if $char_read =~ /\s/;
but I thought I would add that since you're not familiar with regular expressions, you might find the excellent 'perldocs' documentation that's included with Perl helpful in learning about regular expressions and pattern matching.

Do
perldoc perl
at a command prompt, and you'll see all the different perldocs that come with perl. Listed there are these regular expression topics:
perlrequick Perl regular expressions quick start perlretut Perl regular expressions tutorial perlre Perl regular expressions, the rest of t +he story
So, then to read the perldocs on perlrequick, you would do
perldoc perlrequick
Hope this helps.

Replies are listed 'Best First'.
Re: Re: Regex and loop question
by perl_seeker (Scribe) on Aug 22, 2003 at 10:04 UTC
    Yes, this is also useful.
    Thanx.:)