Think about Loose Coupling | |
PerlMonks |
Difference between piped-in and invocation arguments to a Perl script?by pat_mc (Pilgrim) |
on Jan 23, 2009 at 12:00 UTC ( [id://738446]=perlquestion: print w/replies, xml ) | Need Help?? |
pat_mc has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Monks - I came across a very, very basic observation today which illustrated to me that I am lacking some basic understanding on Perl's behaviour in a Unix-family operating system environment. My apologies therefore for bothering you with this question. So far, I thought that piping some input into a Perl programme was the same as handing over that input as an invocation argument to the programme. I found, however, that this is not the case: Here's my test programme test.pl: My oberservations were: while
I thought that the pipe was passing on the arguments to the next element in the pipe via STDIN ... can anybody therefore please explain to me why this is not working? Thanks for your help in advance! Cheers - Pat
Back to
Seekers of Perl Wisdom
|
|