## test_one.pl: #!/usr/bin/perl use warnings; use strict; # $bar will hold "Bar", # "Foo" gets printed right away. my $bar = do 'test_two.pl'; print $bar; ## test_two.pl: print "Foo\n"; return "Bar\n";