...Last update on 28/03/2005.
Perl
Perl goes so well with linux, it's fast and powerful, it would be a huge mistake to miss it.

  1. Tutorial
  2. DBI
  3. Post Request
  4. Database Management, DBI
  5. Cron
  6. Ftp
  7. File I/O
  8. Email - Send
  9. Errors
chmod u+x file.pl

ex of file:

Bases:
Perl Intro
Strings and Increments

Intuitive way to teach:
if ($num1 == $num2)
if ($String1 eq $String2)

The Comparison Operators Listed

The rest of the operators are:

This is the Database tool.

Installation from source.

DBI

and follow the readme to install everything

perl Makefile.PL
make
make test
make install

Then the DBD module for mysql.
CPAN

And idem:
perl Makefile.PL
make
make install

De la balle !!

More info: Cpan, DBD

You will need that library:

Cpan, perl

then URI

Cpan, URI

then MIME-base64
Mime

then HTML-Parser-3.36
Cpan, HTML

then libnet-1.19
Cpan, libnet

then Digest-MD5-2.33
Cpan, Digest

Install everything but at last only that libwww-perl

perl Makefile.PL
make
make test
make install

Ex.: get the IP then send it to DB mysql
need DBI module + lib mysql handling with DBI.

- UPDATE :

- SELECT :
Mysql-script

Let's do a cron job with that perl function:

First check :

# crontab -e

then issue:

# mkdir /etc/cron.hourly

then create an exe into that dir. i just put that last perl script in it.

# cp intoIP.pl /etc/cron.hourly

- View Current Crontab

# crontab -l

and check logs into:

# more /var/log/crond

Ftp

that lib is already there hihi..

- Few commands:

put ( LOCAL_FILE [, REMOTE_FILE ] )

File i/o

Read a file:

Write to file:

Net SMTP

If you need Auth for accessing your smtp server then you ll need Net-SMTP_auth-0.07 :

This module requires:

- Net::SMTP (should be obvious)
- MIME::Base64
- Digest::HMAC_MD5 : Digest-HMAC-1.01
- Authen::SASL : Authen-SASL-2.08

Install:

perl Makefile.PL
make
make test
make install

Beware using auth with : AUTH methods PLAIN, LOGIN or CRAM-MD5

Ex:

- CHINESE CHAR :

Look at MIME-tools 5.503 but assume that every chinese computer scientist know english(at least writing and reading huh !).

- Several people in the same time :

SMTP

recipient ( ADDRESS [, ADDRESS [ ...]] [, OPTIONS ] )

Notify the server that the current message should be sent to all of the addresses given. Each address is sent as a separate command to the server. Should the sending of any address result in a failure then the process is aborted and a false value is returned. It is up to the user to call reset if they so desire.

The recipient method can some additional OPTIONS which is passed in hash like fashion, using key and value pairs. Possible options are:

Notify =>
SkipBad => ignore bad addresses

If SkipBad is true the recipient will not return an error when a bad address is encountered and it will return an array of addresses that did succeed.

to ( ADDRESS [, ADDRESS [...]] )
A synonym for recipient.

The solution:
From the command line we have : mail1@dom.com,mail2@dom.com,mail3...

Ex. bad interpreter: no such file or dir...
and other unmeaningfull errors
JUST get yourself sthg like TEXTPAD under windows and save your files in the unix format !, thatshould do all the tricks.