So, if you are switching from DOS "batch" scripts to Perl scripts, then:
- everywhere the batch file has "%PARAM%", the perl file will have $param
- everywhere the batch file does "cd some\path" the perl file will do chdir "some/path";
- if the batch file does a lot of "pushd" (especially if it does two or more of these before doing a "popd"), the perl file should have use Cwd; and my @dirstack; near the top. Then everywhere the batch file does "pushd %SOMEDIR%", the perl file will do push @dirstack, getcwd(); chdir $somedir; and everywhere the batch file has "popd", the perl file will have chdir pop @dirstack;
- where the batch file is putting literal strings on a command line, and presenting literal quotation marks as a string of three double-quotes ("""in quotes"""), the perl file will assign a quoted string to a variable or array element, and use a backslash to escape a quotation mark that should be part of the string: $arg = "opt=x(foo,[bar=\"in-quotes\"])";
As indicated above, do
system( @cmd ); or
system( $cmdname, @args ); to actually run some other program from the perl script.
There might be ways to refactor or rethink the design of the batch files, to make better (shorter, easier to maintain) perl scripts, but if you're not a programmer, I don't know how far you'd be able or willing to go in that direction.