in reply to Use a Variable in a Separate Perl Script

For example, you can make script1.pl output the value of the variable. Then, in script2.pl, you should call the script1.pl and capture its output:
#!/usr/bin/perl my $name = `perl1.pl`;