Created
July 11, 2018 22:22
-
-
Save sodonnell/a9b7d0bfa4527924b2d0a3b846379e9d to your computer and use it in GitHub Desktop.
print pQuery->get($url)->title;
This file contains 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 | |
use strict; | |
use warnings; | |
# install pQuery: | |
# sudo cpanm pQuery; | |
use pQuery; | |
my $url = "https://github.com/sodonnell/plowbot/"; | |
print "URL: ". $url ."\nTitle: "; | |
print pQuery->get($url)->title ."\n"; | |
# much easier than using LWP+regexp. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment