Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: sort after split

by lakeTrout (Scribe)
on Dec 05, 2007 at 22:48 UTC ( [id://655244]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655244]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-23 20:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found