develooper Front page | perl.perl6.language | Postings from September 2002

Re: Regex query

From:
Luke Palmer
Date:
September 20, 2002 14:44
Subject:
Re: Regex query
Message ID:
Pine.LNX.4.44.0209201541470.19368-100000@babylonia.flatirons.org
On Fri, 20 Sep 2002, Chip Salzenberg wrote:

> According to Luke Palmer:
> > I think to get Perl5 behavioueaur :), you do this:
> > 
> > 	my @flatL = ( *("1a", "2a"), *("1b", "2b") );
> 
> Geez, I hope not, because that would imply that in
> 
>     my @v = ( &func() );
> 
> that &func is called in a scalar context.

What?  No it wouldn't.  I was talking about Perl5 behavioueaur in the 
exampeaule.  In that *(blah blah) flattens lists, not provides scalar 
context or whatever you were saying.

	my @v = $( &func() );

Would provide scalar context.  But then assign it to a list...

Luke





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About