[10923] in Perl-Users-Digest
Perl-Users Digest, Issue: 4524 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Dec 31 13:07:21 1998
Date: Thu, 31 Dec 98 10:00:21 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 31 Dec 1998 Volume: 8 Number: 4524
Today's topics:
**Need Help**: Newbie To PERL (Iskandar D)
[Q] How use Cookie? <HongMo@netsgo.com>
Re: [Q] How use Cookie? <upsetter@ziplink.net>
Re: CGI.pm abnormal end <newsposter@cthulhu.demon.nl>
Re: Changing Environment Variables in a shell <mkahn@vbe.com>
Re: Deleting files in Win32 with PERL CGI <off-duty@entheosengineering.com>
dmake not GNU compliant? Anybody confirm or deny this? (Charles Wilt)
Re: dmake not GNU compliant? Anybody confirm or deny t (Randy Kobes)
Re: Flock not working Can't figure out why! <off-duty@entheosengineering.com>
Re: Flock not working Can't figure out why! (Bart Lateur)
Re: help HTTP::Request::Form and reset button <off-duty@entheosengineering.com>
help <wclui@virtue.csis.hku.hk>
Learning Perl '95 augie@nic.com
Re: Learning Perl '95 <brad.nestelroad@lmco.com>
Re: Learning Perl '95 <brad.nestelroad@lmco.com>
Re: matching parentheses quickly <newsposter@cthulhu.demon.nl>
Newbie - OPEN() gives sh error - why? <pdelisle@bizonline.net.NOSPAM>
Re: Newbie: string terminator <newsposter@cthulhu.demon.nl>
Re: Newbie: string terminator (Bart Lateur)
Re: Perl 5 on HP <ab@ccn.net>
Perl equivalent of 'C' #include <abc@abc.com>
Re: Perl equivalent of 'C' #include (Andrew M. Langmead)
Re: Perl Install on NT (Michael Rubenstein)
Re: Problem with Net::SMTP under NT (Stefaan A Eeckels)
Problem with Win32API::Net::UserEnum (Gareth Jones)
Re: Protecting my script from form data <off-duty@entheosengineering.com>
Re: Retrospective on comp.lang.perl.moderated? dturley@pobox.com
Re: Sig Trap Help Needed !! johnvv@hotmail.com
Thanks! and happy new year! (Gregg Silk)
Re: Thanks! and happy new year! (Bart Lateur)
Re: wildcard (Tad McClellan)
Re: wildcard <tchrist@mox.perl.com>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 31 Dec 1998 14:39:34 GMT
From: thekrow@iname.com (Iskandar D)
Subject: **Need Help**: Newbie To PERL
Message-Id: <368b8c6f.17227202@news.singnet.com.sg>
hi there,
i'm very keen to learn abt PERL. where do i start? any
good sites for beginners?
cheers,
iskandar
thekrow@iname.com
------------------------------
Date: Thu, 31 Dec 1998 23:25:13 +0900
From: "HongMo" <HongMo@netsgo.com>
Subject: [Q] How use Cookie?
Message-Id: <B3hcInMN#GA.215@news4.netsgo.com>
Example please.........
^^;
------------------------------
Date: Thu, 31 Dec 1998 17:09:17 GMT
From: Scratchie <upsetter@ziplink.net>
Subject: Re: [Q] How use Cookie?
Message-Id: <1dOi2.2227$J4.460493@news.shore.net>
HongMo <HongMo@netsgo.com> wrote:
: Example please.........
I tried using a cookie to write perl but wound up gumming up my keyboard
and I had to take it apart and shake all the crumbs out.
--Art
--
--------------------------------------------------------------------------
National Ska & Reggae Calendar
http://www.ziplink.net/~upsetter/ska/calendar.html
--------------------------------------------------------------------------
While you're spamming me, don't forget to include these guys:
Chairman Reed Hundt: rhundt@fcc.gov Comm. James Quello: jquello@fcc.gov
Comm. Susan Ness: sness@fcc.gov Comm. Rachelle Chong: rchong@fcc.gov
US Postal Service: customer@email.usps.gov Fraud Watch: fraudinfo@psinet.com
Federal Trade Commission: consumerline@ftc.gov
Oh, and while you're at it, pound some sand too!
admin@loopback $LOGIN@localhost $LOGNAME@localhost $USER@localhost
$USER@$HOST -h1024@localhost root@mailloop.com
------------------------------
Date: Wed, 30 Dec 1998 11:34:08 -0500
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: CGI.pm abnormal end
Message-Id: <368A55FA.CA4FC813@cthulhu.demon.nl>
Paul Farber wrote:
>
> Hello all...
>
> trying to get a form/cgi program to accespt some input and write it to a
> file. Alls going well except that the perl script that uses CGI.pm always
> end abnormally.
>
> The values are written to the disk, and the file is closed, but the server
> always send me to an error page about the script ending abnormally. The
> script seems to close the files/end properly.... and perl -c ran clean, I
^^^^^
do you actually check and handle possible errors properly?
> have use strict and use diagnostics... the thing runs clean but end
> normally...
>
> It this a script or form problem?
Try to cut down the script in size until it does not have the problem anymore,
then add things back in one by one. You'll be able to pinpoint exactly
what goes wrong.
Erik
--
Sure, doesn't everyone sign up for internet service so as to have
their mailbox stuffed with megabytes of postage-due rubbish every day?
Absolutely. And everyone who owns a car intends that it be used as a
portable dumpster. Any unwanted garbage in their vehicle they can
simply throw away, after all.
------------------------------
Date: Thu, 31 Dec 1998 09:16:53 -0600
From: Mark Kahn <mkahn@vbe.com>
Subject: Re: Changing Environment Variables in a shell
Message-Id: <368B9565.BFD84BD1@vbe.com>
Ramanujam Parthasarathi wrote:
>
> Hi,
>
> I'm trying to change the environment variables of the shell using PERL.
> Its a fact that the modifications are 'local' (PERLish) to the script
> (and any child processes). Is there any way I can modify the Environment
> variables (%ENV) of the current shell?
>
A child process cannot modify it's parent's environment.
You can assign to the %ENV hash as well as read from it:
$oldpath = $ENV{PATH}; # Save off original if needed
$ENV{PATH} = $oldpath . ':' . '/my/new/pathname'; #Append to PATH
or just
$ENV{PATH} .= ':/my/new/pathname';
--
~ M. Kahn <mkahn@vbe.com>
------------------------------
Date: Thu, 31 Dec 1998 08:08:14 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: Tim Bratcher <bratch@home.com>
Subject: Re: Deleting files in Win32 with PERL CGI
Message-Id: <368B854E.2E19B469@entheosengineering.com>
Tim Bratcher wrote:
>
> Actually, this is the contents of $filname:
>
> C:\DELFILES\"Copy (2) of Resistance.htm"
>
> It works from the command line, and it works from the CGI program if
> there are no spaces. I did chomp the filename, and I did tr /+/ /
> the spaces in the file name.
Try enclosing the whole thing in another set of quotes.
#i.e.:
$filename = "C:\DELFILES\"Copy (2) of Resistance.htm\"";
unlink ("$filename");
and see what happens.
Or try escaping the blanks, i.e. $filename =~ s/ /\\ /g;
>
> This is the first time perl has kicked my butt, and most of it
> is because I am using it on a win32 platform.
> Any other ideas?
Yeah - get a "Real" operating system, like Linux! :)
>
> Thanks,
> tim
> bratch@home.com
Cheers!
--
Rich Grise
off-duty@entheosengineering.com
(No need to futz with my e-mail: I have a "delete" button!)
------------------------------
Date: 31 Dec 1998 15:28:56 GMT
From: charles.0272@worldnet.no.spam.att.net (Charles Wilt)
Subject: dmake not GNU compliant? Anybody confirm or deny this?
Message-Id: <MPG.10f565ed6d0a0a3b9896af@netnews.worldnet.att.net>
Please excuse me, I new to Perl. I'm using the Activestate build 507 and
dmake v4.01. I was attempting to install a CPAN module using dmake when
I got the following error:
dmake.exe: makefile: line 648: Error -- Expecting macro or rule defn,
found neither
When I contacted the author of the module, I got the following response:
This is an compatibility problem. The makefile generated from Perl is
a "GNU makefile", and dmake isn't "GNU compliant". I suggest you to
use a better make, like the GNU one.
Any comment from you more experienced hands?
--
Charles Wilt
Miami Luken, Inc.
e-mail: charles.0272@worldnet.no.spam.att.net
--->remove the no.spam.
------------------------------
Date: 31 Dec 1998 16:04:16 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Re: dmake not GNU compliant? Anybody confirm or deny this?
Message-Id: <slrn78n8lq.nlj.randy@theory.uwinnipeg.ca>
On 31 Dec 1998 15:28:56 GMT,
Charles Wilt <charles.0272@worldnet.no.spam.att.net> wrote:
>Please excuse me, I new to Perl. I'm using the Activestate build 507 and
>dmake v4.01. I was attempting to install a CPAN module using dmake when
>I got the following error:
>
>dmake.exe: makefile: line 648: Error -- Expecting macro or rule defn,
>found neither
Hello,
ActiveState uses Microsoft's nmake (and VC++) by default, I believe.
If you want to use dmake (or a different compiler), you have to
change perl's Config.pm - look for a line that says make=... and
change it to dmake. Similar changes would need to be done if you
use a different compiler, along with the associated changes to
the lib and include paths.
You don't need to use a Unix-like make like from cygwin - either
nmake or dmake work quite successfully. In fact, to use cygwin's
make you'd probably have to recompile perl with the cygwin tools.
--
Best regards,
Randy Kobes
Physics Department Phone: (204) 786-9399
University of Winnipeg Fax: (204) 774-4134
Winnipeg, Manitoba R3B 2E9 e-mail: randy@theory.uwinnipeg.ca
Canada http://theory.uwinnipeg.ca/
------------------------------
Date: Thu, 31 Dec 1998 09:13:39 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: Mike <support@counter.w-dt.com>
Subject: Re: Flock not working Can't figure out why!
Message-Id: <368B94A3.24740A4B@entheosengineering.com>
Mike wrote:
>
> My flock isn't working in my program. It appears to work, doesn't give
> any errors or anything but occassionally it still fails and prints a
> file with nothing in it. It is suppose to keep the count of the total
> visitors each day and then the total visitors, but the numbers allways
> gets deleted and its basically worthless. Thanks for your help.
It looks like you're doing a whole bunch of stuff between reading the
file
and writing it. During that time, another copy of your script can open
the
file, read it, do that processing, then yours writes your data, then
the other one writes the data, and your data gets clobbered. I've done
something where I open the file for reading AND writing, lock it, read
it, process stuff, rewind the file (seek (FILE,0,0);) and then overwrite
the old data, then unlock the file. Or if you opened it for output right
away:
open (FILE, "<$myfile") or die "$myfile: $!";
@FILE = <FILE>;
close (FILE) or die "$myfile: $!"; open (FILE, ">$myfile") or die
"$myfile: $!";
flock (FILE, LOCK_EX) or die "flock $myfile: $!";
#actually, I don't know if putting the close(), open(), and flock() all
on the
same line would make any difference time-wise.
Or you could open it read-write and truncate it if truncate works on
your
system.
Cheers!
--
Rich Grise
off-duty@entheosengineering.com
(No need to futz with my e-mail: I have a "delete" button!)
------------------------------
Date: Thu, 31 Dec 1998 17:03:42 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Flock not working Can't figure out why!
Message-Id: <368eae2a.1021879@news.skynet.be>
Rich Grise wrote:
>#actually, I don't know if putting the close(), open(), and flock() all
>on the same line would make any difference time-wise.
None whatsoever. A statement is a statement, no matter how many you put
on one line. After all, a newline is just whitespace.
Bart.
------------------------------
Date: Thu, 31 Dec 1998 08:44:57 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: webmaster@link-maker.com
Subject: Re: help HTTP::Request::Form and reset button
Message-Id: <368B8DE9.53E07337@entheosengineering.com>
jim wrote:
>
> Hi,
>
> I've been working on a script to load form pages fill them out and
> submit them with the needed data. The only thing I've been unable to
> figure out is how I can ignore the reset buttons.
>
What if you just omit it?
[...]
> Any ideas or example would be a great help!
>
> Thanks!
> jimm@amug.org
You're welcome!
--
Rich Grise
off-duty@entheosengineering.com
(No need to futz with my e-mail: I have a "delete" button!)
------------------------------
Date: Fri, 1 Jan 1999 01:31:48 +0800
From: help <wclui@virtue.csis.hku.hk>
Subject: help
Message-Id: <Pine.GSO.4.03.9901010129270.20047-100000@virtue.csis.hku.hk>
Suppose I am connected to the Internet through PPP and I want to write a
perl script and run in my local machine.
Suppose I have a URL, say
http://xxx.com/xxx.jpg
How can I open a connection to the site and fetch the image?
Thank You.
------------------------------
Date: Thu, 31 Dec 1998 13:53:34 GMT
From: augie@nic.com
Subject: Learning Perl '95
Message-Id: <76fvku$n07$1@nnrp1.dejanews.com>
Hi all,
I'm taking a refresher course in Perl since I haven't used it in a while, and
I'm trying to figure out the best way to go. I'm reading through Learning
Perl right now. But the odds are pretty good I'll end up using a lot of Perl
on my Win 95 system. (Or at least until I get Linux completely set up and
feel comfortable with it.)
Should I drop Learning Perl and go straight to the Win32 version (gecko) of
the book, instead? Or should I read the Unix version first and then read the
gecko book? Does the gecko book cover Win 95 as well as Win NT?
Thanks for your help,
-Augie
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 31 Dec 1998 08:37:09 -0700
From: Brad Nestelroad <brad.nestelroad@lmco.com>
Subject: Re: Learning Perl '95
Message-Id: <368B9A25.D6B922A9@lmco.com>
Dont bother with the Gecko book if you already have the llama book. They are 95%
the same. I use Perl on NT and religiously use the llama book.
augie@nic.com wrote:
> Hi all,
>
> I'm taking a refresher course in Perl since I haven't used it in a while, and
> I'm trying to figure out the best way to go. I'm reading through Learning
> Perl right now. But the odds are pretty good I'll end up using a lot of Perl
> on my Win 95 system. (Or at least until I get Linux completely set up and
> feel comfortable with it.)
>
> Should I drop Learning Perl and go straight to the Win32 version (gecko) of
> the book, instead? Or should I read the Unix version first and then read the
> gecko book? Does the gecko book cover Win 95 as well as Win NT?
>
> Thanks for your help,
> -Augie
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 31 Dec 1998 08:43:44 -0700
From: Brad Nestelroad <brad.nestelroad@lmco.com>
Subject: Re: Learning Perl '95
Message-Id: <368B9BAF.E3FA98EF@lmco.com>
Dont bother with the Gecko book if you already have the llama book. They are 95%
the same. I use Perl on NT and religiously use the llama book.
augie@nic.com wrote:
> Hi all,
>
> I'm taking a refresher course in Perl since I haven't used it in a while, and
> I'm trying to figure out the best way to go. I'm reading through Learning
> Perl right now. But the odds are pretty good I'll end up using a lot of Perl
> on my Win 95 system. (Or at least until I get Linux completely set up and
> feel comfortable with it.)
>
> Should I drop Learning Perl and go straight to the Win32 version (gecko) of
> the book, instead? Or should I read the Unix version first and then read the
> gecko book? Does the gecko book cover Win 95 as well as Win NT?
>
> Thanks for your help,
> -Augie
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Wed, 30 Dec 1998 11:25:48 -0500
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: matching parentheses quickly
Message-Id: <368A5406.EF2F58A1@cthulhu.demon.nl>
Andrew Mayo wrote:
>
> I have this nagging feeling that the problem below can be solved with an
> elegant regular expression - but for the life of me I can't see the
> solution.
Probably because you can't do that with regular expression.
>From perlfaq6:
Can I use Perl regular expressions to match balanced text?
Although Perl regular expressions are more powerful than "mathematical" regular
expressions, because they feature conveniences like backreferences (\1 and
its ilk), they still aren't powerful enough. You still need to use non-regexp
techniques to parse balanced text, such as the text enclosed between matching
parentheses or braces, for example.
An elaborate subroutine (for 7-bit ASCII only) to pull out balanced and
possibly nested single chars, like ` and ', { and }, or ( and ) can be
found in http://www.perl.com/CPAN/authors/id/TOMC/scripts/pull_quotes.gz .
The C::Scan module from CPAN contains such subs for internal usage, but they
are undocumented.
Erik
--
Sure, doesn't everyone sign up for internet service so as to have
their mailbox stuffed with megabytes of postage-due rubbish every day?
Absolutely. And everyone who owns a car intends that it be used as a
portable dumpster. Any unwanted garbage in their vehicle they can
simply throw away, after all.
------------------------------
Date: Thu, 31 Dec 1998 17:23:38 GMT
From: Philip de Lisle <pdelisle@bizonline.net.NOSPAM>
Subject: Newbie - OPEN() gives sh error - why?
Message-Id: <VA.00000159.0054d46e@fred.bizonline.net>
Help please!
I have to open a pipe to a program and pass some parameters which
could contain spaces so they need to be in quote marks. My code looks
like
$Name = "Philip de Lisle";
$user = "pdelisle";
open(UA, "| /usr/sbin/useradd -M -c '$Name' $user") || die "open:
$!";
close(UA);
When I execute the open() command I get an error from sh saying
"Unexpected EOF while looking for `''
I've spent all day trying to figure this out. If I manually enter the
data in the open() call it works but the moment I put back the $Name
variable it breaks. I've tried everything I can think of including
adding escaped quotes into the $Name variable itself.
There must be a solution for this but I can't find it. The camel book
didn't even give me a clue ... :(
What have I missed?
TIA
Regards
Philip
(remove .NOSPAM to email me)
--
Philip de Lisle
Managing Director
-------------- Business Online (UK) plc --------------
Business Online | Public Online
http://www.bizonline.net | http://www.publiconline.net
------------------------------
Date: Wed, 30 Dec 1998 11:18:32 -0500
From: Erik van Roode <newsposter@cthulhu.demon.nl>
Subject: Re: Newbie: string terminator
Message-Id: <368A5253.380D394@cthulhu.demon.nl>
Damian Hughes wrote:
>
> I've got the following syntax error with a perl script ....Can't find
> string terminator '"' anywhere before EOF at line 792.... I've trawled
> the web for a solution but the replies are at least confusing, at best
> misleading. Although I don't know Perl, looking at line 792, there
> appears to be nothing untoward. Can anyone please help?
This error message tells you that somewhere in your script there is
a string that does not have a string terminator. The message also
says that it kept looking for the string terminator, but could not
find it because it encountered the end of file.
Somewhere you did something like:
print "Hello world;
foo ();
Try to check the area that you last modified for missing string terminators.
Erik
--
Sure, doesn't everyone sign up for internet service so as to have
their mailbox stuffed with megabytes of postage-due rubbish every day?
Absolutely. And everyone who owns a car intends that it be used as a
portable dumpster. Any unwanted garbage in their vehicle they can
simply throw away, after all.
------------------------------
Date: Thu, 31 Dec 1998 17:01:35 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Newbie: string terminator
Message-Id: <368dad3a.782022@news.skynet.be>
Damian Hughes wrote:
>I've got the following syntax error with a perl script ....Can't find
>string terminator '"' anywhere before EOF at line 792.... I've trawled
>the web for a solution but the replies are at least confusing, at best
>misleading. Although I don't know Perl, looking at line 792, there
>appears to be nothing untoward.
In addition to what others already said about this...
Search for the very last occurence of '"' in your script. If it's
preceded with a backslash, search the one just before that... etc....
until you find the start of the string.
Hmm... Wouldn't Perl's error messgaes be more helpful if they mentioned
the line where this unterminated string starts, instead of where the end
of the file is?
Bart.
------------------------------
Date: Thu, 31 Dec 1998 15:53:20 +0100 (MET)
From: Arndt Baerschneider <ab@ccn.net>
To: Alexis Huxley <alexis@danae.demon.co.uk>
Subject: Re: Perl 5 on HP
Message-Id: <XFMail.981231155320.ab@ccn.net>
Hi Alexis!
On 31-Dec-98 Alexis Huxley wrote:
>> who can help me finding a binary distribution of perl 5.00x for HP-UX
>> 10.20?
>=20
> Check the Liverpool archive http://hpux.csc.liv.ac.uk/
This is exactly the site I found (somehow ;-) !
Thanks for your answer
Arndt
------------------------------
Date: Thu, 31 Dec 1998 15:55:54 -0000
From: "Richard Gordon" <abc@abc.com>
Subject: Perl equivalent of 'C' #include
Message-Id: <76g6mi$2t6$1@mendelevium.btinternet.com>
I am new to perl and wonder if there an equivalent of 'C' #include in perl.
I am trying to do something like the following
#prog1.pl
$VAR1 = 1 ;
$VAR2 = 2 ;
#include "prog2.pl"
------------------------------
Date: Thu, 31 Dec 1998 17:33:29 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Perl equivalent of 'C' #include
Message-Id: <F4uBFu.GBn@world.std.com>
"Richard Gordon" <abc@abc.com> writes:
>I am new to perl and wonder if there an equivalent of 'C' #include in perl.
>I am trying to do something like the following
The equivilent, if it works on your system is the "-P" switch which
runs the C preprocessor. (Then all the C preprocessors commands like
#include and #define work.)
Perl's similar-built-in-but-with-slightly-different-semantics
functions include do, require, and use.
The do function was from very old versions of perl. It is the
simplest, but has the drawback of being executed every time it is
encountered.
Later require was added, it solved the problem with do by keeping
track of which files were already used, but added the requirement that
the file needs to end with a true value (commonly just "1;") to
signify that the file executed OK.
In version 5 of perl, use was for perl modules. It has a bit of
boilerplate overhead, but has some really nice features for large
scale programming. You can create a template for all of the
boilerplate stuff with the h2xs command.
h2xs -X -n ModuleName
Of course, for more information, you can always look up do, require,
and use from the perlfunc man page.
--
Andrew Langmead
------------------------------
Date: Thu, 31 Dec 1998 14:46:36 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Perl Install on NT
Message-Id: <36938cff.281884057@nntp.ix.netcom.com>
On Wed, 30 Dec 1998 21:55:38 -0600, "Al and Linda Adams"
<adams@enteract.com> wrote:
>Has anyone ever installed Perl from Windowsa NT Resource kit for
>workstations? What is needed as far as any compilers, and so on. I would
>appreciate help.
As I recall you don't need anything other than what comes with the
Resource Kit.
Howver, I would strongly urge you not to install that version; it is
quite old. You can get the latest precompiled version from
www.activestate.com. You can also get the source from CPAN (start at
www.perl.com) and compile it. You'll need a C compiler. Visual C++
definitely works. Borland is also supposed to work. I'm not sure if
GNU C works.
--
Michael M Rubenstein
------------------------------
Date: 31 Dec 1998 16:56:15 GMT
From: Stefaan.Eeckels@ecc.lu (Stefaan A Eeckels)
Subject: Re: Problem with Net::SMTP under NT
Message-Id: <76gabf$79o$1@justus.ecc.lu>
In article <368B3DA4.F0D7C0F8@iae.nl>,
Marcel Beekmans <beekmans@iae.nl> writes:
> The "Helo" part of the Net::SMTP module appears not to work under NT. It
> in fact hangs up the complete IIS server. I need the "Helo" command to
> make my application work, because the smtp-server of my provider is
> configured in (they say a secure) way, that it needs this command. How
> can I solve this problem?
I've used Net:SMTP on NT & UNIX without any problems against qmail and
sendmail. There's no reason HELO should hang any SMTP compliant
server - if it does, the problem is with the server, not the client.
Any chance you could test IIS with another SMTP client (such as
Eudora or Pegasus), and see if these do cause the same problem?
You could also try to trace the connection:
if (defined($smtp = Net::SMTP->new("mailhost", Debug => 1)) {
...
}
and see exactly where it hangs. Post the relevant excerpt
from the trace and it'll be a lot easier to see what might
be wrong.
Happy New Year,
--
Stefaan
--
PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away. -- Saint-Exupiry
------------------------------
Date: Thu, 31 Dec 1998 17:19:53 GMT
From: gareth@ibis.demon.co.uk (Gareth Jones)
Subject: Problem with Win32API::Net::UserEnum
Message-Id: <368bafa7.7192421@news.demon.co.uk>
I'm having a problem with this bit of code:
$server = '\\\\aserver';
@array = [];
Win32API::Net::UserEnum($server, \@array);
This call to UserEnum succeeds if $server is set to the PBC of the
domain I am in, but fails if I set it to be the name of a PBC in a
different domain. I'm not sure why.
If I add:
$error = Win32::GetLastError();
print $error;
I get the result 203.
Questions:
1) Why should the call to UserEnum fail? The api call used by UserEnum
is NetUserEnum, which at level 0, does not require any particular
group membership - so I don't think there should be a security problem
(the server is SP1, anonymous connections have not been disabled).
2) Any ideas what 203 means?
TIA,
Gareth
------------------------------
Date: Thu, 31 Dec 1998 08:00:30 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: Groovy94 <groovy94@aol.com>
Subject: Re: Protecting my script from form data
Message-Id: <368B837E.518D127A@entheosengineering.com>
Groovy94 wrote:
>
> Yes, but how do I make sure it contains only safe characters?
> Regards,
> Gil Hildebrand, Jr.
> Dynamic Scripts
Something like this:
if ($line =~ m/[^\w\.\&\@]/) { #process unsafe characters }
# What this means is the match returns true if any characters NOT
# in your character class exist.
else { #check the format & other stuff
if ($line =~ m/^[\w\.\&]+\@[\w\.]+$/) {
#process a probably
# OK e-mail address.
}
}
Cheers!
--
Rich Grise
off-duty@entheosengineering.com
(No need to futz with my e-mail: I have a "delete" button!)
------------------------------
Date: Thu, 31 Dec 1998 15:45:01 GMT
From: dturley@pobox.com
Subject: Re: Retrospective on comp.lang.perl.moderated?
Message-Id: <76g65t$s2s$1@nnrp1.dejanews.com>
In article <76fsj0$kqs$1@nnrp1.dejanews.com>,
jfreedman@securitydynamics.com wrote:
>
> I just tried to post to the moderated list and got the bounced message - what
> a pile of ****. I have been using USENET since the mid 80s and this is the
> first time I had to deal with something like that. Its a news group list, not
> a securty check!!
I made my first post to clp.mod last week. I received the mail, hit reply and
that was it. Didn't even take 2 seconds. If people don't like the rules
established for the group, DON'T POST TO IT! and quit wasting bandwidth
bitching about it. ____________________________________ David Turley
dturley@pobox.com http://www.binary.net/dturley/
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 31 Dec 1998 14:29:23 GMT
From: johnvv@hotmail.com
Subject: Re: Sig Trap Help Needed !!
Message-Id: <76g1o2$om3$1@nnrp1.dejanews.com>
I backticked the shell touch command and it worked, something wrong with the
tty or something on HPUX.
Thanks, though... John van V
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 31 Dec 1998 16:54:49 GMT
From: greggsilk@aol.com (Gregg Silk)
Subject: Thanks! and happy new year!
Message-Id: <19981231115449.01059.00003973@ng-fs1.aol.com>
Thanks to everyone so far. I am amazed at what a helpful and polite group this
is. I have seen newgroups for other languages where it seems like some people
spend their whole so-called lives flaming newbies and telling them to post
elsewhere. Of course, I always took those flamers as an encouraging sign, since
I figured I'd soon be beating them up and taking their lunch money. But it's
also very encouraging to know there are lots of decent folks out there as
well. Happy New Year!
Gregg
------------------------------
Date: Thu, 31 Dec 1998 16:57:00 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Thanks! and happy new year!
Message-Id: <368cacc3.662450@news.skynet.be>
Gregg Silk wrote:
>Thanks to everyone so far. I am amazed at what a helpful and polite group this
>is. I have seen newgroups for other languages where it seems like some people
>spend their whole so-called lives flaming newbies and telling them to post
>elsewhere.
Is this guy being sarcastic, or what?
(ducking)
Bart.
------------------------------
Date: Thu, 31 Dec 1998 08:32:17 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: wildcard
Message-Id: <ht1g67.tl.ln@magna.metronet.com>
Benoit Lefebvre (mox@videotron.ca) wrote:
: $uhost = ":mox!user@test.net";
That statement doesn't compile...
: The wildcard is in the config file.. eg:
: $mask = "*!*@*.net";
: It is possible to do something like:
: if ($uhost =~ $mask) {
: op the user
: }
: else {
: unknown users
: }
You can convert the wildcard into a Perl regular expression
and the use that.
With the "usual interpretation" of wildcard (zero or more chars),
you would "op the user" when:
$uhost = '!@.net';
Probably not what you want, so I require at least one char
in each wildcard position:
---------------------------
#!/usr/bin/perl -w
use strict;
my $uhost = ':mox!user@test.net'; # single quotes,
# so @ doesn't need to be escaped
my $mask = '*!*@*.net';
$mask =~ s/\./\\./g; # escape the dot metacharacters
$mask =~ s/\*/.+/g; # convert * wildcard to .+ regular expression
$mask =~ s/^/^/g; # add begin anchor
$mask =~ s/$/\$/g; # add end anchor
#print "mask '$mask'\n"; # for debugging
if ($uhost =~ /$mask/) {
print "op the user\n";
}
else {
print "unknown users\n";
}
---------------------------
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 31 Dec 1998 15:19:27 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: wildcard
Message-Id: <76g4lv$5g7$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Benoit Lefebvre <mox@videotron.ca> writes:
:Hi, I am coding a kind of irc bot and I have a problem with wildcard
:I have a file with all the infos about users, etc..
:When a user msg the bot, eg: mox (user@test.net). I have that:
::mox!user@test.net. It's stored in $uhost
:$uhost = ":mox!user@test.net";
:The wildcard is in the config file.. eg:
:$mask = "*!*@*.net";
>From PCB, chapter 6:
sub glob2pat {
my $globstr = shift;
my %patmap = (
'*' => '.*',
'?' => '.',
'[' => '[',
']' => ']',
);
$globstr =~ s{(.)} { $patmap{$1} || "\Q$1" }ge;
return '^' . $globstr . '$';
}
--tom
--
Those who do not understand Unix are condemned to reinvent it, poorly.
-- Henry Spencer
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4524
**************************************