in reply to Re: Removing white-lines...in thread Removing white-lines...
open my $my_filehandle, $file || next; means open my $my_filehandle, ($file || next); which is quite wrong.