[ Create a new account ]
I've always liked that Perl has a .= operator but I've often wished for the reverse. Why isn't there something nice like $x ,= $y (meaning $x = "$y$x")?
$x .= $y # $x eq "$x$y"$x =. $y # $x eq "$y$x"
Reply to This
Get More Comments
Reply
Re (Score:1)
$x
$x =. $y # $x eq "$y$x"
Re:Re (Score:3, Insightful)
Source Filters? (Score:3, Insightful)
package Foo;
use Filter::Util::Call;
sub import {
my ($type) = @_
my $ref = []
filter_add(bless $ref)
}
sub filter {
my ($self) = @_
my $status = filter_read();
if (/\s+=.\s+/) {
s!^(\$[[:alnum:]_]+)\s+=.\s+(\$[[:alnum:]_]+)!$1 = $2 . $1!;
}
$status;
}
1;
Script:
use Foo;
my $foo = " World";
my $bar = "Hello";
$foo =. $bar;
print $foo . "\n";
$zog =.1;
print $zog;
Reply to This