Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Perl code example
Hello,
I'm looking for a Perl example passing parameters.
The code below has the userids and passwords hardcoded in clear text in the system line, parms 3 and 5 (five lines from the bottom), and the Oracle sid is hardcoded also. The code has to be changed to 1) read .pwd1 and .pwd2 files containing the passwords, and set a literal for the SID and substitute it at in the code.
I'm not a Perl coder, and would appreciate any information, hints, or links to the manual.
Thanks, Linda
#!/usr/local/bin/perl
#
use CGI qw(:standard);
#
$| = 1;
($sec,$min,$hour,$mday,$mmonth,$myear,$wday,$yday,$isdst) = localtime(time);
if ($myear < 99) {
$myear++;
}
$myear += 1900;
$mmonth += 1;
print header;
if (!param()) {
print start_html('dev02 QRX4 DB Refresh'),
h1('<center>dev02 QRX4 DB Refresh for Formulary qRx Version 4.0'), hr, "<body bgcolor=\"#ffff66\" text=\"#000000\"><br>", "Enter a date to start the Oracle database refresh script,<br>", "then hit <i>Submit</i> to kick off the refresh for that date.<p>", start_form, "Enter the target refresh date: ", textfield('day',$mday,2), textfield('month',$mmonth,2), textfield('year',$myear,4), p, submit('Submit'), end_form, hr;
# print "You entered :<p>";$mo = param('month');
$dy = param('day');
print "\n"; print "QRX4: Starting script with /opt/oracle/scripts/staging/cerebellum/refresh.sh $dy-$mo-$yr\n";