Is it possible to return a value (or hashes or arrays) from a Perl script invoked by another?
printf("%d", system("callee.pl"));
if(<Went good>)
{
    return(1);
}
else
{
    return(100);
}
                The best way is to wrap callee.pl in a 'sub {}' then require then script and call it. You can then treat the sub as a normal procedure.
require("callee.pl");
printf("%d", callee());
sub callee {
    if(<Went good>)
    {
        return(1);
    }
    else
    {
        return(100);
    }
}
1;
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With