First make sure you can override it
>perl -wle"print( prototype( 'CORE::chomp' ) )" Use of uninitialized value in print at -e line 1. <- Can't >perl -wle"print( prototype( 'CORE::push' ) )" \@@ <- Can
Then go ahead and do it:
BEGIN { *CORE::GLOBAL::push = sub(\@@) { my $array = shift(@_); print("Pushing\n"); return CORE::push(@$array, @_); }; }
In reply to Re: Hook::LexWrap and core functions
by ikegami
in thread Hook::LexWrap and core functions
by Alien
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |