[17836] in Perl-Users-Digest
Perl-Users Digest, Issue: 5256 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 5 03:45:58 2001
Date: Fri, 5 Jan 2001 00:45:37 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978684337-v9-i5256@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 5 Jan 2001 Volume: 9 Number: 5256
Today's topics:
help: how to pass an array to an XSUB <tjones@computer.org>
help: link gets "unresolved external symbol" <tjones@computer.org>
re: help: link gets "unresolved external symbol" <tjones@computer.org>
Re: How do You attach a file from a web form and email <joe+usenet@sunstarsys.com>
how to get perl to wake up a program periodically tuoihong@my-deja.com
Re: how to get perl to wake up a program periodically (Chris Fedde)
HTML::Parser / HTML::TreeBuilder <rrocky@bigfoot.com>
Mailer.pm - bad file number at line 267 <masoodht@yahoo.com>
man2html <mustbe@pdelahunta.cjb.com>
Re: more range operator usages <ren.maddox@tivoli.com>
Re: more range operator usages <johnlin@chttl.com.tw>
NAMES OF ARRAYS saumya_mittal@my-deja.com
Re: NAMES OF ARRAYS gurft@my-deja.com
Re: NAMES OF ARRAYS (Randal L. Schwartz)
Re: NAMES OF ARRAYS <iltzu@sci.invalid>
Net:POP3 and Perl 5.6 <don@lclcan.com>
Net:POP3 not finding server <don@lclcan.com>
new book from Lincoln Stein <quesadaj@psych.colorado.edu>
newbie to Perl on W2K. How do I 'make' CPAN modules ? <robert@chalmers.com.au>
Pattern Matching in array of strings <rrocky@bigfoot.com>
perl and zombies woodywit@my-deja.com
perl and zombies woodywit@my-deja.com
Perl CGI <hal9000@alienmoons.co.uk>
Re: Perl CGI (Chris Fedde)
Re: Perl DBI and Oracle rereidy@my-deja.com
Re: Perl for Palm <dan@tuatha.sidhe.org>
Re: Perl for Palm (A.M. Kuchling)
Re: Perl problem resolution checklist (was Re: General (Ben Okopnik)
Perl Seminar New York jkeen11@my-deja.com
Re: problem with DST conversion in Time::Local <Mike.Wescott@crosstor.com>
Re: Problems using Net:POP3 <don@lclcan.com>
Re: Problems using Net:POP3 <tony_curtis32@yahoo.com>
Q: installing modperl <relion@netvision.net.il>
Re: Q: installing modperl (Rafael Garcia-Suarez)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 04 Jan 2001 17:29:24 -0800
From: "Thomas C. Jones" <tjones@computer.org>
Subject: help: how to pass an array to an XSUB
Message-Id: <3A552374.7ABB8381@computer.org>
Hello,
I'm trying to pass an array variable to an XSUB but the gate-keeper
logic at the beginning claims that the call has too many items - because
instead of one AV * (1 item) it is all the items in the array (say 10).
What is the proper way to send and receive an array to an XSUB?
Thanks,
Tom
------------------------------
Date: Thu, 04 Jan 2001 13:49:14 -0800
From: "Thomas C. Jones" <tjones@computer.org>
Subject: help: link gets "unresolved external symbol"
Message-Id: <3A54EFDA.FA3713E@computer.org>
Hello,
Attempting to link (h2xs, etc.) to a predefined C DLL on Win32. Created
a "dll.dll" and "dll.lib".
In Makefile.pl I've tried setting
'MYEXTLIB' => '{path}/dll$(LIB_EXT)', # to access routine in
dll.c
and overriding LDDLFLAGS to reference a .def file as well as various
other things but all to no avail. I always get:
"...error LNK2001: unresolved external symbol..."
for the routine I'm trying to access.
Any suggestions for other things to try?
Thanks, Tom
------------------------------
Date: Thu, 04 Jan 2001 16:13:53 -0800
From: "Thomas C. Jones" <tjones@computer.org>
Subject: re: help: link gets "unresolved external symbol"
Message-Id: <3A5511C0.B606810B@computer.org>
I figured it out - Makefile was compling the xsubpp generated code as
C++ so I had to encapsulate the #include of the dll header with 'extern
"C"' - now it works.
------------------------------
Date: 04 Jan 2001 13:47:42 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: How do You attach a file from a web form and email it?
Message-Id: <m3k88b40j5.fsf@mumonkan.sunstarsys.com>
"Daniel Radulescu" <dradulescu@carolina.rr.com> writes:
> Help Please!!!! Does any kind soul have a script that would allow a user to
> hit a website and possibly using the <INPUT TYPE="file"....> tag to browse
> and attach a file, then have it sent via perl t an email address as an
> atachment? I have been looking for a couple of days now... and no luck.
> Please help!!! Thanks so much!
Unless your time is worth so little to you that you'd rather scour
the internet for days and troll through this newsgroup for
"recommended freebies", why not pay someone to write it for you?
To get a good one, you could offer $100/hr for a kind soul's
programming time, and wind up paying about $25 out of pocket
for a customized, whizbang, MIME-enabled web to SMTP gateway.
Or you could offer $25/hour and wind up paying $100 for it.
Of course, don't post it here- there are newsgroups for just that
kind of request. But then again, you're not expecting to repay
the kindness you seek, are you?
--
Joe Schaefer
------------------------------
Date: Fri, 05 Jan 2001 03:06:51 GMT
From: tuoihong@my-deja.com
Subject: how to get perl to wake up a program periodically
Message-Id: <933do7$io2$1@nnrp1.deja.com>
What is the best approach to take if i want to write a perl program to
wake up a program (say ftp) periodically (say every day at noon)?
I am new to perl so please help. Thank you
p.s. email me at tamminguyen@yahoo.com is it's not too much to ask
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Fri, 05 Jan 2001 04:27:20 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: how to get perl to wake up a program periodically
Message-Id: <I2c56.676$B9.188719616@news.frii.net>
In article <933do7$io2$1@nnrp1.deja.com>, <tuoihong@my-deja.com> wrote:
>What is the best approach to take if i want to write a perl program to
>wake up a program (say ftp) periodically (say every day at noon)?
>I am new to perl so please help. Thank you
>
>p.s. email me at tamminguyen@yahoo.com is it's not too much to ask
>
Two approaches. First use a scheduling package for your operating
system. Cron for example on unix. IIRC there is an AT command on
NT. Second is to just have your program sleep for 24*60*60 seconds
then re-run itself.
YMMV
chris
--
This space intentionally left blank
------------------------------
Date: Thu, 04 Jan 2001 18:04:48 -0800
From: Rocky Raccoon <rrocky@bigfoot.com>
Subject: HTML::Parser / HTML::TreeBuilder
Message-Id: <3A552BC0.AF555412@bigfoot.com>
With either of these 2 is it possible to do something like
XPath.
i.e.
I want to go to the tag
"HTML/BODY/XYZ/ABC" & get the text inside that.
--
Rocky
RSC - http://www.slack.net/~shiva/rsc.html
------------------------------
Date: Thu, 4 Jan 2001 16:57:54 -0800
From: "Masood Tanaji" <masoodht@yahoo.com>
Subject: Mailer.pm - bad file number at line 267
Message-Id: <K_856.151$Tw5.123593@news.pacbell.net>
I don't know if this is something very simple and stupid.
I wrote this test script to send mail.
#!/usr/local/bin/perl
######################################
use Mail::Mailer;
my $mailserver = "mail.mycompany.com";
my $mailer = new Mail::Mailer('smtp', Server => $mailserver);
my %headers=();
$headers{'To'} = "masoodht\@yahoo.com";
$headers{'From'} = "administrator";
$headers{'Subject'} = "TEST" ;
$mailer->open(\%headers);
print $mailer "TEST TEST TEST TEST TEST\n";
$mailer->close;
######################################
When I run the script I get this error.
"Bad file number at /usr/lib/perl5/site_perl/5.005/Mail/Mailer.pm line
267."
I am using Mailer.pm VERSION = "1.18";
Is it with the open(\%headers) call ?
Any help would be really appreciated.
- Masood
------------------------------
Date: Thu, 04 Jan 2001 20:54:17 +0100
From: Paul <mustbe@pdelahunta.cjb.com>
Subject: man2html
Message-Id: <3A54D4E8.9CC4E771@pdelahunta.cjb.com>
I'm sure this is a peace of cake for some people but I never dealt with
it before.
How do I run man2html.bat from a Perlscript?
I assume I have to make clear to Pearl I want to run a DOSscript. And
how do I handle the arguments?
Thanks a lot
Paul Delahunta
------------------------------
Date: 04 Jan 2001 09:42:58 -0600
From: Ren Maddox <ren.maddox@tivoli.com>
Subject: Re: more range operator usages
Message-Id: <m3zoh75nnh.fsf@dhcp11-177.support.tivoli.com>
"John Lin" <johnlin@chttl.com.tw> writes:
> In perlop, most examples of range operators in scalar context are
> used in a boolean way.
Well, that isn't too surprising given the following statement in
perlop(1) about the range operators:
In scalar context, ".." returns a boolean value.
> I wonder if there is any case showing scalar range operator is useful
> but not in a boolean context? For example:
>
> $x = 2..5 ^ 6..10; # Huh?
> print rand(3..50); # seems good
What is it you are wanting these to do? The first example, as you
indicate, doesn't seem to make much since. The second looks as if you
want rand to select a number within the given range -- but that would
really be asking rand to accept a list argument and return one of the
elements at random. For that, you can use:
my @nums = 3..50;
print $nums[rand @nums];
or, more directly perhaps:
print 3 + int rand 48;
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Fri, 5 Jan 2001 09:08:05 +0800
From: "John Lin" <johnlin@chttl.com.tw>
Subject: Re: more range operator usages
Message-Id: <9336tk$947@netnews.hinet.net>
"Ren Maddox" wrote
> "John Lin" writes:
>
> In scalar context, ".." returns a boolean value.
>
> > I wonder if there is any case showing scalar range operator is useful
> > but not in a boolean context?
>
> What is it you are wanting these to do?
I mean, the boolean values of ".." are actually numbers:
'',1,2,3.. nE0
Maybe we can utilize these numbers in some way... For example,
#!perl -n
use strict;
no warnings 'numeric';
my $range1 = 3..5;
my $range2 = /print/..10;
print $range2 - $range1,"\n";
0
0
-1
-2
-2
2
3
4
5
6
0
0
Doesn't seem useful... Any ideas?
Thank you.
John Lin
------------------------------
Date: Thu, 04 Jan 2001 18:10:05 GMT
From: saumya_mittal@my-deja.com
Subject: NAMES OF ARRAYS
Message-Id: <932e9k$m1u$1@nnrp1.deja.com>
Hi
I wanted to find out whether there is ANY WAY of dynamically assigning
names to arrays (for eg. I want to be able to say something like
@($var), where $var holds the name of the array). Can I do this in any
way ? Pls help
Thanks
Saumya
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 04 Jan 2001 19:35:32 GMT
From: gurft@my-deja.com
Subject: Re: NAMES OF ARRAYS
Message-Id: <932ja3$r20$1@nnrp1.deja.com>
Depending on your application, you could create a Hash of arrays, with
each array being a named element of the Hash. You can create
anonymous arrays and then store them and later refer them by their key
in the hash.
Look in your Camel book (pg 266 in my copy) there's a good explaination
and code on how to do this. You can also look at Recipe 11.2 in the
Perl Cookbook, which gives you a quick overview of how to do this.
Hope this helps-
Kurt
In article <932e9k$m1u$1@nnrp1.deja.com>,
saumya_mittal@my-deja.com wrote:
> Hi
> I wanted to find out whether there is ANY WAY of dynamically assigning
> names to arrays (for eg. I want to be able to say something like
> @($var), where $var holds the name of the array). Can I do this in any
> way ? Pls help
>
> Thanks
> Saumya
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 04 Jan 2001 12:10:21 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: NAMES OF ARRAYS
Message-Id: <m17l4b6pua.fsf@halfdome.holdit.com>
>>>>> "saumya" == saumya mittal <saumya_mittal@my-deja.com> writes:
saumya> I wanted to find out whether there is ANY WAY of dynamically assigning
saumya> names to arrays (for eg. I want to be able to say something like
saumya> @($var),
No you don't. You think you do, but you don't. See
http://perl.plover.com/varvarname.html
for details on why what you're asking for is possible, but bad, and
what you should do instead.
print "Just another Perl hacker,"
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 4 Jan 2001 21:29:56 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: NAMES OF ARRAYS
Message-Id: <978643630.19010@itz.pp.sci.fi>
In article <932e9k$m1u$1@nnrp1.deja.com>, saumya_mittal@my-deja.com wrote:
>Hi
>I wanted to find out whether there is ANY WAY of dynamically assigning
>names to arrays (for eg. I want to be able to say something like
>@($var), where $var holds the name of the array). Can I do this in any
>way ? Pls help
Yes you can. You don't want to, though.
What you actually want is a hash of arrays.
--
Ilmari Karonen -- http://www.sci.fi/~iltzu/
"Get real! This is a discussion group, not a helpdesk. You post
something, we discuss its implications. If the discussion happens to
answer a question you've asked, that's incidental." -- nobull in clpm
------------------------------
Date: Thu, 04 Jan 2001 16:11:34 -0500
From: Don <don@lclcan.com>
Subject: Net:POP3 and Perl 5.6
Message-Id: <3A54E706.F7E70E1@lclcan.com>
While hunting for some docs, I came upon this quote by a Perl user:
"I have noticed that Net::POP3 does not seem to work on perl5.6"
Can anyone corroborate this?
------------------------------
Date: Thu, 04 Jan 2001 16:02:43 -0500
From: Don <don@lclcan.com>
Subject: Net:POP3 not finding server
Message-Id: <3A54E4F2.C8EA4BE1@lclcan.com>
I'm attempting to write a perl script that can retreive and parse email
from a local pop3 server? I've tried the Net:POP3 module from CPAN but
could never get ot work as whenever I'd set up the consrtructor, it
would always fail to connect. I've verified that my POP3 server is
indded running by issuing a :
/usr/sbin/ipop3d &
the constructor looks like this:
$webmail = Net::POP3->new('my_server')
or die "Could not connect to mail server";
When I run the script, I always get the "Could not connect to mail
server"
Help!
------------------------------
Date: Thu, 4 Jan 2001 20:24:05 -0700
From: "jose quesada" <quesadaj@psych.colorado.edu>
Subject: new book from Lincoln Stein
Message-Id: <933e05$rpq$1@peabody.colorado.edu>
Folks,
have Someone bought the new book of Lincoln Stein, "Network programming with
perl"?
How is it? I can not find any reviews... which is weird.
Any pointers?
Thanks,
-Jose
------------------------------
Date: Fri, 5 Jan 2001 16:24:14 +1000
From: "Merlin" <robert@chalmers.com.au>
Subject: newbie to Perl on W2K. How do I 'make' CPAN modules ?
Message-Id: <oTd56.71$8s4.17310@nsw.nnrp.telstra.net>
Do I need to install a C compliler so I can have access to a Make program so
I can 'make install' the perl modules etc.??? I'm a Unix person - first time
on W2K and finding it very spartan when it comes to tools ...
thanks
Robert
------------------------------
Date: Thu, 04 Jan 2001 11:54:07 -0800
From: Rocky Raccoon <rrocky@bigfoot.com>
Subject: Pattern Matching in array of strings
Message-Id: <3A54D4DF.6C2169A0@bigfoot.com>
If I have an array of strings, say
@x = ("Hello\n", "World\n", "Hello to\n", "World");
I want to search for the string "Hello World".
I should get found for @x[0], @x[1], but not found for @[2] , @[3]
What's the best way to do it ?
chomp each line, concatenate everything & then search for the pattern
(/Hello\s+World/) or someother easier way.
I am not really interested in where it occurs, just whether it occurs
or not.
Why I am doing this is because I am using the module
HTML::Parser
I set up callbacks this way
my $parser = new HTML::Parser(
start_h => something,
end_h => something else,
text_h => [
sub
{
# Here I want find the pattern in @_
# Alternately is there a way to recieve it the whole text in
# one string instead of @_ here.
}, "text"] );
--
Rocky
RSC - http://www.slack.net/~shiva/rsc.html
------------------------------
Date: Thu, 04 Jan 2001 18:17:01 GMT
From: woodywit@my-deja.com
Subject: perl and zombies
Message-Id: <932emj$mhp$1@nnrp1.deja.com>
Can anyone explain to me why the following
snippet of code that uses a pipe creates a zombie?
open(TIME, "/usr/bin/date |");
@time=<TIME>;
close(TIME);
I'm using perl version 5.004_04 on Solaris.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 04 Jan 2001 18:25:28 GMT
From: woodywit@my-deja.com
Subject: perl and zombies
Message-Id: <932f6b$n3a$1@nnrp1.deja.com>
Can anyone explain why a zombie is created when I open a command with a
pipe? For example:
open(TIME, "/usr/bin/date |");
@time<TIME>;
close(TIME);
creates a defunct process that eventually gets cleaned up once the
script completes execution. I'm using perl version 5.004 on Solaris.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 4 Jan 2001 21:55:56 -0000
From: "H9" <hal9000@alienmoons.co.uk>
Subject: Perl CGI
Message-Id: <ak656.39001$Yy.903140@news2-win.server.ntlworld.com>
I am stuck
I have a piece of javascript which reads in a cookie, that works fine. I now
need to produce a Perl script which generates HTML code along with the
javascript, this is fine.
I have embeded the javascript okay and it seems to work fine except that it
is picking up the cookie as blank, rather than having the required
information:
i am using the perl code to generate the javascript like thus:
print "<html>\n";
print "<title>\n";
print "Training Courses - On-line Booking\n";
print "</title>\n";
print "<script language='javascript'>\n";
print "<!--\n";
print "function readcookie() {\n";
print "var the_cookie = document.cookie;\n";
print "alert('Cookie: ' + document.cookie);\n";
print "if (the_cookie > '') {\n";
print "var broken_cookie = the_cookie.split(':');\n";
print "var broken_cookie_name = broken_cookie[1].split('&');\n";
print "var the_user_name = broken_cookie_name[0];\n";
print "var broken_cookie_email_address = broken_cookie[2].split('&');\n";
print "var the_email_address = broken_cookie_email_address[0];\n";
print "var broken_cookie_company_code = broken_cookie[3].split(';');\n";
print "var the_company_code = broken_cookie_company_code[0];\n";
print "var the_user_name = unescape(the_user_name);\n";
print "}\n";
print "if( the_user_name ){name.value=the_user_name;}\n";
print "}\n";
print "-->\n";
print "</script>\n";
print "<body onload='readcookie();' ";
print "bgcolor='#000052' ";
print "background='http://";
print "text='black' link='#e38f22' alink='#e38f22' vlink='#e38f22' ";
print "marginheight='0' topmargin='0' ";
... blah blah
Now, as I said the javascript works fine in normal coded HTML, but the
cookie is not being picked up correctly in the perl generated javascript.
Any ideas?
Thank you
H9
PS. I do not know Perl, Java or HTML that well, I am just hacking about
trying my best :o|. If you need more example of code, let me know.
------------------------------
Date: Fri, 05 Jan 2001 05:16:58 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Perl CGI
Message-Id: <eNc56.681$B9.192167424@news.frii.net>
In article <ak656.39001$Yy.903140@news2-win.server.ntlworld.com>,
H9 <hal9000@alienmoons.co.uk> wrote:
>I am stuck
>
[...]
>i am using the perl code to generate the javascript like thus:
>
>print "<body onload='readcookie();' ";
>print "bgcolor='#000052' ";
>print "background='http://";
>print "text='black' link='#e38f22' alink='#e38f22' vlink='#e38f22' ";
>print "marginheight='0' topmargin='0' ";
>
I suspect a syntax error or a confused quote somewher in the block of print
statements.
I'd recomend using another form of quoting. Here is one option:
print qq{
<body onload='readcookie();'
bgcolor='#000052'
background='http://
text='black' link='#e38f22' alink='#e38f22' vlink='#e38f22'
marginheight='0' topmargin='0'
};
If nothing else it'll make it easier to see the layout of the HTML and
Javascript.
--
This space intentionally left blank
------------------------------
Date: Thu, 04 Jan 2001 18:19:55 GMT
From: rereidy@my-deja.com
Subject: Re: Perl DBI and Oracle
Message-Id: <932es0$mkc$1@nnrp1.deja.com>
Actually, you should not use environment variables for this. It could
be a security issue. But if you must, see the env(1) manpage.
In article <932c8e$dal$1@newshost.mot.com>,
cbb108c@email.mot.com (Brian Busche) wrote:
> Newbie question,
>
> How do you set the ENV variable for the Oracle user name and passowrd?
>
>
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: Thu, 04 Jan 2001 18:22:23 GMT
From: Dan Sugalski <dan@tuatha.sidhe.org>
Subject: Re: Perl for Palm
Message-Id: <zb356.122906$P82.14210741@news1.rdc1.ct.home.com>
Philip 'Yes, that's my address' Newton <nospam.newton@gmx.li> wrote:
> On Wed, 03 Jan 2001 18:26:37 GMT, Dan Sugalski <dan@tuatha.sidhe.org> wrote:
>> DOS never really was a 16-bit platform, at least not in the way meant here.
>> Pointers have always been larger than 16 bits. (Granted, with odd segment
>> register nonsense)
> OK, 20 bit memory access but 16 bit arithmetic then. And no single data item
> could be larger than 64K without going through contortions (aka "huge" model).
Fair enough. It's rather different than on platforms with real 16-bit addressing,
like the old 6502 and 6800 chips. (Perl will probably never run on those)
Having the memory, regardless of the hoops you need to jump through, is
the important bit. (We could, if we wanted, port perl to the PDP-11 systems,
for example, not that it's likely...)
Dan
------------------------------
Date: 4 Jan 2001 23:21:51 GMT
From: amk@mira.erols.com (A.M. Kuchling)
Subject: Re: Perl for Palm
Message-Id: <slrn95a25v.hp.amk@207-172-36-136.s136.tnt6.ann.va.dialup.rcn.com>
On Wed, 03 Jan 2001 19:14:25 GMT,
Tzadik Vanderhoof <tzadikv@my-deja.com> wrote:
>How will Perl 6 help?
Presumably by modularizing and simplifying the code.
This won't help you get Perl running on the Palm, but there is an
alpha release of Python for the Palm at
http://www.isr.uci.edu/projects/sensos/python/; the authors had to rip
out lots of features such as floating point numbers (ouch!), file I/O,
and the parser, meaning it can only run precompiled bytecodes. The
Python source is more modular than the Perl5 source, so I'd expect
Perl for the Palm to require an impractically large amount of messy
patching to rip out enough functionality to make it fit on the Palm.
(This is why I think the work on Linux for palmtops is so interesting;
you can re-use the same programming skills and tools from a Unix
environment, rather than have to discard every piece of software ever
written because it won't fit.)
BTW, e-mail to tzadikv@my-deja.com bounced; otherwise I would have
sent this privately.
--amk
------------------------------
Date: 4 Jan 2001 20:36:32 GMT
From: ben-fuzzybear@geocities.com (Ben Okopnik)
Subject: Re: Perl problem resolution checklist (was Re: General Personal Development Strategy)
Message-Id: <slrn959no5.5sq.ben-fuzzybear@Odin.Thor>
The ancient archives of Thu, 4 Jan 2001 09:19:59 -0500 showed
Tad McClellan of comp.lang.perl.misc speaking thus:
>
>There is some observing of "spore" that trackers (programmers)
>should know about in order to effectively practice their craft.
<Lots of snippage of very useful info>
s/spore/spoor/;
Ben Okopnik
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
It comes to pass oft that a terrible oath, with a swaggering accent
sharply twang'd off, gives manhood more approbation than ever proof
itself would have earned him. -- William Shakespeare
------------------------------
Date: Fri, 05 Jan 2001 02:07:00 GMT
From: jkeen11@my-deja.com
Subject: Perl Seminar New York
Message-Id: <933a81$fu1$1@nnrp1.deja.com>
Perl Seminar New York is a workgroup for Perl programmers and fans
which has begun meeting monthly. Next session is 1/9/2001. For info,
see http://www.egroups.com/group/perlsemny or e-mail me at
jkeen@concentric.net
James E. Keenan
Brooklyn, NY
Sent via Deja.com
http://www.deja.com/
------------------------------
Date: 04 Jan 2001 16:04:03 -0500
From: Mike Wescott <Mike.Wescott@crosstor.com>
Subject: Re: problem with DST conversion in Time::Local
Message-Id: <ouwvcbrpvg.fsf@strange.cae.crosstor.com>
Greg Economides <econ@tamu.edu> writes:
> I've been using Time::Local (timegm and localtime) to do conversions
> from GMT to local time. The code has been working fine for a year, but
> now seems to have a problem. It looks like the module is missing the
> fact that DST starts on 1 April 2001 this year. All of the conversions
> that I do show that it incorrectly subtracts 6 hours
> from DST during April 1 - April 7 (GMT-6 is for CST and GMT-5 for CDT).
> Then, from 8 April on, it correctly subtracts 5 hours.
>
> Here's the significant line of code:
>
> @tarray=localtime(timegm(0,$min,$hour,$day,$mon,$yr));
>
> Are any of you finding this problem?
Can't reproduce it here on Linux (RH 6.2).
This is likely a problem in the underlying OS, (libc or TZ descriptions).
--
Mike Wescott
mike.wescott@crosstor.com
------------------------------
Date: Thu, 04 Jan 2001 12:57:11 -0500
From: Don <don@lclcan.com>
Subject: Re: Problems using Net:POP3
Message-Id: <3A54B977.7FA1A117@lclcan.com>
Ok you were correct in that my constructor failed to make the connection. I
went into my system services menu, placed a checkmark next to the "ipop3"
service and rebooted. Retrying my Perl script with all the host names of this
particulart machine still failed to connect. So.....
1) How do I verify that my POP3 server is indeed running
2) how do I find out the name of my host?
btw, running RedHat Linux 7.0
Thanks,
Don
Tony Curtis wrote:
> >> On Thu, 04 Jan 2001 12:18:13 -0500,
> >> Don <don@lclcan.com> said:
>
> > Combine two facts 1) I am still a partial neophyte at
> > programming with Perl 2) The documentation for Net:POP3
> > is woefully lean
>
> > I've created an object by the following method:
>
> > $webmail = Net::POP3->new("localhost", Timeout => 60);
>
> > Now, I wish to log in and retrieve email so I issued the
> > following command:
>
> > $messages = $webmail->login("mu_user", "my_password");
>
> > I get this error after issuing the second command:
>
> > "Can't call method "login" on an undefined value at
> > update_db.pl line 31."
>
> Did you check that the constructor was successful?
> $webmail appears to be undefined, indicating that you did
> not make the desired connection to localhost.
>
> You can do something like this:
>
> use strict;
> use Net::POP3;
>
> my $webmail = Net::POP3->new("localhost", Timeout => 60);
>
> die "some useful error messsage about connection" if ! defined $webmail;
>
> my $messages = $webmail->login("mu_user", "my_password");
>
> die "some useful error message about login" if ! defined $messages;
>
> print "There are $messages messages for you\n";
>
> $webmail->quit();
>
> When interacting with anything external to your program,
> you really need to check everything that happens.
> Remember: the impossible will happen often.
>
> hth
> t
> --
> Eih bennek, eih blavek.
------------------------------
Date: 04 Jan 2001 15:59:54 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Problems using Net:POP3
Message-Id: <87bstn6krp.fsf@limey.hpcc.uh.edu>
[ please put new text in the reply AFTER the original
quoted text ]
>> On Thu, 04 Jan 2001 12:57:11 -0500,
>> Don <don@lclcan.com> said:
> Ok you were correct in that my constructor failed to
> make the connection. I went into my system services
> menu, placed a checkmark next to the "ipop3" service and
> rebooted. Retrying my Perl script with all the host
> names of this particulart machine still failed to
> connect. So.....
> 1) How do I verify that my POP3 server is indeed running
$ telnet hostname 110
if it replies, it's running. If not, you might want to
try it both with "localhost" and the hostname, to see if
tcp_wrappers are involved in protecting an interface.
So check for tcp_wrappers too (/etc/hosts.allow).
And.or ipchains.
> 2) how do I find out the name of my host?
$ hostname
tells you the name of the machine, ifconfig tells you the
address of the interfaces, you can then use
host/dig/nslookup to see what name that translates to.
But this is now off-topic for clpm. If you want further
help in configuring linux systems or POP services, try one
of the comp.os.linux newsgroups.
hth
t
--
Eih bennek, eih blavek.
------------------------------
Date: Wed, 03 Jan 2001 23:28:33 +0200
From: Arie Tuchfeld <relion@netvision.net.il>
Subject: Q: installing modperl
Message-Id: <3A539981.24A3A785@netvision.net.il>
Hello,
I have a problem installing modperl on RedHat6.1
with apache version
# rpm -q apache
apache-1.3.9-4
I installed
# rpm -Uvh apache-modperl-1.3.6_1.21-0.i386.rpm
it prints:
"Server's Module Magic Number: 19990320:6
but we expect a module magic number of '19990320:0'
but the install will continue anyway..."
after, I run:
# /usr/sbin/modperl-enable on
but then, when I tried to restart the apache
# /etc/rc.d/init.d/httpd start
I get the message:
Syntax error on line 104 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/lib/apache/mod_autoindex.so into server: /usr/lib/apache/mod_autoindex.so: undefined symbol: ap_field_noparam
if I run
# /usr/sbin/modperl-enable off
the apache starts OK.
Can you help me solve this problem?
Thanks,
Arie.
------------------------------
Date: Fri, 05 Jan 2001 07:57:52 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Q: installing modperl
Message-Id: <slrn95avk5.du5.rgarciasuarez@rafael.kazibao.net>
Arie Tuchfeld wrote in comp.lang.perl.misc:
> Hello,
> I have a problem installing modperl on RedHat6.1
> with apache version
> # rpm -q apache
> apache-1.3.9-4
>
> I installed
> # rpm -Uvh apache-modperl-1.3.6_1.21-0.i386.rpm
^^^^^
hmm, it seems that you've got an RPM of mod_perl built for apache 1.3.6.
Moreover, the current version of apache is 1.3.14. Get more recent RPMs.
Or, better (in my opinion) : download the source of apache and mod_perl
and compile it yourself.
--
# Rafael Garcia-Suarez / http://rgarciasuarez.free.fr/
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 5256
**************************************