in reply to source a program
Anyways, likewise in perl. You can execute any arbitrary command (a shell script, perl script, binary executable, whatever... see perldoc -f system), but it will occur in its own subprocess. You can also "source" a file full of other perl code directly into your perl script, affecting your scripts environment, variables, and so on. You do that like:
just like you would say:do "script_name.pl";
or (the same thing)source script_name.sh
(the . is just a shortcut for writing the command "source" in shell). There are some minor differences between perl's "do" and shell's "source". The biggest difference is probably that perl's "do" will return the last value computed in the called script. For more info, check out perldoc -f do.. script_name.sh
------------ :Wq Not an editor command: Wq
|
|---|