I have taken care of these types of site specific problems
by using autoconf. I believe perl configure might be a good (or better) solution
But I am not that familiar with it. Here's a quick start on autoconf. Autoconf has a lot of documentation.
LameNerd@maxtrix6 ~/scripts_IN/conf_test $ ls -l total 2 -rwxrwxrwx 1 LameNerd None 320 Jul 8 11:47 configure. +ac -rwxrwxrwx 1 LameNerd None 231 Jul 8 11:48 test.in LameNerd@maxtrix6 ~/scripts_IN/conf_test $ cat configure.ac AC_INIT( test, 1.0 ) dnl AC_DEFUN([AC_ORACLE_HOME],[dnl AC_MSG_CHECKING(Checking for oracle home) if test -z "$ORACLE_HOME"; then AC_ERROR(No oracle home env var) else AC_MSG_RESULT(ok) AC_SUBST( ORACLE_HOME, "$ORACLE_HOME" ) fi ])dnl dnl AC_ORACLE_HOME( ORACLE_HOME ) AC_OUTPUT( [ test] ) LameNerd@maxtrix6 ~/scripts_IN/conf_test $ cat test.in #!/bin/sh #################################################### ### This script is intended as a example of how to ### use autoconf to determine ORACLE_HOME. #################################################### @ORACLE_HOME@ LameNerd@maxtrix6 ~/scripts_IN/conf_test $ autoconf LameNerd@maxtrix6 ~/scripts_IN/conf_test $ ls -l total 65 drwxr-xr-x+ 2 LameNerd None 0 Jul 8 11:48 autom4te.c +ache -rwxrwxrwx 1 LameNerd None 64409 Jul 8 11:48 configure -rwxrwxrwx 1 LameNerd None 320 Jul 8 11:47 configure. +ac -rwxrwxrwx 1 LameNerd None 231 Jul 8 11:48 test.in LameNerd@maxtrix6 ~/scripts_IN/conf_test $ ./configure checking Checking for oracle home... ok configure: creating ./config.status config.status: creating test LameNerd@maxtrix6 ~/scripts_IN/conf_test $ ls -l total 90 drwxr-xr-x+ 2 LameNerd None 0 Jul 8 11:48 autom4te.c +ache -rw-rw-rw- 1 LameNerd None 3630 Jul 8 11:49 config.log -rwxrwxrwx 1 LameNerd None 19840 Jul 8 11:48 config.sta +tus -rwxrwxrwx 1 LameNerd None 64409 Jul 8 11:48 configure -rwxrwxrwx 1 LameNerd None 320 Jul 8 11:47 configure. +ac -rw-rw-rw- 1 LameNerd None 227 Jul 8 11:49 test -rwxrwxrwx 1 LameNerd None 231 Jul 8 11:48 test.in LameNerd@maxtrix6 ~/scripts_IN/conf_test $ cat test #!/bin/sh #################################################### ### This script is intended as a example of how to ### use autoconf to determine ORACLE_HOME. #################################################### d:\Oracle\Ora81 LameNerd@maxtrix6 ~/scripts_IN/conf_test $

In reply to Re: setting oracle home globally through perl by LameNerd
in thread setting oracle home globally through perl by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.