15. Run an external program

You can run an external program using various methods. I prefer the system function.
# run the external program nano:
system("nano");

# run the external program nano, loading the contents of a file:
system("nano test.txt");

# run the external program nano, in a new window, loading the contents of a file:
$my_terminal = "xfce4-terminal";
system("$my_terminal -e 'nano ~/test.abc'");

# another example calling the program evince:
$program = "evince";
system("$program test.pdf");

# to call command line code:
system("ls -a");
system ("cd Videos && vlc bach_bwv248.webm");
system qx(vlc "Videos/bach_bwv248.webm");