I am trying to parse an html file. But unable to remove spaces using \s (matching character for whitespace)
use strict; use warnings; open(FILE,"<paragraph.txt")|| die "Can't open para.txt"; my @file = <FILE>; my $all = join("",@file); $all =~ s/\n/ /g; $all =~ s/\./\. /g; $all =~ s/\s\s*/ /g; open (FIL,">paraone.txt")||die "Can't open para.txt"; print FIL $all; close(FILE); close(FIL);
I hava attached the paragraph.txt which contains spaces that are not removable.
<p style='text-align:justify'> this space Confusion and ensuing controversy also arose from the PANDAS