Empty lines in a files using Perl
I am working on a BioInformatics assignment and I am using Perl to parse a few input files. I am new to Perl. Here is my question:
I am using this to parse the lines:
($ID, $Rest) = split ( " ", $_, 2);
The first variable is an ID and the rest of the line is a description.
My problem is when a line is blank or empty. My program terminates giving this error:
use of unitialized string in concatenation . or string a line 33.
I get one of these for every line that is blank. Can anyone tell me how to just ignore blank lines?