geekchick: (d'oh!)
geekchick ([personal profile] geekchick) wrote2005-10-18 02:48 pm
Entry tags:

Duurrrr...

I just spent 15 minutes trying to figure out why my code just wouldn't make a connection to the SMTP server.
my $confirmation = Net::SMTP->new(Host => $smtpserver,
                                  Hello => $domain,
                                  Timeout => 30,
                                  Debug => 1);
die "Couldn't connect to server" unless $smtp;


*facepalm* Yeah, a little bit braindead today I think.

[Edit: And hey, look! My domain registration expired. In my defense, I have never seen a single notification letter or email about it. All set for the next two years though.]

[identity profile] stitchinthyme.livejournal.com 2005-10-18 09:56 pm (UTC)(link)
That's why I usually write something like:

my $confirmation = Net::SMTP->new(blahblahblah) || die "couldn't connect to server";

Less readable, but harder to mess up. :-)