foreach my $in_fname (@ARGV) { ... }
$input_txt =~ s/\<script.*?\<\/script\>//igs; # remove code $input_txt =~ s/\<.*?\>//gs; # remove html tags $input_txt =~ s/\ / /gs; #   -> space $input_txt =~ s/\s{2,}/ /gs; # Remove extra spaces print $input_txt;
However, if they're there, then you can do the regex inside a while loop:<a href="" onClick="alert('< foo! >');"> not: <a href="" onClick="alert('< foo! >');"> Invalid HTML!
while( $input_txt =~ s/\<.*?\>//gs ) {};
In reply to Re: Simplify parsing a file
by saintly
in thread Simplify parsing a file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |