in reply to Re: Re: Stripping a seemingly complicated comma-delimited file
in thread Stripping a seemingly complicated comma-delimited file

#!/usr/local/bin/perl -w # GOOD! open(HIPORT,"eq010125.txt");
Please check the error from your file open. What if it fails? open(HIPORT,"eq010125.txt") or die "Couldn't open file, $!"; However, your main problem is that you are assigning the contents of your file to a scalar - $file.
$file = <HIPORT>; You definitely don't want to do that. @file = <HIPORT>; will suck the contents of the file into an array for you. I strongly suggest that you start off with code that reads your file line by line. You are trying to do far too much work. Use the program I have posted or any one of the similar programs that others have put up. :)