Let's say I've got a shell script called print_error.sh
looking like this:
#!/usr/bin/bash
echo "ERROR: Bla bla, yada yada."
exit 1
Now I'm in a Perl script, calling this shell script with
system("print_error.sh")
I now want to read the console output of print_error.sh
and write it to a Log4perl logger.
How can I achieve this?