thadc has asked for the wisdom of the Perl Monks concerning the following question:
I am new to perl. I am using a script, squirrel.pl for running database scripts automatically. It works fine on my linux box, but does not run on windows, and I need it to. I saw some general guidelines for making portable scripts, but this one is over 800 lines long. I am assuming that file paths with back slashes should be converted to forward slashes, but I cannot always tell where backslashes should remain as backslashes. For instance:
I assume all of these need to be converted
$sqlLog = "/opt/devOps/tools/squirrel/logs/squirrel-sql-" . $creationTime . ".log";. ,
but not sure about these:
if($chosenRealm=~/^prd$/ && !@ARGV)
or these:
elsif($connectionNames[$i]=~/4b/)
or these:
elsif($output=~/ORA-01031/ || $output=~/ORA-00942/ || $output=~/ORA-01749/)
Any insights are greatly appreciated. Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: script running on linux but not windows
by stevieb (Canon) on Dec 19, 2017 at 20:11 UTC | |
|
Re: script running on linux but not windows
by toolic (Bishop) on Dec 19, 2017 at 20:08 UTC | |
|
Re: script running on linux but not windows -- File::Spec
by Discipulus (Canon) on Dec 19, 2017 at 21:05 UTC | |
by thadc (Novice) on Dec 20, 2017 at 16:52 UTC | |
by choroba (Cardinal) on Dec 20, 2017 at 17:00 UTC | |
by poj (Abbot) on Dec 20, 2017 at 17:55 UTC | |
by Marshall (Canon) on Dec 20, 2017 at 22:25 UTC | |
by choroba (Cardinal) on Dec 21, 2017 at 15:57 UTC |