Hello, Still cant figure out..and make it work.. could anyone pls modify this for me for me !
Do not know how to make change in sub mail_report too Sunish ----- Original Message ----- From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 16, 2004 5:28 AM Subject: Re: Could anyone please help with Line Extraction and Emailing Question > Sunish Kapoor wrote: > > Today is July 16 so when script should be executed it should send > > line1, line3, line5 to Randal on [EMAIL PROTECTED] > > > > Similarly it should send line7, line9, line11 to Tom on [EMAIL PROTECTED] > > > > NOW THE PROBLEM => Though it is sending email but only line5 to > > Randal and line11 to Tom > > > > I cant figure out and solve this ! > > <snip> > > > -------------------------------------------------prospects.txt below > > > > [EMAIL PROTECTED]/10/2004%%Services & Trade%%Mr Sarathi%%Manager%%7711455%%Renewal - Gold Membership%%75%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Abu Zaki%%Mr Jauqim%%I T Manager%%7730611%%Gold Membership + Banner%%125%%7/10/2004%%1089403200 > > [EMAIL PROTECTED]/10/2004%%Medical Supplies%%Ms Priya%%Asst Manager%%7715771%%Gold Membership + Banner%%125%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Intl Stationery%%Mr Khalid Shanfari%%Manager%%701302%%Platinum membership%%210%%7/12/2004%%1089576000 > > [EMAIL PROTECTED]/10/2004%%Salah Cooler%%Mr. Vijay Nirula%%General Manager%%701721%%Gold membership%%75%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Insurance Center%%Mr Ravi Shankar%%General Manager%%792923%%Gold Membership%%75%%7/12/2004%%1089604800 > > [EMAIL PROTECTED]/10/2004%%Al Batinah Int SAOG%%Mr Fairuz%%General Manager%%783388%%Gold Membership%%75%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Qatar Airways%%Mr Ali Khalid Shanfari%%Area manager%%785843%%Gold Membership%%75%%7/12/2004%%1089576000 > > [EMAIL PROTECTED]/10/2004%%Asha Ent (cont)%%Mr. Domnic %%A/c Manager%%568591%%Gold Membersahip%%75%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Renaissance%%Mr Arindam Roy%%Manager%%796636%%Platinum Membership%%210%%7/10/2004%%1089403200 > > [EMAIL PROTECTED]/10/2004%%Muscat General Ent%%Mr Joseph%%Manager%%700667%%Gold Membership%%75%%7/16/2004%%1089961200 > > [EMAIL PROTECTED]/10/2004%%Global Finance Investment%%Mr. Milind%%Manager%%7716960%%Gold Membership%%75%%7/20/2004%%1090296000 > > > > -------------------------Below is the SCRIPT------------------- > > > > #!c:/perl/bin/perl > > Where is > > use strict; # which requires that variables are declared > use warnings; > > ?? > > <snip> > > > %hash=(); > > > > open (FILE, "<$file"); > > > > while ($line = <FILE>) > > > > { > > > > chomp; > > > > @fields = split (/%%/, $line); > > > > $hash{$fields[1]}= > > [$fields[0],$fields[2],$fields[3],$fields[4],$fields[5],$fields[6],$fields[7 ],$fields[8],$fields[9]] > > if ($fields[10] == "$epoch" ) ; > > > > } > > So, what do you think %hash contains after the while loop? You should > have printed it here in order to check. If you had done so, you'd > probably have found that it only contains two of the lines. > > Maybe this is what you intended to do: > > push @{ $hash{$fields[1]} }, [ @fields[0,2..9] ]; > > (note that this requires changes in mail_report(), too) > > -- > Gunnar Hjalmarsson > Email: http://www.gunnar.cc/cgi-bin/contact.pl > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>