MySpace is all the rage, and with it comes the usual volley of tricks and hacks. Take control of your MySpace account without ever having to log in by using the WWW::Myspace perl module to automate things. Once you give it a username and password, you can use WWW:Myspace to login, check and reply to messages, add friends and practically anything you can do by hand.
More Perl Quick Tips
First, like all non-standard Perl modules, you will need to install WWW::Myspace from CPAN, and then you can include it at the top of your Perl programs with the use statement:
use WWW::Myspace;After that, creating a MySpace object is as simple as logging in:
my $myspace = WWW::Myspace->new($account, $password);Let's say you want to get a list of all your friends, or the HTML profile of one of your friends.
@friends = $myspace->get_friends;You can even automatically post messages to your friends profiles.
foreach (@friends) {
$friend = $myspace->get_profile($_);
print $friend->content;
}
$result = $myspace->post_comment(FRIEND_ID, 'Howdy, folks!');Download it and give it a try. No good Perl hacker should have to do things that could easily be automated! Module Links:
