For the following piping in a Bash script :
Bash command | perl -ne 'single line perl command' | Another Bash command
The Perl command could only be single line. How about if I want to write more complex multi-line Perl commands. Could I use multiple "-e" options for each perl command line, such as :
perl -n -e 'command line 1' -e 'command line 2' -e 'command line 3'
Or could I use a "Here Document" for the multi-line Perl codes (the perl options, such as "-n", should still be able to be specified in such case.) ?
If "Here Document" could be used, could anyone illustrate how to use it with an example.
Thanks in advance for any suggestion.