RE: setting From: using Mail::Send/Mailer

2002-10-08 Thread Subbarao_Gade

Hi 
You can use Mail::Sender;


use Mail::Sender;
$sender = new Mail::Sender(
{
from ='AVupdate_HOT.mycompay.com',
smtp ='x.x.x.x'
});

Regards
SubbaRao
 -Original Message-
 From: Peter Lavender [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, October 09, 2002 6:46 AM
 To:   Perl Win32 Users
 Subject:  setting From: using Mail::Send/Mailer
 
 Hi Everyone,
 
 I'm just mucking about with Mail::Mailer Mail::Send basically becuase
 I need a simple lightweight SMTP mailer.
 
 The problem I have hit is that the From field is always
 postmaster@machine name
 
 I would however like to set this myself.  I have looked over the
 perldoc for Mail::Mailer/Send and Net::SMTP, I've even looked over the
 SMTP.pm module, and can't see where I can either set the From: or how
 it's setting it to postmaster.
 
 Can anyone enighten me on this?
 
 Thanks,
 
 
 
 Pete.
 
 -- 
   Due to a lack of imagination, 
   this signature will remain 
   under construction indefinitely.
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



RE: Help with file parsing

2002-07-10 Thread Subbarao_Gade

Dear All
This code is working fine.

open FILE, c:/sample.txt or die Cannot open $file: $!;
while (FILE) {
#print $_;
if (/^\s*\[record_1\]/ .. /^\s*\[record_2\]/) {
print $_;   # note that starting/ending lines will print
}
}
close FILE;

Regards


 -Original Message-
 From: $Bill Luebkert [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, July 10, 2002 6:02 PM
 To:   Erich C. Beyrent
 Cc:   [EMAIL PROTECTED]
 Subject:  Re: Help with file parsing
 
 Erich C. Beyrent wrote:
  Hey everyone,
  
   I have a file that looks like:
  
   [record_1]
   here=20
   is=20
   some
   text
   [record_2]
   and=20
   some
   more
   [record_3]
   ...
  
   What I am trying to do is open the file and print all the lines in =
   between particular record sets.  However,  my pattern matching skills =
   are not what they ought to be
   because I cannot get this to work.
  
   If I want to print all the text in between [record_one] and =
   [record_two], how do I do this?
  
   Here is a sample of my code:
  
   open (FILE, $file) or die Cannot open $file: $!\n;
   while (FILE)
   {
   my $line = @_;
  # We know which record to start at, and want to
  # grab all the text until the next record
   if (/^[record_one]/ .. /^[+[A-Za-z]+]/)
   {
   print $line\n;
   }
   }
   close FILE;
  
  I am a Perl novice, so don't laugh too hard when you look at my code...
  Thanks in advance for your help!
 
 In addition to the other replies that should work, I'll stick with
 your code and make a few changes:
 
 open FILE, $file or die Cannot open $file: $!;
 while (FILE) {
   if (/^\s*\[record_one\]/ .. /^\s*\[\w+\]/) {
   print $_;   # note that starting/ending lines will print
   }
 }
 close FILE;
 
 
 -- 
,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
   (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
/ ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
 -/-' /___/__/_/_ Castle of Medieval Myth  Magic
 http://www.todbe.com/
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
** 
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs