On Oct 6, 7:11 am, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > Hi, > > I have large file in following format: > > ID | Time | IP | Code > > Now I want to write script that will cluster data by IP addr. and > count total number of IDs for corresponding IP. > > I am new to perl.
ok, so split by more than just escaped pipe. pad both sides with a single space. if tabs have crept in your source first sub-out out occurrences of tab by $ThisVar =~ s/\t/ /g; # if particularly dirty, use up to three of these. also, if you're new to Perl, keep the syntax simple, so maybe use the $ThisHashTallyForIP{$ThisIP}++ ; # for when you're going over the file, array, hash, or SQL read-in you're doing. -mL -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/