script to parse one file, search another 
Author Message
 script to parse one file, search another

I have two files like this:

file 1:
39993 45848888833
20909 27739299911
44944 28288388484
etc..

file 2:
49958399934005983009289
32993209093812883918888
39928449442884928784992

I need to figure out how to open two files at once, use the
string from the first file to search the second, and write
out both strings to a third...

Do I need to load both files into arrays???

Any help would be greatly appreciated.

Monty




Sat, 20 Nov 1999 03:00:00 GMT  
 script to parse one file, search another

Quote:

> I need to figure out how to open two files at once, use the
> string from the first file to search the second, and write
> out both strings to a third...

> Do I need to load both files into arrays???

I would think you'd only need to save the strings from the first one.
(Strictly speaking, you wouldn't need to save them, but it seems the most
efficient way, based on what you've given us.) Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/

Randal Schwartz Case:     http://www.lightlink.com/fors/



Sat, 20 Nov 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. In search of file searching script,output,every line occurance occurs

2. Searching for cgi-script for redirect from one domain to a co-domian

3. search for one line and print that line and the one after it

4. Parsing records from one text file to another

5. newbie trying to parse one file into three

6. confining a search to a part one part of a text file

7. redirecting output from one perl script to a file (withough changing the perl script itself)

8. Including my perl functions in one file in another perl script file

9. Searching and Parsing text from HTML file

10. Generate more than one page with one script

11. -- Can One Perl Script call another one?

12. One file - script and package?

 

 
Powered by phpBB® Forum Software