Non-numeric strings evaluate as zero when used in arithmetic.
That is to say: perl did not error out in seek() because the seek to zero offset was successful.$ perl -lwe 'use strict; print int "NANNY"; print int "non-numeric";' Argument "NANNY" isn't numeric in int at -e line 1. nan Argument "non-numeric" isn't numeric in int at -e line 1. 0
What is the reason for passing non-numeric offset? You will have to check the passed value yourself, or, better yet, fix the program logic to not pass a string where a number is expected!
In reply to Re: perl not going to error path
by Anonymous Monk
in thread perl not going to error path
by gupr1980
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |