in reply to Argument "" isn't numeric in numeric le (<=)

* means zero or more times, and almost anything can match zero times, which is why one or more of $1 $2 $3 $4 is undefined

You probably want to investigate the BioPerl modules

  • Comment on Re: Argument "" isn't numeric in numeric le (<=)

Replies are listed 'Best First'.
Re^2: Argument "" isn't numeric in numeric le (<=)
by ikegami (Patriarch) on Aug 24, 2009 at 14:41 UTC

    No, not undefined. If the \d in /(\d*)/ matched zero times, $1 would be the empty string.

    You found the problem (since the OP is having problems with an empty string), it's just the description that's flawed.

    >perl -we"my $x = '' < 2" Argument "" isn't numeric in numeric lt (<) at -e line 1. >perl -we"my $x = undef() < 2" Use of uninitialized value in numeric lt (<) at -e line 1.
      My apologies ikegami, how ignorant of me to use undefined when clearly it wasn't numeric as per the OP.
Re^2: Argument "" isn't numeric in numeric le (<=)
by hotel (Beadle) on Aug 24, 2009 at 14:31 UTC

    Thank you very much, my little script works pretty fine right now. I should've checked it more carefully before posting such a thing. Thank you.