How can I delete the line?

A

A. Sinan Unur

Hello. This is Jong-Hyouk. I am a perl beginner. Today I wrote a wrong
perl program. I wanted to get the html file and then process some text
but it doesn't work well. I just want to print the article in the html
file.

Please, give me the best answer. The problem codes was shown

http://www.hurryon.org/index.php/hurryon/2006-02#5edefd248a68b15b986b51ac8c23bbd6

Unless this is a concious effort to drive traffic to your web site, it
is a very bad way to seek help with your problem.

Please read the posting guidelines for this newsgroup.

Sinan
 
H

hurryon

Oops, I made a mistake. Sorry...so I deleted my article but the url has
been yet because of your article. Could you deleted your article.
Anyway, thanks.
 
J

Jürgen Exner

hurryon wrote:

[See subject]

perldoc -q "delete a line":

"How do I change one line in a file/delete a line in a file[...]?"
Hello. This is Jong-Hyouk. I am a perl beginner. Today I wrote a wrong
perl program. I wanted to get the html file and then process some text
but it doesn't work well.

Are you trying to parse HTML by any chance? Then please see "perldoc -q
HTML":
" How do I remove HTML from a string?"
and the gazillions of previous postings about this topic.
I just want to print the article in the html
file.

No idea what you mean by this.
Please, give me the best answer. The problem codes was shown
[URL snipped]

Is there a specific reason why you don't post a minimal sample program that
exhibits the problem?

jue
 
A

A. Sinan Unur

Oops, I made a mistake. Sorry...so I deleted my article but the url has
been yet because of your article. Could you deleted your article.

Come again?
 
J

Joe Smith

hurryon said:
Oops, I made a mistake. Sorry...so I deleted my article but the url has
been yet because of your article. Could you deleted your article.

Your article did not get deleted from the server I'm using (giganews),
so it does not make any difference if A. Sinan Unur cancels his
article. The URL you posted will be archived more-or-less forever.

-Joe

#!/usr/bin/perl
# Purpose: Extracts just the text portions of an HTML document.
use strict; use warnings;
use HTML::parser ();
sub text_handler { print @_; } # Ordinary text

my $p = HTML::parser->new(api_version => 3);
$p->handler( text => \&text_handler, "dtext");
$p->parse_file(shift || "-") || die $!;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top