By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,616 Members | 2,426 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,616 IT Pros & Developers. It's quick & easy.

striptag

P: n/a
This used to strip only the given tags:
$ striptag font div < file.html
but now it strips all tags. Something must have changed on my system. Help.
$ cat striptag
use strict;
use HTML::Parser;
my $parser = HTML::Parser->new( text_h => [ sub { print shift; },"dtext" ]);
$parser->parse_file(*STDIN);
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Dan Jacobson <ji*****@jidanni.org> wrote in message news:<87************@jidanni.org>...
This used to strip only the given tags:
$ striptag font div < file.html
but now it strips all tags. Something must have changed on my system. Help.
$ cat striptag
use strict;
use HTML::Parser;
my $parser = HTML::Parser->new( text_h => [ sub { print shift; },"dtext" ]);
$parser->parse_file(*STDIN);


You probably deleted the code that handles the command line arguments.
Nowhere do I see special handling of ARGV which in this case is font
and div.

++imanshu
Jul 20 '05 #2

P: n/a
"Himanshu Garg" <hi******@gdit.iiit.net> wrote in message
news:a4**************************@posting.google.c om...
Dan Jacobson <ji*****@jidanni.org> wrote in message

news:<87************@jidanni.org>...
This used to strip only the given tags:
$ striptag font div < file.html
but now it strips all tags. Something must have changed on my system. Help. $ cat striptag
use strict;
use HTML::Parser;
my $parser = HTML::Parser->new( text_h => [ sub { print shift; },"dtext" ]); $parser->parse_file(*STDIN);


You probably deleted the code that handles the command line arguments.
Nowhere do I see special handling of ARGV which in this case is font
and div.


or more likely, you have another version of the script lying around,
that deals with the tag selection.

gnari

Jul 20 '05 #3

P: n/a
OK, done: http://jidanni.org/comp/striptag
striptag -- strip given tags out of HTML
Usage example: striptag font div < file.html
Jul 20 '05 #4

P: n/a
OK, done: http://jidanni.org/comp/striptag
striptag -- strip given tags out of HTML
Usage example: striptag font div < file.html
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.