Hi Anisha,
Anisha Parveen wrote:
From the explanations given by you,I doubt if the delay is caused due to the
fact that it is executed as a unix command. Rob had explained how it
works..So can that be the reason ?
If yes, I would like to hear few alternatives, so that I can try them.
My understanding of your problem is that there are two concerns of yours, both
of which are related. The first is that there is a noticeable delay with the
Solaris system compared to the Red Hat system. The second is that this delay
is about 1 second. Is this correct?
As for the first issue, is there a difference in the two machines that might be
important for us to know? Can you think of something?
As for the second issue, as Rob said, the command is being passed to a shell
which, honestly, 1 second is not unreasonable. Of course, the command you are
running matters, but for a larger program, I have seen a big speed penalty by
calling a program using a shell like this. I'm no expert here, but two
suggestions for you.
1) You might want to try a module in CPAN that does encryption without calling
a program via the shell. For example,
http://search.cpan.org/~lds/Crypt-CBC-2.22/CBC.pm
This is the first module I found; please search for others to see if another
one is better for your needs.
2) Check out IPC::System::Simple
(http://search.cpan.org/dist/IPC-System-Simple/lib/IPC/System/Simple.pm) which permits a
variant of "system" which no longer starts a shell. I'm in the process of
learning how to use this module, so I don't know if it will be faster...but it might be
worth a try.
Hope this helps!
Ray
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/