Welcome to the Monastery | |
PerlMonks |
Re: Create a built-in-like sub?by dragonchild (Archbishop) |
on Feb 11, 2002 at 13:30 UTC ( [id://144631]=note: print w/replies, xml ) | Need Help?? |
While the question was answered, there's also the point of using prototypes to allow for the bareword function call. (You were under use strict, right?) That would allow for you to use compress() as a bareword and have it "behave appropriately".
I think this was a 5.6+ feature. For what you go, I would write it as such: If you wanted it to handle an array, then some number of other values (sorta like push) ... And, there are symbols for pretty much everything else you'd want to do. ------ Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
In Section
Seekers of Perl Wisdom
|
|