mpolo has asked for the wisdom of the Perl Monks concerning the following question:
I've finally gotten sick and tired of OpenOffice.org taking over 30 seconds to open on my computer, when M$Word running uner Wine (Crossover) is near instantaneous.
Unfortunately, the Gnome OOOQuickstart project is still supporting only Gnome 2.2, so I decided to write a stupid, brute force solution (sort of) in Perl.
Here is my (basically working) code:
#!/usr/bin/perl use strict; while (1) { my $running=`ps ax|grep "soffice.bin -quickstart"`; if ($running !~ /openoffice/) { # don't match if only the "grep" is there sleep 5; # give the process time to end to avoid silly crashes... system("/usr/lib/openoffice/program/soffice.bin -quickstart -plugi +n"); } }
My question (given the category I posted under, you knew it was coming to this...) is what would be a "good" Perl solution to this? I mean, this is functional and all, but I'm just making repeated system calls -- my program doesn't deserve the name of perlscript, because it's really just a shellscript in Perl clothing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: OpenOffice Quickstarter (Linux) in Perl
by halley (Prior) on Mar 08, 2004 at 14:01 UTC | |
|
Re: OpenOffice Quickstarter (Linux) in Perl
by Abigail-II (Bishop) on Mar 08, 2004 at 11:40 UTC | |
|
Re: OpenOffice Quickstarter (Linux) in Perl
by Corion (Patriarch) on Mar 08, 2004 at 11:49 UTC | |
by kal (Hermit) on Mar 08, 2004 at 12:00 UTC | |
by belg4mit (Prior) on Mar 08, 2004 at 13:16 UTC | |
|
Re: OpenOffice Quickstarter (Linux) in Perl
by zakzebrowski (Curate) on Mar 08, 2004 at 12:32 UTC | |
|
Re: OpenOffice Quickstarter (Linux) in Perl
by mpolo (Chaplain) on Aug 12, 2005 at 15:35 UTC |