Devdas Bhagat wrote:
>
> //Redoing SQL in perl sucks, thats what databases are for :)
I fully agreed ! It is your kindness that,
you are doing me a favour !!
> //Untested rough code, use at your own risk.....
>
> #!/usr/bin/perl -w
> use strict;
>
> open FP,"</path/to/master";
> my ($code,$name,$junk);
> my %hash;
>
> while (<FP>)
> {
> ($code,$name,$junk,$junk,$junk) = split(/,/,$_);
> $hash{$code} = ($code,$name);
> }
> close(FP);
>
> my @array = ();
>
> open FP,"</path/to/transaction";
>
> #print titles here
> while (<FP>)
> {
> @array = split(/,/,$_);
> foreach $key (keys%$hash)
> {
> print "-"x80."\n";
> #This is just bad code, but it should work
> #It prints to stdout, no major formatting
> if ($array[0] eq $key)
> {
> print
> "@$hash->{$key},$array[1],$array[2],$array[3]\n";
> }
> }
> }
>
> close (FP);
>
Thanks from heart buddy ! I am doing further experimenting !
Situation here demands only bash/perl, .: I gave you the trouble !
Regards & thanks !
~ Pat
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help