in reply to Re: Re: pattern matching on a single line
in thread How do I store all matches from a single line?
I thought @second = map EXPR, @first; applied EXPR
to each element of @first and placed the results
in @second. And since m// doesn't change anything,
then @second would equal @first.
So something like:
Would be more appropriate.
However, I'm willing to bet heavily that your Perl knowledge far exceeds mine, so I'm wondering: do I misunderstand map or m// (or both)?
FouRPlaY
Learning Perl or Going To die() Trying
So something like:
for (@lines) { @result = /<(.*?)>/g; }
Would be more appropriate.
However, I'm willing to bet heavily that your Perl knowledge far exceeds mine, so I'm wondering: do I misunderstand map or m// (or both)?
FouRPlaY
Learning Perl or Going To die() Trying
|
---|
Replies are listed 'Best First'. | |
---|---|
(bbfu) Re(4): pattern matching on a single line
by bbfu (Curate) on Jun 05, 2001 at 23:33 UTC | |
by FouRPlaY (Monk) on Jun 05, 2001 at 23:44 UTC | |
Re: Re: Re: Re: pattern matching on a single line
by lestrrat (Deacon) on Jun 06, 2001 at 01:13 UTC | |
Re: Re: Re: Re: pattern matching on a single line
by John M. Dlugosz (Monsignor) on Jun 05, 2001 at 23:34 UTC | |
Re: Re: Re: Re: pattern matching on a single line
by tachyon (Chancellor) on Jun 06, 2001 at 00:22 UTC | |
by merlyn (Sage) on Jun 06, 2001 at 00:33 UTC | |
by Vynce (Friar) on Jun 06, 2001 at 02:23 UTC | |
by merlyn (Sage) on Jun 06, 2001 at 02:25 UTC |
In Section
Seekers of Perl Wisdom