Anand,
There are at least 2 ways to run a Unix command from Perl:
system('ls'); # ls output to stdout
$ls = `ls`; # ls output stored in $ls
I seldom use 'system' but the backtick method is very handy and I believe
works with any executable, not just Unix commands.
Regards,
Tim
-----Original Message-----
From: Anand Kumar [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 10:58 PM
To: [EMAIL PROTECTED]
Subject: Unix command in Perl
Hi,
I had to issue a UNIX command "source DBINST* " from a
perl program.
I was using OPS$ account in perl DBI. Soon after I
login using system account it will point to default
database. Now I want to issues some unix command on
the commandprompt to direct the sqlplus / to the
Database of my need.
so I need to run these two command from perl program.
chdir("/oracle"); -- for changing the dir to Oracle
"source ora_INST" -- for pointing the OPS$accnt to
database INST
how can I run these unix commands in a perl program?
Any kind of help is Appreciated!
Anand
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com