| Steve Pittman 2006-07-28, 9:56 pm |
| Thanks to everyone for your suggestions....
I replaced the INPUT_RECORD_SEPARATOR ($/) as suggested....
My script is working great!!
Thanks Very Much!!!
Steve
On Jul 26, 2006, at 2:59 PM, Steve Pittman wrote:[color=darkred]
> I am using activestate on a windows box ...the files I am parsing
are
> Unix files...I tried this so far...
>
> open ( IN, "<$_[0]" )||die "Can't open DAT source file: $tempFile
> $!\n";
> while (<IN> ){s/\r/\n/g;@lines = <IN>;}#
> close (IN);
>
> foreach $line (@lines)
> {
Try a different value for the INPUT_RECORD_SEPARATOR ($/):
$/="\n" ;
open ( IN, "<$_[0]" ) or die "Can't open DAT source file: $tempFile $!
\n" ;
my @lines = <IN> ;
foreach $line (@lines)
{ ...
Notice that I also changed the || to "or".
Let us know what you try and how it works for you.
Regards,
- Robert
http://www.cwelug.org/downloads
Help others get OpenSource software. Distribute FLOSS
for Windows, Linux, *BSD, and MacOS X with BitTorrent
|