in reply to non numeric data

true only when it has a non numeric data

I'd personally try this first:

if ($array_H[$i] =~ m/\D/ ) { block; }

where \D matches any one character that isn't 0..9.

Now empty strings and all-0-9-stuff pass, everything else enters the block.

Cheers, Sören

(hooked on the Perl Programming language)

Replies are listed 'Best First'.
Re^2: non numeric data
by tobyink (Canon) on Jun 24, 2013 at 14:10 UTC

    /\D/ matches 1.1, -4 and 1000000000000000 (depending on your CPU architecture).

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

      /\D/ matches 1.1, -4 and 1000000000000000 (depending on your CPU architecture).

      Good point, tobyink!

      Cheers, Sören

      (hooked on the Perl Programming language)