On Mon, Nov 07, 2005 at 11:20:39PM +0200, Ilmari Vacklin wrote:
: On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote:
: > On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: > : Also, if we provide a way to return a pair instead of a value from a
: > : hash (currently done with th
On Mon, Nov 07, 2005 at 12:05:30PM -0800, Larry Wall wrote:
> On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
> : Also, if we provide a way to return a pair instead of a value from a
> : hash (currently done with the new :%hash syntax),
>
> Whoops, I forgot I changed that to %hash: (an
Hi,
Larry Wall wrote:
> On Sun, Nov 06, 2005 at 03:10:40PM +0100, Ingo Blechschmidt wrote:
[ => should not automatically bind its .value to the RHS ]
> I think binding directly to .key or .value is different from what =>
> does. So after
>
> $pair = $key => $value;
>
> setting $value doesn
On Mon, Nov 07, 2005 at 11:53:26AM -0800, Larry Wall wrote:
: Also, if we provide a way to return a pair instead of a value from a
: hash (currently done with the new :%hash syntax),
Whoops, I forgot I changed that to %hash: (and %hash:{'key'} too).
Larry
On Sun, Nov 06, 2005 at 03:10:40PM +0100, Ingo Blechschmidt wrote:
: Hi,
:
: my ($key, $value) = ;
: my $pair = ($key => $value);
:
: $pair.key = "new";
: # Should this fail ("cannot modify a constant")?
: # Should this update $pair.key, but leave $key untouched?
:
Hi,
my ($key, $value) = ;
my $pair = ($key => $value);
$pair.key = "new";
# Should this fail ("cannot modify a constant")?
# Should this update $pair.key, but leave $key untouched?
# Should this update $pair.key, implicitly updating $key as well?
$pair.value