The word prefix is still throwing me. I think a better term would be predicate. Again, the notation you propose would be ambiguous. In your example: my $href = \% <== foo => 1, bar => 2; That could either mean a hash whose first key is a hashref 'foo' or a reference to a hash with one key 'foo' followed by the comma operator and a two element list ( bar, '2' ). Although in the case provided it may be clear what you intended, the ambiguity increases if one were to attempt to nest operators:
Perl has no way of knowing you want 'passengers' to be in the same hash as 'ship' but instead you would end up with crew =>[Mal, Wash, Jane, Zoe, passengers, [Simon, Book]]Certainly not what was intended.my $ref = \%< ship => Serenity, crew => \@< Mal, Wash, Jane, Zoe, pas +sengers => \@< Simon, Book
In reply to Re^5: Half-serious quest for prefix anonymous refs taking
by starbolin
in thread Half-serious quest for prefix anonymous refs taking
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |