Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Batch remove URLs

by haukex (Bishop)
on Oct 27, 2017 at 07:12 UTC ( #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
Node Status?
node history
Node Type: note [id://1202123]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2021-04-21 22:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?