develooper Front page | perl.perl6.language | Postings from October 2001

TIMTOWT concat / hypo-operators

Thread Next
From:
Edwin Steiner
Date:
October 6, 2001 13:45
Subject:
TIMTOWT concat / hypo-operators
Message ID:
y9moq4ka.fsf@gmx.net

Hello!

Is this going to concat $a,$b and $c?

	$foo = _($a,$b,$c);

(One way to save underlines and spaces.)
Or would that be:

	$foo = _@($a,$b,$c);

BTW: what will these do?

	$a _=_ ($b,$c);

	$a ^_= ($b,$c);  # (better with hypo-operator?, see below)

(WIM in Perl 5: $a .= $b.$c ?)

Could there also be *hypo*-operators, i.e. operators which try to
*lower* (reduce) the dimensionality of their operands to the lowest
common dim. So

	$foo = 5 +^ (1,2);

would set $foo to (5 + 1) + 2 and

	$foo = $a _^ ($b,$c);
	$a _=^ ($b,$c);

would do the same concats as above respectively?
Another application:

	$sum = 0 +^ @values;

Granted: ^ is not the best choice for a meta-operator which lowers
something. :)

-Edwin


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About