in reply to Hook::LexWrap and core functions
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, @_); }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hook::LexWrap and core functions
by Alien (Monk) on Sep 19, 2008 at 22:43 UTC | |
by ikegami (Patriarch) on Sep 19, 2008 at 22:48 UTC | |
by Alien (Monk) on Sep 19, 2008 at 23:13 UTC | |
|
Re^2: Hook::LexWrap and core functions
by blazar (Canon) on Sep 21, 2008 at 10:58 UTC |