...sub print { print $value unless $value eq '-'; }
Incidentally, why does this print sub [not] simply call itself recursively??
Its a namespace problem (feature? artifact?). Your new print is defined in main and the built-in print is defined in CORE and the CORE namespace has search precedence. Try the following:
>perl -wMstrict -le "sub print { CORE::print('foo') } ::print; " foo >perl -wMstrict -le "sub print { ::print('foo') } ::print; " Deep recursion on subroutine "main::print" at -e line 1. Terminating on signal SIGINT(2)
In reply to Re^2: Entry Widget - validatecommand
by AnomalousMonk
in thread Entry Widget - validatecommand
by shortyfw06
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |