in reply to sql prompt not finding file

What you have should work provided:
  • my $sqlsource = mySql.sql is a typo (your missing the ; and "'s)
  • the file mySql.sql actually exist.
    Maybe you should check the file before using it like so ...
    #!/usr/local/bin/perl -w my $sqlsource = "mySql.sql"; if ( -r $sqlsource ) { open( SQLPLUS, "|sqlplus /nolog") or die "Can't rus sqlplus\n" ; print SQLPLUS <<SQL; connect USER/PASS\@SID \@$sqlsource SQL } else { print "$sqlsource is not readable\n"; }

    Plankton: 1% Evil, 99% Hot Gas.
  • Replies are listed 'Best First'.
    Re: Re: sql prompt not finding file
    by Jaki1980 (Novice) on Jan 16, 2004 at 15:53 UTC
      thanks all finally got it to work . As you mention, it was a mode issue. thanks