hi, I want to write a program that will listen to tty and without knowing why i do I typed the following
use strict; my $log_name = $ARGV[1]; my $tty_port = $ARGV[0]; print "Log name = = $log_name \n"; #print "Entering the LOOP"; if(-e $tty_port) { #print " Listening to $tty_port\n"; open(FL, "< $tty_port"); print "ok I opened the $tty_port\n"; while (<FL>) { #print "opening file for writing into \n"; open WL, ">> $log_name" or die $!; print WL $_ ; close(WL); } close(FL); } ====== Now I made a call to the program by passing two parameters 1. /dev/tty --- the tty 2. log name : /epihome/ompe/ompe/ompe/scripts/vb_prl/gtemp/good.log ====== I made the call like perl callsc.pl /dev/tty /epihome/ompe/ompe/ompe/scripts/vb_prl/gtemp/ good.log & It did not listen to the port but exited with the folloing message [1] + Stopped (SIGTTIN) perl /epihome/ompe/ompe/ompe/scripts/ vb_prl/gtemp/callsc.pl /dev/tty /epihome/ompe/ompe/ompe/scripts/vb_prl/ gtemp/good.log & Is there any alternative way I can try this? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/