Looking through the table provided, I ran across the following:
$_ $xType of Match ImpliedMatching Code
== = ==
HashHash hash keys identical match if $_.keys.sort
»eq« $x.keys.sort
My understanding is that a
> Yes. He also accepted the proposal to add min and max operators -
> although I'm unsure why they weren't included as functions/methods
> instead. It seems more natural to me to say 'max($a, $b, $c)' or
> '($a, $b, $c).max' instead of '[max] $a, $b, $c' or '$a max $b max
> $c'. Although it _doe
On Wed, Nov 15, 2006 at 10:28:41AM -0600, Jonathan Rockway wrote:
: For reference, this sort of operation works if you write it on two
: lines, like:
:
: my ($a, $b);
: ($a, undef, $b) = 1..3;
: say "$a is 1 and $b is 3";
:
: I'll look around in the source and see if I can make this w
Vincent Foley wrote:
> Hello everyone,
>
> I was toying around with Pugs and I tried the following Perl 5 list
> assignment
>
> my ($a, undef, $b) = 1..3;
>
> Which gave me the following error message:
>
> Internal error while running expression:
> ***
> Unexpected ","
> expecting
Smylers wrote:
Didn't Larry actually accept Darren's proposal and add the C and
C operators?
Yes. He also accepted the proposal to add min and max operators -
although I'm unsure why they weren't included as functions/methods
instead. It seems more natural to me to say 'max($a, $b, $c)' or
'(
Mark J. Reed wrote:
> I distinctly recall having to do things like (my $a, undef, my $b) to
> avoid errors because you can't assign to undef. Maybe I'm just
> hallucinating.
Maybe :)
$ perl -Mstrict -e 'my ($a, undef, $b) = 1..3; print "$a $b\n";'
1 3
This works as far back as v5.6.0 (which is
> (my $x, undef, my $y) = 1 .. 3; parses to my ($x, undef, $y) = 1 .. 3
> and always has as far as I know, so please share your hallucinogens
> with the list:)
>
Sadly, the hallucinogens are essential, not external. But I'm pretty
sure those are two different parse trees.
They have the same B:
TSa writes:
> ... one question remains that might actually make Duncan's proposal
> pointless.
Didn't Larry actually accept Darren's proposal and add the C and
C operators?
> Are the comparison operators available for overloading just like any
> other operator
Yes. This feature is used often e
HaloO Larry,
you wrote:
You guys should read The Search for the Perfect Language, by Umberto Eco.
It would disabuse you of the notion that perfect orthogonality is possible
or even desirable.
I'm sorry if my contributions to this thread are annoying. But one
question remains that might actuall