Thanks, but I dont really want to have to add the DATA into the code since its actually 40,321 lines. Thats why the original code reads in the text file and the main task I'd like it to do is convert all those numbers to floating point and then create a new file.
I have the following script where I am trying to manipulate portions of the headers in the beginning and then I want to convert the matrix from scientific to floating point:
#!/usr/bin/perl
use strict;
############################################################
#Insert name and location of...
I continue to get the following error as if it doesnt recognize the variable $counter, even though I initialize it to zero before the loop:
"$counter" requires explicit package name
Here is a portion of my perl script:
my $input = 'C:\Documents and Settings\CheplakM\My Documents\Stk 6.0\STK scripts\anad1_matt.txt';
my @output;
open (FILE, "$input");
my @array = <FILE>;
for (@array) {
my ($col1, $col2, $col3, $col4, $col5, $col6, $col7, $col8) = split(/\s+/, $_);
my...
tonykent,
I replaced my filename and location on the lines for my $input and my $output, but I get the following error:
syntax error at C:\Perl\STK scripts\hds_stk_script1.pl line 17, near "open "
Global symbol "$out_file" requires explicit package name at C:\Perl\STK scripts\...
I have a fairly simple problem, but I have no experience with Perl and little time to learn it. I have this text file as an input:
Log file 'LOG\atgt.txt'
ELAPSED_SIM_TIME Seconds
AACS_Mode state
ASGN_SlewMode state
ATT_Mode state
ECI2IRU_Q[0] none
ECI2IRU_Q[1] none
ECI2IRU_Q[2] none...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.