Keep It Simple, Stupid | |
PerlMonks |
Overriding built-insby chas (Priest) |
on Jun 01, 2005 at 18:26 UTC ( [id://462592]=perlquestion: print w/replies, xml ) | Need Help?? |
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
|
|