User Profile

Collapse

Profile Sidebar

Collapse
szepesg
szepesg
Last Activity: Aug 24 '08, 01:51 PM
Joined: Jul 31 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • szepesg
    replied to Perl HTML Parser does not work
    in Perl
    Hello Guys,

    It was all my mistake. The file's name I wanted to parse was x.htm and not x.html.
    Sorry for bothering the forum.
    I am new to perl I thought that there is a much complex problem.
    Sorry again.

    Gábor
    See more | Go to post

    Leave a comment:


  • szepesg
    replied to Perl HTML Parser does not work
    in Perl
    Hello,

    This is the code I used:

    Code:
    #!/usr/bin/perl -w
       
     use strict;
     
    
     # define the subclass
     package IdentityParse;
     use base "HTML::Parser";
    
     open(OUT,">placid.html");
      
     sub text {
         my ($self, $text) = @_;
         # just print out the original text
         print OUT $text;
     }
    ...
    See more | Go to post
    Last edited by eWish; Aug 24 '08, 02:45 PM. Reason: Please use [code][/code] tags

    Leave a comment:


  • szepesg
    replied to Perl HTML Parser does not work
    in Perl
    I forgot to mention that if I am working with a much simpler file e.g. an HTML file that has only 5 or 6 rows then everything is fine.

    Gábor
    See more | Go to post

    Leave a comment:


  • szepesg
    started a topic Perl HTML Parser does not work
    in Perl

    Perl HTML Parser does not work

    Hi!

    If I want to parse this html file (e.g. copy it into an other file using HTML Parser) I only get an empty file.
    What am I doing wrong?
    Thank you for your answer in advance.

    Gábor
    See more | Go to post

  • szepesg
    replied to get the text out of an HTML code
    in Perl
    Hi,

    Sorry for disturbing the forum. Everything is clear.

    Gábor
    See more | Go to post

    Leave a comment:


  • szepesg
    replied to get the text out of an HTML code
    in Perl
    Hi,

    Thank you for your suggestion I started to get to know the HTML Parser but I have a question on it. This Parser have subroutines like: text, comment, start and end. And all of these subroutines have variables. My question would be: how can I print out the values of these variables? (I tried the simple e.g. "print $self" command but it returns: "HASH(0x8152b44 )".)
    Please help me. Thank you.
    ...
    See more | Go to post

    Leave a comment:


  • szepesg
    started a topic get the text out of an HTML code
    in Perl

    get the text out of an HTML code

    Dear All,

    There is an HTML code and I want to collect all the text from it for example: <code> text </code>.
    I thought this was simple: ... $line =~ /\>([^<>]+)\</g ... but this code just does not work.
    Please help me. Thank you.

    Gábor Szepes
    See more | Go to post

  • szepesg
    started a topic find something in a text
    in Perl

    find something in a text

    Dear Readers,

    The word "hide" appeares in a text several times. I want find one of them and then before it I want ot find the nearest unangle bracketed area to it (so an area without angle brackets). (This is an html code that I have to process. This is the reason for the angle brackets.)
    Thank you for you answer in advance.

    Gábor Szepes

    ps: if something is not clear ask me
    See more | Go to post

  • szepesg
    replied to how to count certain words
    in Perl
    Hello!

    Thanks. It is working.

    Gábor
    See more | Go to post

    Leave a comment:


  • szepesg
    started a topic how to count certain words
    in Perl

    how to count certain words

    Hello All!

    There is a text I want to process. The name Horch appeares 4 or 5 times. The question is: how can I count the number of appearences with a Perl program?
    Thank you for your answer in advance.

    Gábor Szepes
    See more | Go to post
No activity results to display
Show More
Working...