|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Overriding built-insby chas (Priest) |
| on Jun 01, 2005 at 14:26 UTC ( [id://462592]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.chas has asked for the wisdom of the Perl Monks concerning the following question:
I thought I could override a built-in by using the subs pragma as in:
However, the result is just to print "bla". I wonder why the print function wasn't overridden. (BTW, if I replace the 1st, 2nd, and 4th occurrences of "print" with "shift", i.e. everywhere except in "CORE::print", then the shift function is overridden.) Thanks for any comments! chas
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||