Re: about creating an array
- From: krahnj@xxxxxxxxx (John W. Krahn)
- Date: Thu, 15 Mar 2007 20:25:52 -0700
Jm lists wrote:
2007/3/16, John W. Krahn <krahnj@xxxxxxxxx>:
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
.
- References:
- about creating an array
- From: Jm lists
- Re: about creating an array
- From: John W. Krahn
- Re: about creating an array
- From: Jm lists
- about creating an array
- Prev by Date: Re: about creating an array
- Next by Date: Re: GUI with Perl
- Previous by thread: Re: about creating an array
- Next by thread: Re: about creating an array
- Index(es):
Relevant Pages
|