Juerd wrote:
However, in general, chained operators like comma, junction constructors
and infix zip, don't get an op= variant.
There's something nice in
$foo = 42;
$foo |= .bar for @quux;
as an alternative for
$foo = any 42, @quux.bar;
though
I had always assumed (e.g. in
On 8/31/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Hi,
@array = $scalar;# really means
@array = ($scalar,); # same as
If list construction is via the infix:, operator, does that mean a
blasphemous sinner could create infix:,= as a synonym
On 01/09/05, Ashley Winters [EMAIL PROTECTED] wrote:
If list construction is via the infix:, operator, does that mean a
blasphemous sinner could create infix:,= as a synonym for push?
If the self-assignment metaoperator works the way I think it does[1],
then you shouldn't even need to create
Ashley Winters skribis 2005-09-01 0:58 (-0700):
If list construction is via the infix:, operator, does that mean a
blasphemous sinner could create infix:,= as a synonym for push?
You could do that even without , being a list constructor.
However, in general, chained operators like comma,
Stuart Cook skribis 2005-09-01 22:49 (+1000):
[1] i.e. magically applies itself to any valid infix operator, just
like »« and [] do
, is not a normal binary infix operator. It's not even binary, although
it can of course be used with only two operands.
Juerd
--
Hi,
@array = $scalar;# really means
@array = ($scalar,); # same as
@array = (); @array[0] = $scalar;
# Correct?
@array = $arrayref; # really means
@array = ($arrayref,); # same as
@array
[EMAIL PROTECTED] skribis 2005-08-31 15:50 (+):
I think this deserves at least a compile time warning and also a
strict pragma to make it an error as it is most likely not what the
programmer wanted.
I do not think that using a scalar in list context deserves a warning.
Juerd
--
I think this deserves at least a compile time warning and also a strict pragma
to make it an error as it is most likely not what the programmer wanted.
--
Mark Biggar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Ingo Blechschmidt skribis 2005-08-31 13:22 (+):
@array =