You need to install the Oracle client software, and configure the networking (tnsnames.ora file). Make sure you can connect using SQL*Plus first.
Once that is successful, make sure that DBI and DBD::Oracle are installed correctly (make test).
Then, post your script and the errors that you are receiving.
Good Luck!