Re: Create list of variables to be printed?

2005-02-02 Thread Kevin Horton
David, Thank you very much for your help. I had tried to use the eval command, but I wasn't able to sort out the proper syntax. Your solution works perfectly using my test raw data. I will be able to hook up the engine monitor later tonight so I can test with the real thing and see how muc

RE: Create list of variables to be printed?

2005-02-02 Thread Charles K. Clarkson
Kevin Horton wrote: : My working prototype script with the hard-coded list of : variables prints output with the following line: : : print OUTPUT : "$data_time\t$TACH\t$MP\t$FUEL_FLOW\t$QTY\t$CHT1\t$CHT2\t$CHT3 : \t$CHT4\t$ : EGT1\t$EGT2\t$EGT3\t$EGT4\t$OILT\t$OILP\t$VOL

Re: Create list of variables to be printed?

2005-02-02 Thread David Van Ginneken
Kevin, Would something like this work for you? Main program: - use strict; my $data_time = 'date'; my $TACH = 'tach345'; my $MP = 'mp123'; our @array; require 'config.pl'; foreach (@array) { eval 'print $' . $_ . ' . "\t"'; } print "\n"; --

RE: Create list of variables to be printed?

2005-02-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
On 2-Feb-05, at 1:09 PM, Wagner, David --- Senior Programmer Analyst --- WGO wrote: > Kevin Horton wrote: >> I'm a perl newbie working on a script to log data from a device that >> sends more variables than I need to log. I have a working prototype >> script, with the list of variables to be lo

Re: Create list of variables to be printed?

2005-02-02 Thread Kevin Horton
On 2-Feb-05, at 1:09 PM, Wagner, David --- Senior Programmer Analyst --- WGO wrote: Kevin Horton wrote: I'm a perl newbie working on a script to log data from a device that sends more variables than I need to log. I have a working prototype script, with the list of variables to be logged hard-c

RE: Create list of variables to be printed?

2005-02-02 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Kevin Horton wrote: > I'm a perl newbie working on a script to log data from a device that > sends more variables than I need to log. I have a working prototype > script, with the list of variables to be logged hard-coded, which > means I need to edit the script any time I need to change the items

Create list of variables to be printed?

2005-02-02 Thread Kevin Horton
I'm a perl newbie working on a script to log data from a device that sends more variables than I need to log. I have a working prototype script, with the list of variables to be logged hard-coded, which means I need to edit the script any time I need to change the items to be printed. Now