{ local $/; # undefs $/ for this block of code only open (FILE," $htmlfile") || die "Cannot open HTML file for parsing!: $!\n"; $content = ; # reads in whole file $content =~ s/\n/\n\n/g; # if really necessary to duplicate newlines close(FILE); }