Hi guys
I have a question regarding how to show perl script output in another window terminal "xterm" without use another perl script.
I have done some tools in the past where I have different perl script per options..
The situation is that I have a perl script with a menu, I would like to be able to show the ouput generated for the selected routine in a different xterminal using just thisperl script.
For example, I would like to show the contents of the array @data without print to a filehandle
It worked, but I am not happy with the solution...
Ideas are welcome!
Cheers
dmazzini
GSM/UMTS System and Telecomm Consultant
I have a question regarding how to show perl script output in another window terminal "xterm" without use another perl script.
I have done some tools in the past where I have different perl script per options..
Code:
my $fg = "lightgrey";
my $bg = "black";
my %OSSSVR;
$OSSSVR{hntx} = "Houston";
$OSSSVR{chil} = "Chicago";
$OSSSVR{cloh} = "Cleveland";
$OSSSVR{mokc} = "Kansas City";
$OSSSVR{mpls} = "Minneapolis";
$OSSSVR{pxaz} = "Phoenix";
$OSSSVR{sewa} = "Seattle";
$OSSSVR{tpfl} = "Tampa";
my $oss = substr(`hostname`,0,4);
my $xtermLine = "xterm -title \"$OSSSVR{$oss} UMTS MENU\" -bg $bg -fg $fg -cr $fg -geometry 170x45 -sl 10000 -fn 8x15 -sb -e /m/home/dmazzini/anotherscript_based_on_menu.pl $debug &";
system($xtermLine);
The situation is that I have a perl script with a menu, I would like to be able to show the ouput generated for the selected routine in a different xterminal using just thisperl script.
For example, I would like to show the contents of the array @data without print to a filehandle
It worked, but I am not happy with the solution...
Code:
sub...
my @data= qq(Roses Margarita
Daniel Felipe Perez);
my $log="datacall";
open DATACALL, ">$log" or die "cant open $log: $!\n";
print DATACALL @data;
close DATAFILL;
my $unix= "tail $log\; rm $log\; sleep 10";
my $cmd= qq(xterm -title "MONITORING" -e \"$unix\" &);
print "CMD:$cmd\n";
system($cmd);
Ideas are welcome!
Cheers
dmazzini
GSM/UMTS System and Telecomm Consultant