i have a perl script(myscript.pl)
use strict;
use IO::Handle;
open OUTPUT, '>', "output.txt" or die $!;
STDOUT->fdopen( \*OUTPUT, 'w' ) or die $!;
while (<STDIN>){
print $_;
}
i can paste into output.txt what i write on commandline
also
I have a bash script:
cat >in.$$
cat in.$$> /tmp/msg
i can paste what i have in in.$$ into /tmp/msg
i need to run perl script with stdin that come from bash script.
is it possible and how?
i tried , even though i know it is too silly
cat in.$$> ./myscript.pl
in.$$> ./myscript.pl
in.$$> perl myscript.pl
./myscript.pl in.$$?