No such thing as a small change | |
PerlMonks |
Re: checking for piped input databy shmem (Chancellor) |
on May 03, 2023 at 01:54 UTC ( [id://11151965]=note: print w/replies, xml ) | Need Help?? |
I don't smell perl, I smell shell. If script.pl -y goodbye yields a single string, use backticks:
If the output of script.pl -y goodbye produces more, and each token is to be processed in turn with script.pl -x, use a loop:
Also, man xargs(1).
If all arguments from perl -y goodbye are to be processed by a single call to perl -x and appear on a single line, have perl -x check @ARGV, probably using Getopt::Std. If they are on multiple lines and piped into script.pl -x, use the -n switch (again, see perlrun), probably checking for the switch -x in a BEGIN block. This is all I can come up with, given your question. You know, as in "garbage in - garbage out" :)
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
In Section
Seekers of Perl Wisdom
|
|