Created
August 4, 2013 06:46
-
-
Save nskeip/6149465 to your computer and use it in GitHub Desktop.
Shows all the links from stdin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
$text = <>; | |
@links = $text =~ m/href=\"([^\"]+)/g; | |
print join ("\n", @links), "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using regex for html parsing does not seem to be a good idea.
But at least it worked for me when I did not know lxml or beautiful soup or something... :)