in reply to Re: passing hash ref to a function
in thread passing hash ref to a function

Pease edit your title 'passing hash ref to a function'

Where is p2 script located relative to p1 script. Are they are they both in the same folder ? they just use

my $output = `p2.pl`;
Update

If yes, FindBin can locate the path to p1.pl which can be used to run p2.pl.

#!perl # p1.pl use strict; use FindBin; my $p2 = $FindBin::Bin.'/p2.pl'; my $output = `$p2`; print $output;
poj