Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Shankar Kris <kris at japan dot sbi dot com>
Subject: Re: Sybperl query
Date: Nov 21 1995 1:38PM

On Tue, 21 Nov 1995, Mark Lonsdale - System Services wrote:
> What I want to do  within my script is to log into 2 different servers which
> are referenced in 2 seperate interfaces files.  I assumed that sybperl would
> look for the interfaces file in the location specified by the SYBASE variable.
>  Assuming this what I have done is as follows :-
> $ENV('SYBASE')="/tmp/firstlocation";
> $firstconnection=&dblogin($user, $password, $firstserver)
> $ENV('SYBASE')="/tmp/secondlocation";
> $secondconnection=&dblogin($user, $password, $firstserver);

  shouldn't this be,
  $ENV{'SYBASE'} = "....";
  $firstconnection =.....

  probably your script never read the SYBASE env thru your program
  but read the value from a previously set environment.
> What happens is is that it cannot find the second server entry in the
> interfaces file as it is still looking in the first interfaces file (i.e. It
> doesn't seem to have picked up the change in variable).  I am using perl v4.0
> on SunOs 4.1.3

  Hope this helps,

                Krish Shankar
         'the quieter you become, the more you are able to hear'