i never worked with CSV so far but http://search.cpan.org/~danboo/Tie-Handle-CSV-0.09/lib/Tie/Handle/CSV.pm
sounds quite good. (hope it can handle if you're writing something to the hash too. I didn't read the code... if not there are a lot of CSV modules at cpan. ) <snip> Country_Name Country_Code Rate/sec Argentina 54 RM0.99 </snip> if you use that Module you could access your CountryCoude with $csv->{Country-Code} use my algorithm and simply do # then read the 13th # field(Duration), divide it by 60 and multiply it by the rate/sec. of # Argentina and write the result into the 14th field. my $tmp = $csv->{Duration} / 60 * $csv->{Rate/sec}; $csv->{what_ever_the_name_of_your_14th_field_is} = $tmp; On 12:17:26 27/08/2007 "Mihir Kamdar" <[EMAIL PROTECTED]> wrote: > > > > On 8/27/07, Martin Barth wrote:Hi, > > do you understand my pseudo code, i think it should work for your > hash? > > Regards > Martin > Hi Martin, > > Yes, I guess I understood yr code...if I am correct, i just need to > know the longest country code digits and store them in $prefix_len, and > then compare it with the string...if it doesnt match...decrement length > by 1 and compare...yeah this shud work... but in my previous thread, > i have mentioned by actual requirement....can u just have a look and > comment on that.. > > Thanks, > Mihir -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/