in reply to Re^2: passing hash ref to a functionin thread passing hash ref to a function
my $path_to_p2 = cwd() . '/p2.pl';
I don't see the advantage of this over just the relative 'p2.pl' (unless the script is chdiring over its run).