in reply to Returning data to parent program

What i want to know is, Are there any other ways for my script to return data to his program so i wouldnt need to print to cmd.

See perlipc.

You get special file handles STDIN/STDOUT/STDERR

Then there is regular files, and sockets

Those are your basic/common/standard choices

Use JSON as data exchange format.