Perl script to load data by calling sqlldr

Hello all,
I know this is Unix forum, but i also know that there are some experts here who can help me out with this situation;

I am loading a data file into oracle table using Perl script by calling sqlldr script.

It does not do anything, and no data is getting loaded.

Any help, suggestion to make this script workable, would appreciate it.

Perl script;

#!/oracle/product/11.2.0/perl/bin/perl
#Checking the server to connect
if ($ARGV[0] eq 'QA')
{
$ENV{"ORACLE_HOME"} = "/oracle/product/11.2.0";
$LIBPATH = "/oracle/product/11.2.0/lib:/usr/lib";
$dbsid = 'mysid';
$dbuser = 'myuser';
$dbpwd = `/usr/local/pl/perlencrypt.pl -k /kda1/system/ealgorithm -d /sdr1/system/mysidmyuserpw`;
}

#Directories where input file exist (Please Use the Appropriate Directory structure)
my @inputdirectories = ('/MCS/MAINFRAME/REFERENCE');
#directory where files will be moved to after job execution.
my @outputdirectory = '/MCS/MAINFRAME/REFERENCE/Archive';
#File name and location of the text file
my @file = '/MCS/MAINFRAME/REFERENCE/2011030546845.MBT.A0MW9693.NDM.HBIDT.AD38XADJ.txt';
#Logfile location where it will reside
my @logFile= "/MCS/MAINFRAME/REFERENCE/Log";
#Control file location
my @control= "/MCS/MAINFRAME/REFERENCE/control/adjust_rsn_codes.ctl";
$status = system ("$SQLLDR $CONNECT control=$control data=$file log=$logFile");
#$dbh->disconnect;
close $FILE;

SQLLDR SCRIPT;

LOAD DATA
infile '/MCS/MAINFRAME/REFERENCE/2011031879382.MBT.A0TW9693.NDM.HBIDT.AD37XADJ.txt'
APPEND INTO TABLE ZX02051.ADJUSTMENT_REASON_CODES
TRAILING NULLCOLS
(REASON_CODE           CHAR,
  EFFECTIVE_DATE        CHAR,
  END_DATE              CHAR,
  MCS_CYCLE_BUILD_DATE  CHAR,
  CREATED_TIMESTAMP     DATE "DD/MM/YYY")

Try using full path of sqlldr. /oraclehome/bin/sqlldr

Thanks for the reply back praveen.
But i cant use the full sqlldr path directly in the script.

I can only run sqlldr as a system call.

Does anyone have a script, or can share thier PERL script to load the data into Oracle table using SQLLDR or directly inserting into the table without using SQLLDR?

Or you can even provide me with site, where i can find these examples.

Note: I have been trying various scripts to load teh data into the Oracle table with and without SQLLDR, but no success :wall:

I am getting frustruated...... Please help me out guyz..