in reply to Re: Re: Input validation
in thread Input validation
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!"; }
|
|---|