in reply to Re: sort after split
in thread sort after split

Thanks Aquarium,

I tried chomping then entry, but my list still prints in a sequential manner. Losing my mind :)
open (DB1,"logfile.log") or die("There was a problem opening the file. +"); while ($entry=<DB1>) { chomp $entry; @fields = sort { $a cmp $b } split /\t/, $entry; #@fields=split(/ /,$entry); #chomp @fields; foreach $entry (@fields){ $_ =~ s/\n/\,/; }

Any other ideas? I really appreicate your help all. Thank a Million.

lT

Replies are listed 'Best First'.
Re^3: sort after split
by Not_a_Number (Prior) on Dec 05, 2007 at 23:40 UTC

    You seem to have missed (or deliberately ignored?) the question asked by Roy Johnson above. I'm sure that he won't object if I repeat his post in its entirety:

    What does your data look like? Give a few sample lines of input, and what you would want the output to be from that.