Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: HTML::Parser / Regex

by MissPerl (Sexton)
on May 27, 2017 at 08:52 UTC ( [id://1191356]=note: print w/replies, xml ) Need Help??


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

Hi there! I've tried to run the your code .

Can't locate Regexp/Common.pm in @INC (@INC contains: /tools/perl/5.8.8/linux32/lib/5.8.8/...)

Correct me if I am wrong, I've tried instmodsh for list modules. But I don't see Regexp::Common in the list.

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.

Replies are listed 'Best First'.
Re^5: HTML::Parser / Regex
by shmem (Chancellor) on May 27, 2017 at 12:13 UTC
    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'
      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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found