Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Does anyone have any ideas how I could make this more flexible. I could obviously look in /usr/local/bin, /usr, or /firefox , /mozilla, etc. but this seems crazy. Thankssub start_html { my @browsers = qw(firefox mozilla netscape galeon konqueror); foreach (@browsers) { if (-f "\/usr\/bin\/$_") { system ("$_ $installpath\/help\/HelpFile.htm"); last; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Locating browser location?
by JediWizard (Deacon) on Feb 28, 2006 at 15:03 UTC | |
|
Re: Locating browser location?
by explorer (Chaplain) on Feb 28, 2006 at 16:04 UTC | |
|
Re: Locating browser location?
by Anonymous Monk on Feb 28, 2006 at 21:30 UTC | |
|
Re: Locating browser location?
by Ultra (Hermit) on Mar 01, 2006 at 09:18 UTC |