in reply to
NYTProf doesn't profile through a system or exec call
Not to be obtuse, but is there a reason you can't just profile scriptB independently? You could do this either by directly invoking it w/ perl -d:NYTProf scriptB, or if it needs internal parameters from the script, like
@commands = qw( perl -d:NYTProf scriptB val1 val2 );
I'm pretty sure that you'll get erroneous results if you try to profile both simultaneously.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.