perl_mystery has asked for the wisdom of the Perl Monks concerning the following question:

Currently I am using the following script which uses ipc run3 to run a command,I noticed that it uses lot of "pm" files eating lot of run-times when the file is large,is there a better way to run a command to reduce the run-time?

use IPC::Run3; foreach my $file (@files) { my $savefile = $file; $cmd = [ (qw(p4 where), $file) ]; run3($cmd, \$stdin, \$stdout, \$stderr); if ($stderr =~ /file\(s\) not in client view/) { push @branched_paths,"$savefile"; } }

Replies are listed 'Best First'.
Re: Is there a faster way to run a command than use IPC::Run3
by Anonymous Monk on Feb 21, 2011 at 05:15 UTC
    No.

      ok,then,can you suggest a way to keep the user engaged for 10mins?(apart from print statements)

        Wii, XBox, PlayStation, ...

        Alternatively you could reassess the way you are solving whatever problem it is you have written the script to solve. Maybe if you tell us something about what you are trying to do we can offer a quicker solution?

        True laziness is hard work