[22510] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4731 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 19 14:10:47 2003

Date: Wed, 19 Mar 2003 11:10:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 19 Mar 2003     Volume: 10 Number: 4731

Today's topics:
        String replace and Redirect URL (Hunter)
    Re: String replace and Redirect URL <glex_nospam@qwest.net>
    Re: TCP testing... <nobull@mail.com>
    Re: Why can not  use this regexp to determine the prime (W.J cnqin )
        Why is alarm() waiting for inconsistent periods of time (Carlton Brown)
    Re: Win32 Perl newsgroup? <bart.lateur@pandora.be>
    Re: Win32 Perl newsgroup? <aknntp@yahoo.com>
    Re: Win32 Perl newsgroup? (Tad McClellan)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 19 Mar 2003 09:42:36 -0800
From: dave_h4@yahoo.com (Hunter)
Subject: String replace and Redirect URL
Message-Id: <27ad91d2.0303190942.511f49fb@posting.google.com>

Hi Group - If a link does  not exist on my server,then I want a cgi to
check another directory before outputting a 404 message to the user.
This is what I have in my 404 script, but it doens't quite work.
Perhaps there are better ways of accomplishing this task:

my $server = "http://www.mydomain.com";
my $french = "french";
my $eng = "english";

  if ($ENV{'REQUEST_URI'} =~ /$french/) {

      $newpage = $ENV{'REQUEST_URI'};
      $newpage =~ s/$french/$eng/;
      print "Location: $server$newpage\n\n";

   } elsif ($ENV{'REQUEST_URI'} =~ /$eng/) {

       $newpage = $ENV{'REQUEST_URI'};
       $newpage =~ s/$eng/$french;
       print "Location: $server$newpage\n\n";

   } else {

   print "Content-type: text/html";
   print "Status: 404 Not Found";

print <<TOP_TOP;

<html><head><title>404 Error Message 404</title></head>
<body>
 <table border=0 width="500" align="center">
  <tr>
    <td>Please check the URL to ensure it is correct</td>
  </tr>
 </table>

</body>
</html>

TOP_TOP

}


------------------------------

Date: Wed, 19 Mar 2003 12:43:00 -0600
From: Jeff D Gleixner <glex_nospam@qwest.net>
Subject: Re: String replace and Redirect URL
Message-Id: <lQ2ea.154$1Y3.64704@news.uswest.net>

Hunter wrote:
> Hi Group - If a link does  not exist on my server,then I want a cgi to
> check another directory before outputting a 404 message to the user.
> This is what I have in my 404 script, but it doens't quite work.
> Perhaps there are better ways of accomplishing this task:
First, try running your script and you'll see you have an
error. Second, if the page doesn't exist, it'll redirect forever...

If you use Apache, look at mod_negotiation

http://httpd.apache.org/docs/mod/mod_negotiation.html

See ya



------------------------------

Date: 19 Mar 2003 18:33:59 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: TCP testing...
Message-Id: <u97kav4354.fsf@wcl-l.bham.ac.uk>

"Al" <carriera@nortelnetworks.com> writes:

> Newby alert!   I'm not going to say this is probably a stupid question (but
> it probably is).
> 
> I just want a simple script that I can call and specify an IP address, a
> port and a packet size.
> 
> The script would then send a TCP packet to that destination. I was able to
> do it for UDP...

As viewed from above TCP protocol is not packet based.

Some operating systems (e.g. Linux) provide a means (for super-users)
to connect the socket interface into to lower levels of the protocol
stack.

This question has a lot more to do with your OS than it has to do with
what language you happen to be writing in.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


------------------------------

Date: 19 Mar 2003 22:58:16 +0800
From: qin@freebsd.lzu.edu.cn (W.J cnqin )
Subject: Re: Why can not  use this regexp to determine the prime?
Message-Id: <86el535rp3.fsf@freebsd.lzu.edu.cn>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:

> W.J cnqin  <qin@freebsd.lzu.edu.cn> wrote in comp.lang.perl.misc:
> > 
[..]
> 
> The logic is wrong.  Think about what /(11+)+/ matches.  The parenthesized
[..]
> > why the regexp must be written as /^(11+)\1+$/ ? 
> 
> I don't know if it *must* be written this way, but now the logic works.
> The total match is always a repetition of the same number of ones.
> 
> Anno

I am using 'MUST' to emphasize the diference between the first and the second
regexp. Of course , there are many solutions using regexp.
Yes , I anderstand. For example , '1' x 7  can be devided into (111) (11)
 (11). Thanks.


