Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I have a perl script which takes numerous arguments and, depending on those arguments, dumps a table to stdout. I would like to take that table from the first script and use it as input for the second etc etc. So, for example, in the below commands, I would like to use the table output by "script.pl -y goodbye" as the argument of -x. It seems I need to open a pipe, check for data and if none exists, continue with the script. If there is data, parse it, and pass it as an argument to -x. I feel this is how it should work in my head, but not sure whether this is correct in reality. I'm looking at Pipes and IPC on perl web pages via google, but feeling a bit overwhelmed. Can someone point me to a particular section I should focus on?
script.pl -x hello script.pl -y goodbye | script.pl -x
Thank you very much for you time !
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: checking for piped input data
by hv (Prior) on May 02, 2023 at 23:20 UTC | |
by Anonymous Monk on May 03, 2023 at 13:33 UTC | |
Re: checking for piped input data
by parv (Parson) on May 03, 2023 at 05:53 UTC | |
by Anonymous Monk on May 03, 2023 at 13:37 UTC | |
by parv (Parson) on May 04, 2023 at 03:21 UTC | |
Re: checking for piped input data
by shmem (Chancellor) on May 03, 2023 at 01:54 UTC | |
Re: checking for piped input data
by jwkrahn (Abbot) on May 02, 2023 at 21:34 UTC | |
by Anonymous Monk on May 02, 2023 at 22:07 UTC | |
by eyepopslikeamosquito (Archbishop) on May 02, 2023 at 22:14 UTC |