Actually "Picking Up
Perl" doesn't even mention calling other
perl scripts, and "Robert's
Perl Tutorial" is for Windows and it only mentions doing it with modules. Nevertheless, I managed to use it and karlsworld's script to piece together something that works.
Also, I forgot to mention that I don't want to use system() because I need to pass multiple file names and want to be able to accept spaces without the headache of figuring out which pieces go together in the target method.
Anyway. For those reading this in the future, this works:
(main_file.pl)
Code:
#!/usr/bin/perl
use strict;
use warnings;
require "other_file.pl";
my $string = "Hello";
my $string2 = "Hello again";
do_something($string);
my ($s1, $s2) = do_something_else($string2);
print "Received: $s1 $s2\n";
exit;