Jm lists wrote:
> 
> 2007/3/16, John W. Krahn <[EMAIL PROTECTED]>:
>>
>> Or you could remove all trailing whitespace:
>>
>> while ( <HD> ) {
>>    s/\s+\z//;
>>    push @arr, $_;
>> }
> 
> Thanks John.That's the right way.
> Another question,what's the regex of "\s+\z" ?

\s+ matches one or more whitespace characters and \z is the end of string 
anchor.



John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to