in reply to Re: non numeric data
in thread non numeric data

ya i figured that out , there is a possibility that numbers having - sign are not being blocked so I modified by code . please tell if it is fine or not

if (($array_H[$i] !~ /^[0-9]+$/) &&($array_H[$i] !~ /^-+$/))

I am new to perl so please pardon me for obvious mistakes

Replies are listed 'Best First'.
Re^3: non numeric data
by hdb (Monsignor) on Jun 24, 2013 at 13:06 UTC
Re^3: non numeric data
by hdb (Monsignor) on Jun 24, 2013 at 13:15 UTC
Re^3: non numeric data
by BillKSmith (Monsignor) on Jun 24, 2013 at 14:59 UTC
    Depending on the source of your data, it may have whitespace (especially a newline) at the end.
    Bill