------------------------------

Date: 19 Mar 2003 09:14:34 -0800
From: carltonbrown@hotmail.com (Carlton Brown)
Subject: Why is alarm() waiting for inconsistent periods of time?
Message-Id: <aa611a32.0303190914.7b2029cf@posting.google.com>

I am attempting to use alarm(10800) and I find that it is alarming 1
to 3 seconds sooner than I expect.   There seems to be no consistency
to the behavior and it is quite vexing.

From reading the docs and newsgroups, I've eliminated the typical
suspects:

1)  Mixing sleep() with alarm()  
(I have intentionally avoided doing this)

2)  On some older systems, it may sleep up to a full second less than
    what you requested, depending on how it counts seconds. 

(The shorter sleep time sounds familiar, but I don't think our SunOS
5.8 really qualifies as "older".)

3)  Most modern systems always sleep the full amount. They may appear
to sleep
    longer than that, however, because your process might not be
    scheduled right away in a busy multitasking system.

(The "busy multitasking system" is applicable, but not the expected
result.  I'm having shorter than expected alarm times, not longer
alarm times)

Can anyone tell me what I am doing that may be causing this behavior?

Here is the script.  Its mission in life is to monitor log files and
move them elsewhere when a size limit has been exceeded.   The alarm
is being used to write a "still alive" message to the log during long
periods of inactivity.  I am using 3 hours in this case.

#!/usr/bin/perl 
###################################
##             Initial           ##
###################################

doInitialize();			# Initialize - get options, load config, set flags
goFork() if ($RUN_AS_DAEMON);	# If running as daemon, go ahead and
fork now, to get the running PID
validateLock()			or  die ("Lock check failed - $ERR_MSG\n");

