Thread: Stripping URL's in Perl

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    351

    Stripping URL's in Perl

    Hi all,

    Does anyone know of a module (or other method) of stripping URLs out of a file?

    I want to pass a file to a function that strips out all the URLs and returns them in an array. This must have been done before.

    Any ideas,

    TIA, rotis23

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    351
    I've found that a part of the HTML-Parser module, called HTML::LinkExtor can do this, but only with HTML.

    I can't find one that will work with any type of file.

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Perl has great regular expression support, why not use those.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    Registered User Casey's Avatar
    Join Date
    Jun 2003
    Posts
    47
    >>Does anyone know of a module (or other method) of stripping URLs out of a file?
    Yea, CPAN has a module called HTML::LinkExtor that'll do what you want.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Language - When To Use What?
    By tjinr in forum A Brief History of Cprogramming.com
    Replies: 36
    Last Post: 08-06-2006, 02:04 AM
  2. C++ v's Perl
    By kmcghee in forum C++ Programming
    Replies: 8
    Last Post: 08-13-2005, 10:37 AM
  3. perl program question
    By newbie2c in forum Tech Board
    Replies: 2
    Last Post: 02-03-2003, 10:19 AM
  4. From Perl to C
    By Heavenstrash in forum C Programming
    Replies: 4
    Last Post: 06-19-2002, 01:22 AM
  5. perl need help pls.....
    By magnum38 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-12-2001, 10:35 PM