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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: hp3ba
  • Order by date
  1. hp3ba

    Need help with simple text file conversion

    Yeah, from what I read (as a newbie to Perl) - you're supposed to 'close', but Perl is smart enough to clean up for you.
  2. hp3ba

    Need help with simple text file conversion

    Thanks again. Here's what I ended up with: open(INFILE, "input.txt") or die "Can't open input.txt: $!"; open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!"; my $prevKey = ''; while (<INFILE>) { my ($field1, $field2) = split ','; if ($field1 ne $prevkey) { $prevkey =...
  3. hp3ba

    Need help with simple text file conversion

    Thanks MillerH. Sorry for my perl ignorance, but that seems like the entire program - just need to save it as a pl file and run it - how do i tell it to save the result as a txt file? (Right now if I run it, it doesn't save the print to anywhere.) Thanks much.
  4. hp3ba

    Need help with simple text file conversion

    I have a text file in the format: 1,3 1,5 1,4 1,4.3 5,4 54,3 100,1 100,1 1100,2 etc basically just two columns, comma separated. I need to convert that into a text file with the format as follows: 1: 5 4 4.3 5: 4 54: 3 100: 1 1 1100: 2 etc Column one appears once, followed by ':', with all...

Part and Inventory Search

Back
Top