logger("Starting logmon with params: archive dir $ARCHIVE_DIR, config
file $CONFIG_FILE, default size limit $MAX_FILE_SIZE, loop wait
$LOOP_INTERVAL, keepalive $IDLEMSG_TIME");
# Read valid config file values into an array
@GLOB_ARRAY = readConfigInfo($CONFIG_FILE) or doExit("Coudln't read
config file - $ERR_MSG");
buildFileList(@GLOB_ARRAY);	# Do this on the first pass to display the
settings
goSilent() if ($IS_DAEMON);	# Detatch from STDIN, STDOUT, to avoid
mailing junk from cron

###################################
##             Main              ##
###################################

# The main loop runs infinitely (as long as the destination dir is
writable)
waitZero();
alarm($IDLEMSG_INTERVAL);		# Initialize the keepalive timer
while (-w $ARCHIVE_DIR) {
	(validateLock()) 	or doExit("Lock check failed - $ERR_MSG\n");
	# On every pass, we read the config file if it is there, otherwise we
use the cache
	if (readConfigInfo($CONFIG_FILE)) { 
		@GLOB_ARRAY = readConfigInfo($CONFIG_FILE);
		if ($USE_CACHE) { logger("Found config file, refreshing cache");
undef $USE_CACHE; }
	} else { 
		logger("Warning: Couldn't read config file - $ERR_MSG")          
unless ($USE_CACHE);
		logger("Warning: Using cached copy of configuration parameters") 
unless ($USE_CACHE);
		$USE_CACHE = "true";
	}
	%FILE_ATTRS = buildFileList(@GLOB_ARRAY); 
	foreach $filename (keys(%FILE_ATTRS)) {
		# Checks the size and archives the file if it is too large
		doArchivePass($filename,$FILE_ATTRS{$filename}) unless
($DONE_LIST{$filename});
		# Show this file as archived in case somehow it comes up again on
this pass
		$DONE_LIST{$filename} = time();
	}
	undef %DONE_LIST; 
	pause($LOOP_INTERVAL);
}
doExit("Exiting because dest dir $ARCHIVE_DIR no longer writable"); 


###################################
##          Subroutines          ##
###################################

sub doInitialize() {
	# Import modules
	use POSIX qw(strftime);		# For easy date manipulation
	use File::Copy;			# To simplify file copying
	use Getopt::Long;		# To simplify getting command line options

	# Get the options from the command line
	GetOptions     ('d=s'	=> \$ARCHIVE_DIR,
			'b=s'	=> \$MAX_FILE_SIZE,
			'c=s'	=> \$CONFIG_FILE,
			'l=s'	=> \$LOG_FILE,
			's=s'   => \$LOOP_INTERVAL,
			'k=s'   => \$IDLEMSG_INTERVAL,
			'test'	=> \$IS_TEST,
			'daemon'=> \$RUN_AS_DAEMON,
			'usage'=>  \$USAGE,
			'v=s'	=> \$DEBUG_LEVEL);		

	($USAGE) && die "Usage:  $0 -daemon RUN_AS_DAEMON -d ARCHIVE_DIR -b
MAX_FILE_SIZE -c CONFIG_FILE -l LOG_FILE\n";

	# User our sigHandler to catch signals, the \& reference is safest
	$SIG{'TERM'} = \&sigHandler;
	$SIG{'QUIT'} = \&sigHandler;
	$SIG{'INT'}  = \&sigHandler;
	$SIG{'HUP'}  = \&sigHandler;
	$SIG{'USR1'} = \&sigHandler;
	$SIG{'ALRM'} = \&sigHandler;

	# Default values if command line options not defined
	$ARCHIVE_DIR	||= "$ENV{NMS_HOME}/Log/back_log";
	$LOG_FILE	||= "$ENV{NMS_HOME}/tmp/logmon.log";
	$CONFIG_FILE	||= "$ENV{NMS_HOME}/tmp/logmon.cfg";
	$MAX_FILE_SIZE	||= "8000000";	# A default value 
	$LOOP_INTERVAL	||= "1";	# A default value 
	$DEBUG_LEVEL	||= "0"; 	# Unused
	$IDLEMSG_INTERVAL ||= "10800";	# Interval for writing "still alive"
messages to log

	# Other startup flags
	$GLOBAL_LOCK_FILE = setLockName($0);
	$SHOW_CONFIG      = "true";
}

sub readConfigInfo($) {
	undef %pattern_index; undef @pattern_list;
	my $filename = shift;
	# Open the config file and read each line
	unless (open (CONFIGFILE,"$filename")) { $ERR_MSG = "$!"; return; };
	while (<CONFIGFILE>) {
		my $line = $_; $line =~ s/\n//g;
		# Ignore comment lines in the config file
		unless ($line =~ /^\W*\#/) {
			# Expand the known environment variables
			$line =~ s/\$?NMS_HOME/$ENV{NMS_HOME}/g;
			$line =~ s/\$?OSI_HOME/$ENV{OSI_HOME}/g;
			$line =~ s/\$?NIMBUS_HOME/$ENV{NIMBUS_HOME}/g;
			
			# Extract the glob pattern and numeric sizelimit value from the
comma-delimited line
			my ($pattern,$number) = split (/,/,$line);
			# Ensuring that the size limit consists of one or more digits,
using default if not
			local $sizelimit = ($number =~ /(\d+)/)[0] ;
			$sizelimit = $MAX_FILE_SIZE if ( ! $sizelimit =~ /d/);
			# pattern_list  is an array of patterns to be globbed
			# pattern_index is an index of patterns already loaded into
pattern_list
			push(@pattern_list,"$pattern,$sizelimit") unless
($pattern_index{$pattern});
			$pattern_index{$pattern} = $sizelimit;
		}
	}
	close CONFIGFILE;
	return @pattern_list;
}

sub buildFileList(@) {
	my @list = @_; 
	my %file_attrs;
	# Now map the glob-to-sizelimit hash into a filename-to-sizelimit
hash
	foreach $entry (@list) {
		my ($pattern, $sizelimit) = (split(/,/,$entry));
		# This section can error if the dir doesn't exist, so try to check
for the dir
		$pattern =~ /^(.*)\//;
		# Also note that PERL globbing cannot expand embedded subdirs like a
shell could
		my $dirPattern = $1;
		if ( -e $dirPattern)   { 
			# Build a list of files that match this pattern
			foreach $filename (glob("$pattern")) {
				$filename =~ s/\s+//g;		# Strip out spaces
				unless ($file_attrs{$filename}) {
					$file_attrs{$filename} = $sizelimit;
					logger("Debug: Size limit is $sizelimit for $filename") if
($SHOW_CONFIG);
				}
			}
		}
	}
	undef $SHOW_CONFIG;
	return %file_attrs;
}

sub validateLock() {
	# If lock file exists, validate our PID against the contents, if not
exists, create it.
	if (-e $GLOBAL_LOCK_FILE) {
		$lockPid = readLock();
		# If we know we have forked, update file, otherwise read the file
		if ($lockPid == $ORIG_PID) { 
			$lockPid = $$; undef $ORIG_PID; 
			updateLock($lockPid) or logger("Couldn't update pid in
$GLOBAL_LOCK_FILE");
		}	
	} else {
		unless (createLock($GLOBAL_LOCK_FILE)) {$ERR_MSG = "Cannot find or
create $GLOBAL_LOCK_FILE"; return; };
		$lockPid = $$;
		updateLock($lockPid) or logger("Couldn't update pid in
$GLOBAL_LOCK_FILE");
	}

	# If contents of lock file is not a PID, rewrite the lock file and
reset the lock pid
	if (! $lockPid =~ /(\d+)/) {
		logger("Lock check - non-numeric string \"$lockPid\" found in
$GLOBAL_LOCK_FILE");
		# Either pid has changed or file contains garbage, so rewrite lock
file
		$lockPid = $$;			
		# Update the log file if it doesn't contain a valid PID
		updateLock($lockPid) or logger("Couldn't update pid in
$GLOBAL_LOCK_FILE");
	}

	# Moment of truth... if our pid isn't the lock pid, we fail
	if ($lockPid != $$) {
		$ERR_MSG = "Our pid is $$ but found pid number $lockPid in
$GLOBAL_LOCK_FILE";
		return;
	} else {
		return $lockPid;
	}
}

sub readLock() {
	# Get the PID from the lock file
	my $lockpid;
	# Yes, this test might fail, we will catch it elsewhere
	if (-e $GLOBAL_LOCK_FILE) {
		open(LOCKFILE,"$GLOBAL_LOCK_FILE");
		my @lockfile = <LOCKFILE>;
		close LOCKFILE;
		$lockfile[0] =~ /(\d+)/;
		$lockpid = $1;
	}
	return $lockpid;
}

sub createLock($) {
	# Create the lock file
	my $lockFileName = shift;
	if (-e $lockFileName) { 
		$ERR_MSG = "createLock failed because lock file exists:
$lockFileName";
		return;
	}
	open(LOCKFILE,">>$lockFileName")  	or return;
	logger("Created lock file file $lockFileName");
	close LOCKFILE;
	return "$lockFileName";
}

sub setLockName() {
	# Create a lock file named after the script, containing the PID,
return the name of lock file
	my $full_path = shift;
	$partial_path = ($full_path =~ /^(\S+)/)[0];
	$script_name = (split(/\//,$partial_path))[-1];
	my $lockFileName = "/tmp/${script_name}.lock";
	return $lockFileName;
}

sub removeLock($) {
	# Remove the lock file
	my $file = shift;
	logger("Removing lock file $file") unless $IS_TEST;
	unlink($file);
}

sub updateLock($) {
	# Write a PID into the lock file
	my $pid = shift;
	open(LOCKFILE,">$GLOBAL_LOCK_FILE")  	or return;
	print LOCKFILE "$pid" 			or return;
	logger("Writing pid $pid to lock file $GLOBAL_LOCK_FILE");
	close LOCKFILE;
	return $pid;
}

sub doArchivePass(@) {
	# Archives the file if it exceeds its size
	# usage: doArchivePass(filename,sizelimit);
	local $srcFile = shift;
	my $sizeLimit = shift;
	my $fileSize = (stat($srcFile))[7];
	if ($fileSize > $sizeLimit) {
		$SIG{'ALRM'} = 'IGNORE';	# Suspend SIGALRM handling before file move
		# Create the name of the archive file and archive the file
		local $destFile = archFileName($srcFile);
		logger("Exceeded size limit $sizeLimit for $srcFile, \(file size is
$fileSize\)");
		fileMove($srcFile,$destFile);
		alarm($IDLEMSG_INTERVAL);	# Reset the keepalive timer
		$SIG{'ALRM'} = \&sigHandler;	# Resume SIGALRM handling after file
stat/move
	}

	#### Sub-subroutines ### 
	# Takes a log file name, returns a datestamped archive file name
	sub archFileName($) {
		my $name = shift;
		$name = (split(/\//,$name))[-1];
		my $date = strftime "%Y%m%d%H%M%S", localtime(time());
		my $name = "$ARCHIVE_DIR\/"."$name"."\.$date";
		return $name;
	}

	# Takes a log file name and arch file name, archives, returns status
	sub fileMove(@) {
		local $currFile = shift;
		local $dstFile  = shift;
		local $errstr   = "$currFile archive to $dstFile failed because";
		  $currFile =~ /^(.*)\//;
		local $srcDir = $1;
		if (! -w $ARCHIVE_DIR)   { warn "$errstr ARCHIVE_DIR $ARCHIVE_DIR
not writable\n";    return 1;}
		if (! -r $currFile) { warn "$errstr file $currFile not readable\n"; 
  return 1;}
		if   (-e $dstFile)  { warn "$errstr target $dstFile already
exists\n"; return 1;}
		doRelink() unless ($IS_TEST);

		#### Sub-sub-subroutines ###
		# The actual file move routine
		sub doRelink() {
			# If source and dest on same file system, use link(), otherwise use
move()
			if ( (stat($srcDir))[0] == (stat($ARCHIVE_DIR))[0] ) {
				if (link("$currFile","$dstFile")) {
					unless (unlink("$currFile")) {
							return 1;
					} else {
						logger("Success relinking $currFile to $dstFile");
						undef $FILE_ATTRS{$currFile};
					}
				} else {
					logger("Failed relinking $srcFile to $dstFile because: $!");
					return 1;
				}
			} else {
				unless (move("$currFile","$dstFile")) {
					logger("Failed moving $currFile to $dstFile operation failed
because: $!");
					return 1;
				} else {
					logger("Success moving $currFile to $dstFile");

				}
			}
		}
	}
}


sub logger($) {
	# Format a log message and write it to the log
	# We open and close every handle every time, so that our log file can
be moved
	my $msg = shift;
	$msg = "\[$$\] $msg";
	my $date = strftime "%m/%d/%Y %H:%M:%S", localtime(time());
	open (LOG,">>$LOG_FILE");
	print LOG "$date $msg\n";
	close LOG;
	print "$date $msg\n";
}

sub sigHandler() {
	my ($sigName) = @_; 
	if ($sigName =~ /ALRM/) {
		logger("No new activity in $IDLEMSG_INTERVAL seconds");
		alarm($IDLEMSG_INTERVAL);		# Reinitialize the keepalive timer
		return;
	}
	logger("PID $$ caught SIG${sigName}");
	if ($sigName =~ /HUP/) {
		unless ($IS_DAEMON) {
        		logger("Going into daemon mode, PID will change.");
        		daemonize();
		} else {
        		logger("Ignoring signal because already running as
daemon.");
		}
	}
	if ($sigName =~ /USR1/) {
        	logger("Dumping configuration info on next archive pass
\(intervals are $LOOP_INTERVAL seconds\)");
		$SHOW_CONFIG = "true";	
	}
	if ($sigName =~ /TERM|QUIT|INT/) { 
		doExit("Going down on SIG${sigName}"); 
	}
}
 
sub daemonize() {
	# Become a daemon
	goFork();
	goSilent();
}

sub goFork() {
	# First part of becoming a daemon, changes the PID
	$ORIG_PID = $$;			# Set this flag so we don't fail the lock check
later
	# Change dir to root, so that we do not block unmounting of file
systems when system shuts down
	chdir '/'			or doExit("Can't chdir to /: $!");
	# Fork a child, which inherits our state, and then exit
	defined(my $pid = fork)		or doExit("Can't fork: $!");
	exit if $pid;			# The parent ends here (fork returns null in the
child process)
	# We are now a forked child - separate from the parent's signals and
tty
	setsid				or doExit("Can't dup stdout: $!");
	$IS_DAEMON = "true";		# Set this flag so we don't daemonize again
later
	alarm($IDLEMSG_INTERVAL);		# Re-initialize the keepalive timer
}

sub goSilent() {
	# Second part of becoming a daemon, detaches STDOUT, STDIN, STDERR
	print "Going into daemon mode, press return to get the prompt
back...\n";
	# Redirect STDIN, STDOUT, STDERR to /dev/null, so we don't generate
email from cron
	open STDIN, '/dev/null' 	or     warn("Can't read /dev/null: $!");
	open STDOUT, '>/dev/null'	or doExit("Can't write to /dev/null :$!");
	open STDERR, '>&STDOUT'		or doExit("Can't dup stdout: $!");
}

sub doExit($) {
	my $reason = shift;
	removeLock($GLOBAL_LOCK_FILE);
        close LOCKFILE;
	logger("Pid $$ exiting because $reason");
	exit 0;
}

sub waitZero() {
	# Start only when seconds = 0.  Sometimes debugging is easier this
way.
	return if ((localtime())[0] == 0);
	while ((localtime())[0] != 0) {
		$countdown = 60-(localtime())[0];
        	logger("Starting in $countdown seconds") if ((!
$countdown%10) && ($DEBUG_LEVEL));
        	pause(1);
	}
}

sub pause($) {
	# Because sleep() interferes with alarm(), we kludge with select()
instead.
        $timeout = shift;
        select (undef, undef, undef, $timeout);
}


------------------------------

Date: Wed, 19 Mar 2003 14:53:36 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Win32 Perl newsgroup?
Message-Id: <tr0h7vo69nefe533hht185dj6mulsq19f1@4ax.com>

AK wrote:

>Like I mentioned, the issue I have right now is finding a way to send an email
>via Yahoo's SMTP server from a Perl script running on my Win2K laptop. I do not
>have access to any other SMTP server right now, unlike Unix boxes where a
>functional sendmail (or equivalent) is practically assumed to work without any
>explicit SMTP authentication. Yahoo's SMTP servers require you to explicitly
>authenticate before they will relay the email.

Look into the Net::SMTP module.

	<http://search.cpan.org/author/GBARR/libnet-1.13/Net/SMTP.pm>

In particular, search for the auth() method. I think that could be the
one solving your problem.

It should work on Windows.

-- 
	Bart.


------------------------------

Date: Wed, 19 Mar 2003 10:15:54 -0500
From: AK <aknntp@yahoo.com>
Subject: Re: Win32 Perl newsgroup?
Message-Id: <2n0h7v0bm6anom98t5vei2q8p9k5hopsun@4ax.com>

>>Like I mentioned, the issue I have right now is finding a way to send an email
>>via Yahoo's SMTP server from a Perl script running on my Win2K laptop. I do not
>>have access to any other SMTP server right now, unlike Unix boxes where a
>>functional sendmail (or equivalent) is practically assumed to work without any
>>explicit SMTP authentication. Yahoo's SMTP servers require you to explicitly
>>authenticate before they will relay the email.
>
>Well, whatever your problem, it has nothing whatsoever
>to do with either Win32 or Perl, so looking for answers
>in newsgroups or mailing lists about those two subjects
>is a lost cause.

Helgi, read my post again. You will note that my basic problem was trying to get
a *Perl* script to send email to Yahoo's SMTP servers on *Windows 2000*. 
How can this newsgroup and/or ActiveState's mailing lists not be the *best*
places to start searching for solutions?!

>>Anyway, if you have an example using MIME::Lite (or any other module for that
>>matter) where you can authenticate with the SMTP server before sending out an
>>email, I'd appreciate it if you could share it with me.
>
>perldoc Net::SMTP
>or
>http://www.perldoc.com/perl5.8.0/lib/Net/SMTP.html

I understand that pointing me to perldoc Net::SMTP might be a good start, but
you could have given me some benefit of the doubt in that I may have read the
docs and tried out code *before* I posted my question, and added some
suggestions based on your experience (if any) with SMTP authentication.
Net::SMTP has not worked so far for me for authentication to Yahoo's SMTP
server.

Now I have already admitted that I am a relative newcomer both to Perl as well
as Usenet. And I am looking for pointers to help see something I may be missing.
So far, the responses I've got to my posts have been very useful.
But let me say this - the comments in your (helgi@decode.is (Helgi Briem)) last
post about 'lost cause' and RTFM are not very encouraging or helpful. If you are
not able to provide any insight, that's fine. But I could do without the summary
dismissal of my problem.

Anyway, for anyone interested in knowing this: I did get email with SMTP
authentication from/to Yahoo working using a combination of Mail::Sender and
Net::POP3 
(See Message-ID: <8c1g7vcsf2eq58q2nli3q7u1jgi2gohjp7@4ax.com>)

- AK



------------------------------

Date: Wed, 19 Mar 2003 09:51:24 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Win32 Perl newsgroup?
Message-Id: <slrnb7h4fs.439.tadmc@magna.augustmail.com>

AK <aknntp@yahoo.com> wrote:

> you could have given me some benefit of the doubt in that I may have read the
> docs and tried out code *before* I posted my question,

> Now I have already admitted that I am a relative newcomer both to Perl as well
> as Usenet. 


We assume the most common case, not the more rare case.

Since you are new here, you probably just do not yet realize that
the majority of posters here do NOT try to answer their question
themselves before posting.


(and taking on a regular here when you are so new as to not know 
 How Things Are here is presumptuous/risky. Please observe the
 newsgroup for several weeks before telling us how it should be.
)

-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 4731
***************************************


home help back first fref pref prev next nref lref last post