I guess that the call to sqrt gets compiled to CORE::sqrt before the interpreter processes your subroutine declaration. You can get the warning about the ambiguity if you declare your subroutine before calling sqrt (I got rid of the percent format because it breaks shell syntax on Linux):
That prints:perl -wle "sub sqrt { return q(more than 1.4) } print sqrt(2);print ma +in::sqrt(2); print CORE::sqrt(2);"
Ambiguous call resolved as CORE::sqrt(), qualify as such or use & at - +e line 1. 1.4142135623731 more than 1.4 1.4142135623731
In reply to Re^2: PDL and srand puzzle
by haj
in thread PDL and srand puzzle
by syphilis
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |