Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by chep80

  1. chep80

    How to read only certain lines of file

    My input file looks like this: stk.v.4.0 BEGIN Ephemeris NumberOfEphemerisPoints 40321 ScenarioEpoch 15 Oct 2008 12:00:00.000 EphemerisEciTimePosVel 0.00000000000000e+000 -5.10704934943446e+006 -4.30468742388535e+006 2.34134338660962e+006 1.14622110187997e+003...
  2. chep80

    Converting a matrix from scientific to floating point

    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.
  3. chep80

    Converting a matrix from scientific to floating point

    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...
  4. chep80

    How to grab every 5th row of an array?

    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
  5. chep80

    How to grab every 5th row of an array?

    When I use the variable "$trip", I get the error: "$trip requires explicit package name." Can't figure out why its not working. Thanks,
  6. chep80

    How to grab every 5th row of an array?

    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...
  7. chep80

    Need help arranging large data file

    I have a data file that looks like this: PATH Trial CTR LAT CTR LON 1 1 80.774791 3.21062 1 2 80.021757 -4.274059 1 3 79.129883 -10.647337 1 4 78.130377 -16.029408 1 5 77.048078 -20.572231 2 6 75.901981 -24.423146 2 7 74.706362 -27.710197 2 8 73.4719 -30.538982 2 9 72.20661...
  8. chep80

    Beginner, just need to manipulate a txt file

    Thanks to all who responded! It worked, I appreciate the help!!
  9. chep80

    Beginner, just need to manipulate a txt file

    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\...
  10. chep80

    Beginner, just need to manipulate a txt file

    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...

Part and Inventory Search

Back
Top