in reply to Re^4: HTML::Parser / Regex
in thread HTML::Parser / Regex

As the Perl was installed in school's desktop, I dare not to make any changes for installing a new module, I did tried once, then got some permission denied error.

See Yes, even you can use CPAN

You will need an older version of Regexp::Common, since the newest one requires perl version 5.010 (v5.10.0) as minimum. Regexp-Common-2016020301 is the last release whose requirement is below 5.10.0 (it requires 5.00473).

You dont't even need to install it. Quick and dirty test setup:

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Replies are listed 'Best First'.
Re^6: HTML::Parser / Regex
by MissPerl (Sexton) on May 27, 2017 at 22:27 UTC
    Hi shmem, thanks for the steps. I am going to google it for a little bit as I am not too familiar with linux environment yet.

    At the mean time, is there any other method that I can achieve my goal? like storing the found or empty value into variables ?

      ... any other method ... storing the found or empty value into variables ?

      Did you take a look at the code here? (Update: Also here.) And if you need a quick-and-dirty replacement for  $RE{num}{real} from Regexp::Common if you have difficulty installing it, try
          my $rx_amount = qr{ (?> [-+]? (?: \d+ (?: [.] \d*)? | [.] \d+)) }xms;
      It's semi-tested and should be enough to move forward with.


      Give a man a fish:  <%-{-{-{-<