I am invoking the script x.pl from y.pl as system(x.pl);
I take it to mean system('x.pl');. And I guess you made sure that x.pl has a correct #! line?
my $exit_status = $? >> 8; I am capturing the status always.
How do you know that your program died by segmentation fault? $? >> 8 is whatever x.pl passes to its exit call, so from this value alone, you can not deduce that your program segfaulted.
But *if* it does, it could be that either the Perl used has a problem (that's why I'm asking you about the #! line), or (more likely) that x.pl uses some Perl module which contains compiled parts, so this would be the place to look.
--
Ronald Fischer <ynnor@mm.st>
| [reply] [d/l] [select] |