in reply to Perl doesn't give error when module is not found
If a sub named Dumperrrrrrrrrr exists, then
meansprint Dumperrrrrrrrrr $myvar;
print( Dumperrrrrrrrrr( $myvar ) );
But there is no sub named Dumperrrrrrrrrr, so
meansprint Dumperrrrrrrrrr $myvar;
print( Dumperrrrrrrrrr $myvar ); # File handle and thing to print.
print tries to write to Dumperrrrrrrrrr, but no file handle is associated with that symbol, so it returns false.
You can use no feature qw( bareword_filehandles ); (5.34+) to detect these errors. use v5.38; (5.38+) also does the trick (plus more).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: No error from typo [was: Perl doesn't give error when module is not found]
by Jenda (Abbot) on Mar 27, 2024 at 17:20 UTC | |
by ikegami (Patriarch) on Mar 27, 2024 at 23:59 UTC |