I'm interested in hard problems.
Recently, I've started thinking a lot about what CP6AN might look like.
Class::MOP and the Perl 6 Metamodel make me more excited than I'd like to admit.
Also expect occasional wordy technology-related rantings.
Step up, one and all, and see me modify a simple scalar only by reading it. Nothing up my sleeves.
my ($num, $let, $foo);
$num = "z";
$let = $num;
#$foo = 1 + $num; #this does not modify $num
print "num:$num let:$let\n";
Output with 1+$num line uncommented:
This means we have a line that makes no assignment to a variable, but still changes that variable.
Critics will call this dangerous and unexpected action at a distance. Proponents will note that a warning is triggered, read-only statements are still an indication of What You Mean, and that this probably makes excellent fodder for obfus.
Admittedly, this is (sorta) documented. Perlop mentions "If, however, the variable has been used in only string contexts since it was set," the ++ operator acts differently.