[Israel.pm] Running SQLplus within perl

Prager, Mark Mprager at ndsisrael.com
Wed Oct 13 06:48:03 PDT 2004


1. thanks
2. I dont think that helps - the problem is not the local directory - I have that set in my remote command -
the problem is that if I run from rsh the sqlplus thru system - it produces no output.
If I run from rsh any other command ( e.g. ls ) thru system - then this works ok.

mp

|-----Original Message-----
|From: Jason Friedman [mailto:jason.friedman at weizmann.ac.il]
|Sent: Wednesday, October 13, 2004 3:43 PM
|To: Prager, Mark
|Cc: perl at perl.org.il
|Subject: Re: [Israel.pm] Running SQLplus within perl
|
|
|
|> However, if I try to run it via rsh - i.e. rsh host -l 
|username "./topscript.pl" then the SQL does not run.
|
|I think that in general the current directory is NOT preserved when you
|run via rsh, so you will need to first change to the current directory
|(assuming you have a shared home directory across the two machines). I
|do something like this:
|
|use Cwd;  
|my $cwd = cwd;  
|my $commandline = "rsh $remotecomputer \"cd $cwd;someprogram\"";
|system($commandline) == 0
|   or die "system $commandline failed :$?";
|
|Anyway, does it work if you run it not inside perl?
|
|Jason
|
|> 
|> So my questions are thus:
|> 
|> 1. Why ?
|> 2. Is there a better way of using the perl to run SQL plus 
|rather than the systemcommand ?
|> 
|> Best Regards,
|> 
|> Mark Prager
|> I & T Engineer, Project Delivery
|> Binyan Mercazim, Room 514
|> NDS Technologies Israel Ltd.
|> 
|> 
|
|
***********************************************************************************
Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster at nds.com and destroy the original message.
***********************************************************************************




More information about the Perl mailing list