Jenda Krynicky wrote:
> From: [EMAIL PROTECTED]
>   
>> Searching for records in 15000 lines.
>>
>> Have a list of hostnames in a text file. Wanted to take the lines
>> matching the hostnames in csv file. must use sub routines or is there
>> any module for this? 
>>
>> host.txt
>> adms0922
>> adms0943
>> adms0782
>>
>> temp.csv
>> 12312,adms0782,10.10.50.53,Application,,,12.3
>>
>> I want to print all the matching values of the 
>>
>> Thanks
>> Manoj
>>     
>
> I bet there is no module because it's too simple.
>
> 1) read the host.txt and stuff the hostnames into a hash
> 2) read the csv (Text::CSV_XS, DBI+DBD::CSV) and process only lines 
> whose hostname exists() in the hash.
>
>
>   
If you're going to use DBI you should also be able to just SELECT...WHERE...



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to