Varun,
I probably doesn't matter. I don't know about lsnrctl, but I do know that
sqlplus is a non-trivial program what is going to take a looooong time to
run compared to the system() call in Perl. So, there's no need to worry
about which one is faster--you'll never be able to see the difference.
Choose the backticks if you want to capture STDOUT easily.
Merrill
-----Original Message-----
From: Varun Seth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 4:57 PM
To: '[EMAIL PROTECTED]'
Subject: Newbie question: Efficient code
Hello,
I am new to Perl and am converting a batch file written to do a bunch of
things with Oracle to Perl.
The way I am converting it to Perl is to make bunch of system calls and
wondering if I can make it more efficient 'cause each call to system would
be expensive in terms of resources etc. Here's a sample:
system ("lsnrctl start"); or `lsnrctl start` ;
system ("sqlplus internal @xyz.sql"); or `sqlplus internal @xyz.sql`;
system ("lsnrctl stat"); or `lsnrctl stat`;
Now is this the best way to code or I can some how club 2 or more system
calls.
Thanks for your help
Varun
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users