Archive for the ‘Perl’ Category

Future Adobeans Needed

Thursday, January 4th, 2007

Quick note:

  • Adobe needs some Perl developers urgently.
  • Also, proficient developers with 2+ years (upto 15… but 15+ is also good…) experience needed.

If you’re interested, shoot me a mail.


Update : The above two requirements are separate.

check_gmail

Monday, July 31st, 2006

I’ts amazing what you can whip up in just 15 minutes using CPAN (including reading the documentation).

!/usr/bin/env perl

use warnings; use strict;

=head1 INTRODUCTION

Checks if there are new unread messages in your GMail Inbox.

=head1 USAGE

$ perl check_gmail.pl
1       Swaroop C H     Looks like check_gmail.pl works

=cut

######## Configuration

Change this to your correct username.

use constant GMAIL_USERNAME => "username";

Change this to your correct password.

use constant GMAIL_PASSWORD => "password";

#### Don't change anything below this.

use LWP::UserAgent; use XML::Atom::Feed;

my $fetcher = LWP::UserAgent->new(); $fetcher->agent("check_gmail.pl/0.01");

my $request = HTTP::Request->new( 'GET' => "https://mail.google.com/gmail/feed/atom", ); $request->authorization_basic(GMAIL_USERNAME, GMAIL_PASSWORD);

my $response = $fetcher->request($request);

if (! $response->is_success()) { die("Unsuccessful in trying to talk to GMail"); }

my $content = $response->content; my $feed = XML::Atom::Feed->new(\$content); my @new_messages = $feed->entries();

my $i = 1; foreach my $message(@new_messages) { print join("\t", $i, $message->author->name, $message->title), "\n"; $i++; }

The End



Update : Baishampayan Ghose quickly jotted down a Python version of this script.

map(’perl’, ‘india’)

Sunday, July 16th, 2006

From the latest Perl.com newsletter* :

Did you know that the country with the second-largest number of Perl.com readers is India? That’s right! Greetings to everyone on the subcontinent; tell your friends about us.





  • It’s ironic that an O’Reilly site’s newsletter is not archived anywhere on the web.