use strict; use warnings; use subs 'sleep'; my $total_sleep_time; sub sleep (;$) { $total_sleep_time += $_[0]; CORE::sleep($_[0]); } sleep(2); sleep(3); print $total_sleep_time;
In reply to Re: Copy a builtin sub to a different name and then override
by BillKSmith
in thread Copy a builtin sub to a different name and then override
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |