I would assume your data is not what you think it is:
--#!/usr/bin/env perl use strict; use warnings; my @array_H = ( 'ABCD', 1234, '1234', ' 1234' ); foreach my $ele ( @array_H ) { if( $ele !~ /^[0-9]+$/ ) { block( $ele ); } } sub block { my $ele = shift; print "Woot -- $ele --\n"; }
Woot -- ABCD -- Woot -- 1234 --
In reply to Re: non numeric data
by derby
in thread non numeric data
by torres09
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |