Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Batch remove URLs

by haukex (Archbishop)
on Oct 27, 2017 at 07:12 UTC ( [id://1202123]=note: print w/replies, xml ) Need Help??


in reply to Batch remove URLs

using a find/replace one liner

Please see Parsing HTML/XML with Regular Expressions, I think a module like Mojo::DOM will be much more reliable.

As for batch processing, I'd suggest a module like File::Find::Rule or perhaps Path::Class's recurse method (although the find method you showed here works too, if your script only processes one file at a time).

For that list of 300 URLs, you could perhaps build a regex out of them which you could then use to search (after having safely parsed the file with one of the modules mentioned in the link above ;-) ). If you need advanced handling of URLs, use the URI module.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found