On 10 Aug., 00:58, [EMAIL PROTECTED] (Patrick R. Michaud) wrote:
> On Fri, Aug 08, 2008 at 07:32:52AM +0200, Carl Mäsak wrote:
> > Jonathan (>):
> > > That this means the { $_ => uc $_; } above would end up composing a Hash
> > > object (unless the semicolon is meant to throw a spanner in the
> > >
On Fri, Aug 08, 2008 at 07:32:52AM +0200, Carl Mäsak wrote:
> Jonathan (>):
> > That this means the { $_ => uc $_; } above would end up composing a Hash
> > object (unless the semicolon is meant to throw a spanner in the
> > hash-composer works?) It says you can use sub to disambiguate, but
> >
> >
Jonathan (>):
> That this means the { $_ => uc $_; } above would end up composing a Hash
> object (unless the semicolon is meant to throw a spanner in the
> hash-composer works?) It says you can use sub to disambiguate, but
>
> %ret = map sub { $_ => uc $_; }, split "", $text;
>
> Doesn't work sinc
Hi,
There is in the spectests this example:
my $text = "abc";
my %ret;
%ret = map { $_ => uc $_; }, split "", $text;
is ~%ret.kv, "a A b B c C", "=> works in a map block";
However, it seems from S06:
"|{...}| is always a block. However, if it is completely empty or
consists of a single list,