in reply to Re: Re: pulling information from a delineated text file using a subroutine
in thread pulling information from a delineated text file using a subroutine

I didn't really consider this option as I suppose I would never assign a product to ID 0. Zero isn't really a number, therefore why would I assign a product to a not-really-a-number ID? :P

Anyway, if you really did need part 0, then just change while (!$part || $part =~ /[^0-9]/) { to while (!defined $part || $part =~ /[^0-9]/) {. The only thing this will also change is if the user hits enter without entering anything, the program will exit. That's fine by my standards