$ cat script1.pl #!/usr/bin/perl # script1.pl my $name = '123abc'; my $results = `./script2.pl "$name"`; # $results now contains the output of script2.pl $ cat script2.pl #!/usr/bin/perl # script2.pl # run locate on the first argument given to this script print `locate "$ARGV[0]"`;