Skip to content

Instantly share code, notes, and snippets.

@abuzarhamza
Last active August 29, 2015 13:58
Show Gist options
  • Save abuzarhamza/10056922 to your computer and use it in GitHub Desktop.
Save abuzarhamza/10056922 to your computer and use it in GitHub Desktop.
#override the core subroutine (inbuilt function) of perl
BEGIN {
*CORE::GLOBAL::chdir = sub {
print "perl core funtion override sample";
}
*shove = \&CORE::push;
}
chdir ;
# CORE::chdir #"Still u can access the core function using this way\n";
shove @arr,1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment