Jan Eden <[EMAIL PROTECTED]> wrote:
: 
: I tried to stuff the following two lines into one, but did 
: not succeed:
: 
: my($teilnehmer) = $eingabe =~ m/(?<=Teilnehmer:\n\n)(.+)/s;
: my(@teilzeilen) = split /\n/, $teilnehmer;

    Care to share a typical value for $eingabe with us?

    How about:

my @teilzeilen = split /\n/, ( $eingabe =~ /(?<=Teilnehmer:\n\n)(.+)/s )[0];

    I think(?) "( $eingabe =~ /(?<=Teilnehmer:\n\n)(.+)/s )[0]"
is forcing the regex into list context. In scalar context it
returns 1 (for success?) and split assumes scalar context of
its second argument.



HTH,

Charles K. Clarkson
-- 
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328


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


Reply via email to