in reply to perl file returning values

You want to do:   exit $status;...