in reply to Parsing in perl

The "uninitialized value in split" error is probably due to empty lines in your input.