chiragshukla has asked for the wisdom of the Perl Monks concerning the following question:
# populate DISTINCT ids from table into a variable # separated by pipe symbol; variable looks like below # and contains 15000 distinct ids $compare = "F1|FTDR|RJIER|KERF...." # open the file and loop open (MFIL,"<datafile") or die ("ouch"); while ($lines = <MFIL>) { chomp ($lines); $lines =~ m/^$compare/o && next; print $lines,"\n"; } close (MFIL);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: large file and processing efficiency
by Fletch (Bishop) on Dec 07, 2005 at 18:32 UTC | |
by chiragshukla (Initiate) on Dec 07, 2005 at 20:32 UTC | |
by chiragshukla (Initiate) on Dec 07, 2005 at 19:30 UTC | |
|
Re: large file and processing efficiency
by Roy Johnson (Monsignor) on Dec 07, 2005 at 18:38 UTC | |
|
Re: large file and processing efficiency
by beachbum (Beadle) on Dec 07, 2005 at 19:54 UTC | |
by chiragshukla (Initiate) on Dec 07, 2005 at 20:03 UTC |