Dollar Ampersand

Dollar-Ampersand is a variable in perl that is treated differently (arent they all?). If this, or dollar-backquote, or dollar-forwardquote are mentioned in a program they are instantiated and used, at great cost to your running time. Up to perl 5.003 or so the penalty was an extra 50% on the running time of some code I wrote to time this effect; later perls have this down to about 10%. Sometimes 10% matters - 50% nearly always does.

This is most unfortunate if you get suckered into using the 'English' module, which instantiates these in order to give them an alias. I submitted a patch that would have allowed you to do 'use English qw(:fast);' (the SimplestThingThatCouldPossiblyWork) to avoid the penalty, but this was rejected in favour of making the 'English' names magic too, slated for a later version (it might even be in perl 5.6). In the meantime, cryptic names are still recommended.... --BrianEwins


Last edited March 26, 2000
Return to WelcomeVisitors