Can you tell me:
$_ = "#x";
my @a = qw/b c/;
foo /#(\w+)/, @a;
bar /#(\w+)/, @a;
quz /#(\w+)/, @a;
baz /#(\w+)/, @a;
Hint implies that it's already solvable.
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
Thanks for the comments, and I did think about it - but I think I want to keep the "trick question" aspect of the node for now ;-)
Also thank you for your other replies, that's certainly getting pretty tricky with the parsing!
Some people want debug functions to disappear without footprint in production.
Like with Smart::Comments but without source filter.
Try to find a way where changing the prototype of a function &dmp will turn the call to a no op.
Your bar /#(\w+)/, @a; is already quite close, but it's still involving a division. :)
Isn't this sufficiently clear?
use constant DEBUG => 0;
warn Dumper($myvar) if DEBUG;
> warn Dumper($myvar) if DEBUG;
clear but unnecessarily verbose.
and the warning will create runtime overhead, too :/
another edge case are empty arrays causing a division by zero...
fixed minor bug
Update: Sorry haukex, the spoilers did not work when I first tried to click on them. Now that I can see them, I understand your point.
Start selling my possessions on Ebay
sell parts of myself
Try selling my relatives
Lobby my boss for a pay-rise
Use my black credit card
Code the next killer app (in Perl, of course)
Code some killing app (using some evil programming language, of course)
Create my own crypto currency
Start a Ponzi scheme
Get a loan from my bank
Get the money directly from the bank
print the required money myself
Do something else (please specify)
Results (119 votes). Check out past polls.