'bar's STDIN is whatever 'foo' spits to STDOUT. So if you can control how your code is executed from the shell, you can control its STDIN. For example ...
will execute your script ten times, each time with a different number on its STDIN.for i in `seq 1 10`; do echo $i|./myscript.pl; done
In reply to Re: Is it possible to write to STDIN ?
by DrHyde
in thread Is it possible to write to STDIN ?
by exilepanda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |