sub is_const { !eval { ($_[0]) = $_[0]; 1; } } for (...) { if (is_const($_)) { ... } else { ... } }
In reply to Re: Detecting constant arguments passed to subroutines
by japhy
in thread Detecting constant arguments passed to subroutines
by dcd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |