4
This perl subroutine uses the CPAN module Mail::Webmail::Gmail to iterate through a Gmail account searching for a particular string. If a match is found, the sender's name along with his/her email address, the subject, and the "blurb" is printed to standard out. Also, all messages found will be archived automatically within Gmail to clear the message from the inbox folder. The subroutine returns the number of messages found back to the calling environment.
Sample invocation: check_email(username, password);
By default, the subroutine will use encryption to connect to Gmail however, by setting encrypt_session to '0' will disable encryption.
Sample invocation: check_email(username, password);
By default, the subroutine will use encryption to connect to Gmail however, by setting encrypt_session to '0' will disable encryption.
2
This is as close to a perfect URL regular expression as I've come. It's based on RFC 3986.
A few caveats:
It only accepts http/https/ftp URLs by design, but you could change that to accept any valid URI pretty easily.
It doesn't support IP-based URLs or authenticated URLs. This is also by design, but you could change that with a little work.
A few caveats:
It only accepts http/https/ftp URLs by design, but you could change that to accept any valid URI pretty easily.
It doesn't support IP-based URLs or authenticated URLs. This is also by design, but you could change that with a little work.
5
This is a simple function to check if an email is valid or not.









