in reply to Re: Re: Input validation
in thread Input validation

Sounds like you are concerned that you may have bad data, and asking us how bad it could be, which of course we have no way of telling.

If you want to check that split returns the number of fields you expect, just check it:

my @split_line = split(m"\|",$line); if (@split_line != 4) { warn "something gang aft"; } else { print "valid data!"; }