in reply to blank line in array printing
next if(/^#/g); next if(/^\n/g);
Also, you check for empty lines, but not for lines that contains nothing but spaces.
How about:
while(<IFH>) { s/#.*//; if (s/\\\s*$//) { $_ .= <IFH>; redo; } s/^\s+//; s/\s+$//; next if !length(); $line .= $_; }
|
|---|