[Israel.pm] Perl from command line
Sagiv Barhoom
sagivba at 012.net.il
Mon Mar 28 12:14:21 PST 2005
hi all,
I am trying to process html file using Perl from command line/
I have lines:
<br>
<p>
<br>
some text...
<br>
another text...
</p>
<br>
<h2>
...
</h2>
and I want them to become:
<p>
some text...
<br>
another text...
</p>
<h2>
I have tried :
perl -i.bk -p -e "s/<br>(\s*)</\1</g"" my_file.htm
but it does not work (I think that perl reads the file line by line, so it does not recognize pattern on multi lines, but I am not sure).
any ideas?
Sagiv
More information about the Perl
mailing list