Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Perl code example

Perl code example

From: Hagedorn, Linda <lindah_at_epocrates.com>
Date: Mon, 17 Sep 2001 14:48:17 -0700
Message-ID: <F001.0039106C.20010917150022@fatcity.com>

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;

} else {
#    print "You entered :<p>";

    $dy = param('day');
    $mo  = param('month');
    $yr  = param('year');
    print "You are transferring all data modified on or after ", $dy, "-", $mo,"-", $yr, " to update";
   print  "\n";
 print "QRX4: Starting script with /opt/oracle/scripts/staging/cerebellum/refresh.sh  $dy-$mo-$yr\n";

    print "    print "<pre>";
    system "/opt/oracle/scripts/staging/refresh.sh gui4 pwd1 qrx4 pwd2 $dy-$mo-$yr dev02";
    print "</pre><hr>";
    print "
    print end_html;

} Received on Mon Sep 17 2001 - 16:48:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US