Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^5: HTML::Parser / Regex

by shmem (Chancellor)
on May 27, 2017 at 12:13 UTC ( #1191361=note: print w/replies, xml ) Need Help??

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:

  • get the tarball
  • unpack it to some directory (e.g. C:\\Users\me\Desktop\perl)
  • set the environment variable PERL5LIB to include C:\\Users\me\Desktop\perl\Regexp-Common-2016020301\lib
  • run your perl program which uses Regexp::Common
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:  <%-{-{-{-<

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1191361]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2023-12-11 18:06 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.