[tpop3d-discuss] Compilation trouble on Solaris

Paul Makepeace Paul.Makepeace at realprogrammers.com
Sat, 19 Jan 2002 13:03:23 -0800


On Sat, Jan 19, 2002 at 09:48:35PM +0100, Martin Schmitt wrote:
> So here is what I produced so far:
> 	http://www.trash.net/~martin/dotpop-secret.txt

There is one bug I've seen:

	# Now open the .pop-secrets file
	open my $popsecrets, "<$file";

	# Fail if the filehandle could not be created
	unless ($popsecrets){

Regardless of whether that file opens or not, $popsecrets will still be
set and that test isn't doing what you think. Try,

	# Now open the .pop-secrets file,
	# failing if the filehandle could not be created
	open my $popsecrets, "<$file" or do {
 
plus a trailing ; for the do block. TIMTOWTDI of course :-)

(
if ($pass=~ /^\s*$/){

is a bit redundant given the regexes beforehand, fwiw. unless ($pass)
would do it.
)

HTH a bit,
Paul


-- 
Paul Makepeace ....................................... http://paulm.com/

"What is holding me down? Well if you don't know by now, then I'll not
 tell you."
   -- http://paulm.com/toys/surrealism/