http://www.perlmonks.org?node_id=99633


in reply to exchanging data between shell script and perl -e

First off, you can pass data to perl using normal piping like:
ls -l |perl -ne "print if /bla/"
Second, if you want to let Perl exit with a status code, you can use exit.

I hope this answers your question.

Jouke Visser, Perl 'Adept'
Using Perl to help the disabled: pVoice and pStory