[23332] in Perl-Users-Digest
Perl-Users Digest, Issue: 5552 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 24 00:08:40 2003
Date: Tue, 23 Sep 2003 21:05:08 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 23 Sep 2003 Volume: 10 Number: 5552
Today's topics:
Re: () questions <REMOVEsdnCAPS@comcast.net>
Re: Can't locate POE.pm in @INC (Michael Evanchik)
Re: Can't locate POE.pm in @INC (Sam Holden)
Re: CGI.pm <tcurrey@no.no.i.said.no>
Re: class methods <pinyaj@rpi.edu>
Re: class methods <kevin@vaildc.net>
Re: class methods (James Willmore)
cron/http absolute directories <notspam@spamfree.dud>
Re: cron/http absolute directories <notavailable@nospamplease.com>
Re: cron/http absolute directories (Malcolm Dew-Jones)
Re: cron/http absolute directories <notspam@spamfree.dud>
Re: cron/http absolute directories <notspam@spamfree.dud>
Re: cron/http absolute directories <NOSPAM@bigpond.com>
Re: cron/http absolute directories <notspam@spamfree.dud>
Re: cron/http absolute directories <notspam@spamfree.dud>
Re: D not deleting all breakpoints <eric-amick@comcast.net>
Determine connection status on Linux <kalinabears@iinet.net.au>
Re: How do I pass a value to a PERL script from an <a h <nospam@bigpond.com>
Re: How do I pass a value to a PERL script from an <a h (James Willmore)
Re: how to find the biggest ???? <mkl.tw@ttt.com>
Re: how to find the biggest ???? (Jay Tilton)
Re: Net::POP3->new() fails in PerlApp compiled script <bart.lateur@pandora.be>
Re: Net::POP3->new() fails in PerlApp compiled script (James Willmore)
OpenGL module <danmurph@att.net>
Re: reading STDIN with Perl on Linux / Apache <REMOVEsdnCAPS@comcast.net>
Re: RegExp: Matching <mgjv@tradingpost.com.au>
Re: Session Management: NO Cookies.... (James Willmore)
Re: string length? <tcurrey@no.no.i.said.no>
Re: string length? (Sam Holden)
Re: string length? <tcurrey@no.no.i.said.no>
Re: Using variables in RegEx statements? <emschwar@pobox.com>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 23 Sep 2003 20:53:13 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: () questions
Message-Id: <Xns93FFDEA3F3BE2sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Matija Papec <mpapec@yahoo.com> wrote in
news:qkb1nvco5vpa99f6r7tl18b5bpk57mt9k4@4ax.com:
> Right now I'm tempted to start coding using only map since grep is
> obviously redundant in Perl. ;)
There's some book or documentation example (I've forgotten the source),
which shows that map and grep can easily be rewritten in terms of the
other:
@a = map f($_), @b; # is the same as
@a = grep {$_ = f($_); 1} @b;
@a = grep f($_), @b; # is the same as
@a = map f($_)? $_ : (), @b;
Just a cute bit of trivia. :-)
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP3D5A2PeouIeTNHoEQKy1QCg9+aheWQ+aSB2KrCWPK68Xpt4OvwAoLRb
b0oly5y76SH8vzepgAgct9Y8
=BLH3
-----END PGP SIGNATURE-----
------------------------------
Date: 23 Sep 2003 16:12:18 -0700
From: mike@high-pow-er.com (Michael Evanchik)
Subject: Re: Can't locate POE.pm in @INC
Message-Id: <36194296.0309231512.674eff51@posting.google.com>
Thanks for your help. I did have POE installed but what the problem
was is the POE install is installing itself to the lesser version of
perl i had installed. I deleted the lesser version of perl and then
reinstalled and it works. My problem is i dont understand how linux
keeps lesser versions instead of upgrading them.
Mike
------------------------------
Date: 24 Sep 2003 00:13:23 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: Can't locate POE.pm in @INC
Message-Id: <slrnbn1od3.sug.sholden@flexal.cs.usyd.edu.au>
On 23 Sep 2003 16:12:18 -0700, Michael Evanchik <mike@high-pow-er.com> wrote:
> Thanks for your help. I did have POE installed but what the problem
> was is the POE install is installing itself to the lesser version of
> perl i had installed. I deleted the lesser version of perl and then
> reinstalled and it works. My problem is i dont understand how linux
> keeps lesser versions instead of upgrading them.
linux doesn't. Your distribution might.
Just make sure the perl executable you use to run Makefile.PL is the
one you want the module installed for, and all should work out fine.
At least it has in my experience (I have two perl versions installed,
the system one and my own install that is actually from this
century)...
--
Sam Holden
------------------------------
Date: Tue, 23 Sep 2003 15:58:02 -0700
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: CGI.pm
Message-Id: <bkqja6$j0t$1@news.astound.net>
Malcolm Dew-Jones wrote:
> Trent Curry (tcurrey@no.no.no.i.said.no) wrote:
>> Jeff 'japhy' Pinyan wrote:
>>> On Mon, 22 Sep 2003, D Borland wrote:
>
>>>
>>>> Maybe PHP was the better choice.
>>>
>>> If what you need is web-based stuff, by all means, use PHP. That's
>>> what it's there for.
>
>> Perl works quite well for web apps too you know ;-p
>
> Yes, but it's at least as good to use php if you don't want to read
> the perl manuals.
Just a little note I wanted to add:
If you prefer the front end inline code style like php or asp, Perl can do
it too: Apache::ASP; asp using Perl for the host language. :-)
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'
------------------------------
Date: Tue, 23 Sep 2003 20:57:40 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: Matija Papec <mpapec@yahoo.com>
Subject: Re: class methods
Message-Id: <Pine.SGI.3.96.1030923205324.794205B-100000@vcmr-64.server.rpi.edu>
[posted & mailed]
On Tue, 23 Sep 2003, Matija Papec wrote:
>I have situation where /class method/ can be called inside and outside of
>package so I have to know when to throw away the first argument. I found
>that
>
>shift if $_[0] eq __PACKAGE__;
>
>should work, but is there a better way to distinguish inside and outside
>calls?
You could cheat with caller(). If the file of the caller of the function
is the same file the package is defined in, then you don't need to shift.
You could even just check if the PACKAGE the caller is in is the same as
the current package.
I assume you mean that you have code like so:
package Foo;
sub this {
...
}
sub that {
this(...);
}
and
package Bar;
Foo->this(...);
I would suggest that you NOT call a METHOD as a FUNCTION. But if you are
going to, then the caller() trick should be sufficient:
sub this {
shift @_ if (caller)[0] eq __PACKAGE__;
...
}
--
Jeff Pinyan RPI Acacia Brother #734 2003 Rush Chairman
"And I vos head of Gestapo for ten | Michael Palin (as Heinrich Bimmler)
years. Ah! Five years! Nein! No! | in: The North Minehead Bye-Election
Oh. Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)
------------------------------
Date: Tue, 23 Sep 2003 21:09:40 -0400
From: Kevin Michael Vail <kevin@vaildc.net>
Subject: Re: class methods
Message-Id: <kevin-760768.21094023092003@news101.his.com>
In article <s3c1nvo4cmr4e6gfoac20d7tumuijqctkj@4ax.com>,
Matija Papec <mpapec@yahoo.com> wrote:
> I have situation where /class method/ can be called inside and outside of
> package so I have to know when to throw away the first argument. I found
> that
>
> shift if $_[0] eq __PACKAGE__;
>
> should work, but is there a better way to distinguish inside and outside
> calls?
What do you mean by inside and outside the package? Are you saying that
you want to call it as Foo->bar() from outside the package, and just as
bar() from within the package? I don't think you actually should do
that, because that makes it impossible for anyone to override bar() if
they create a subclass of your class.
If you can throw the first argument away, as what you've written above
suggests, then I would just always call it as a method. If you're
calling it from inside the package, just use the $self (or $this)
pointer you've got from the method you're in. That way inheritance
works properly.
--
Kevin Michael Vail | Dogbert: That's circular reasoning.
kevin@vaildc.net | Dilbert: I prefer to think of it as no loose ends.
http://www.vaildc.net/kevin/
------------------------------
Date: 23 Sep 2003 19:23:03 -0700
From: jwillmore@cyberia.com (James Willmore)
Subject: Re: class methods
Message-Id: <e0160815.0309231823.4cbf3ad8@posting.google.com>
Matija Papec <mpapec@yahoo.com> wrote in message news:<s3c1nvo4cmr4e6gfoac20d7tumuijqctkj@4ax.com>...
> I have situation where /class method/ can be called inside and outside of
> package so I have to know when to throw away the first argument. I found
> that
>
> shift if $_[0] eq __PACKAGE__;
>
> should work, but is there a better way to distinguish inside and outside
> calls?
==untested==
#get who's calling the method and the method's unnamed arguments
my ($caller, @args) = @_;
#return from the method unless the reference of the caller is equal
#to the PACKAGE name
return unless ref($caller) eq __PACKAGE__;
You may want to look over perltoot and perlbot.
HTH
Jim
------------------------------
Date: Wed, 24 Sep 2003 00:09:58 GMT
From: Sean O'Dwyer <notspam@spamfree.dud>
Subject: cron/http absolute directories
Message-Id: <notspam-AE9EFF.20154023092003@news-server.rdc-nyc.rr.com>
Hi,
I have a Perl script running on an apache server which contains the
following lines:
require('../variables-global.pl');
require('variables-local.pl');
When I call the script manually, via http, it works fine. But when it
runs automaticaly via cron I get an e-mail from the cron daemon saying
"Can't locate ../variables-global.pl at line such-and-such".
I might be missing something here about how Apache runs each call to the
script as its own process and user.
My plan to try and solve the problem is to specify absolute paths to
both these files, but I'm not sure how to do this (may be a question for
an Apache NG, I realize).
I need the script to be callable both automatically by cron and manually
by http. Is that possible? Any help appreciated.
Kind regards,
Sean
------------------------------
Date: Wed, 24 Sep 2003 02:23:46 +0100
From: "D Borland" <notavailable@nospamplease.com>
Subject: Re: cron/http absolute directories
Message-Id: <7n6cb.65$V44.357419@newsfep2-gui.server.ntli.net>
Not 100% sure if this is correct, but someone will soon correct me if it's
not i'm sure :)
Perl inherits is working directory from whichever process runs it, so i
would ASSUME that the working directory when run from cron is something like
/usr/bin and the working directory for apache when run by http is probably
wherever the script was launched from.
Not sure if that help you, or helped to confuse you, but either way i would
suggest using absolute url's
Dagmar
"Sean O'Dwyer" <notspam@spamfree.dud> wrote in message
news:notspam-AE9EFF.20154023092003@news-server.rdc-nyc.rr.com...
> Hi,
>
> I have a Perl script running on an apache server which contains the
> following lines:
>
>
> require('../variables-global.pl');
> require('variables-local.pl');
>
>
> When I call the script manually, via http, it works fine. But when it
> runs automaticaly via cron I get an e-mail from the cron daemon saying
> "Can't locate ../variables-global.pl at line such-and-such".
>
> I might be missing something here about how Apache runs each call to the
> script as its own process and user.
>
> My plan to try and solve the problem is to specify absolute paths to
> both these files, but I'm not sure how to do this (may be a question for
> an Apache NG, I realize).
>
> I need the script to be callable both automatically by cron and manually
> by http. Is that possible? Any help appreciated.
>
> Kind regards,
>
> Sean
------------------------------
Date: 23 Sep 2003 18:44:16 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: cron/http absolute directories
Message-Id: <3f70f6f0@news.victoria.tc.ca>
Sean O'Dwyer (notspam@spamfree.dud) wrote:
: Hi,
: I have a Perl script running on an apache server which contains the
: following lines:
: require('../variables-global.pl');
: require('variables-local.pl');
: When I call the script manually, via http, it works fine. But when it
: runs automaticaly via cron I get an e-mail from the cron daemon saying
: "Can't locate ../variables-global.pl at line such-and-such".
I would first make a cronable script that simply displays as much
information as possible.
Cron will mail that info to you.
#!/bin/sh
pwd
echo $PATH
printenv
#(etc)
------------------------------
Date: Wed, 24 Sep 2003 02:16:42 GMT
From: Sean O'Dwyer <notspam@spamfree.dud>
Subject: Re: cron/http absolute directories
Message-Id: <notspam-B8133C.22173623092003@nyctyp01-ge0.rdc-nyc.rr.com>
In article <7n6cb.65$V44.357419@newsfep2-gui.server.ntli.net>,
"D Borland" <notavailable@nospamplease.com> wrote:
> Perl inherits is working directory from whichever process runs it, so i
> would ASSUME that the working directory when run from cron is something like
> /usr/bin and the working directory for apache when run by http is probably
> wherever the script was launched from.
Thanks, that's what I'd always assumed, and what had been born out by my
non-cron experience with other scripts that access files in multiple
directories. I just started using cron this evening.
> Not sure if that help you, or helped to confuse you, but either way i would
> suggest using absolute url's
That's the plan, but I'm not sure how to specify. For example, I tried...
require('/www/cgi-bin/variables-global.pl');
require('/www/cgi-bin/specialdir/variables-local.pl');
..but that doesn't work because it starts looking for the /www/
directory STARTING in the directory that contains the script.
There must be some way to specify "start at the root level, please" --
probably just a very basic, obvious hole in my knowledge.
Still confused, but plugging away.
Cheers,
Sean
------------------------------
Date: Wed, 24 Sep 2003 02:19:29 GMT
From: Sean O'Dwyer <notspam@spamfree.dud>
Subject: Re: cron/http absolute directories
Message-Id: <notspam-A9B050.22202223092003@nyctyp01-ge0.rdc-nyc.rr.com>
In article <3f70f6f0@news.victoria.tc.ca>,
yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones) wrote:
> I would first make a cronable script that simply displays as much
> information as possible.
>
> Cron will mail that info to you.
>
> #!/bin/sh
> pwd
> echo $PATH
> printenv
>
> #(etc)
>
Good suggestion, I'll give it a bash, thanks.
Sean
------------------------------
Date: Wed, 24 Sep 2003 12:27:17 +1000
From: "Gregory Toomey" <NOSPAM@bigpond.com>
Subject: Re: cron/http absolute directories
Message-Id: <bkqveo$4spdh$1@ID-202028.news.uni-berlin.de>
"Sean O'Dwyer" <notspam@spamfree.dud> wrote in message
news:notspam-AE9EFF.20154023092003@news-server.rdc-nyc.rr.com...
> Hi,
>
> I have a Perl script running on an apache server which contains the
> following lines:
>
>
> require('../variables-global.pl');
> require('variables-local.pl');
>
>
> When I call the script manually, via http, it works fine. But when it
> runs automaticaly via cron I get an e-mail from the cron daemon saying
> "Can't locate ../variables-global.pl at line such-and-such".
>
> I might be missing something here about how Apache runs each call to the
> script as its own process and user.
>
> My plan to try and solve the problem is to specify absolute paths to
> both these files, but I'm not sure how to do this (may be a question for
> an Apache NG, I realize).
>
> I need the script to be callable both automatically by cron and manually
> by http. Is that possible? Any help appreciated.
>
> Kind regards,
>
> Sean
Make no assumptions about your starting directory with cron.
Either add the following to your cron ...
(cd /some/home/dir; ./someprog.pl)
... or in linux (and some other unix variants) will let you add variables
to your crontab as follows:
SHELL=/bin/bash
MAILTO=xxxx@mail.cron
HOME=/home/xxx/
If cron is set up properly you will be emailed the stdout from your cron
tasks.
gtoomey
------------------------------
Date: Wed, 24 Sep 2003 02:39:44 GMT
From: Sean O'Dwyer <notspam@spamfree.dud>
Subject: Re: cron/http absolute directories
Message-Id: <notspam-0D8DB7.22403723092003@nyctyp01-ge0.rdc-nyc.rr.com>
In article <bkqveo$4spdh$1@ID-202028.news.uni-berlin.de>,
"Gregory Toomey" <NOSPAM@bigpond.com> wrote:
> MAILTO=xxxx@mail.cron
> HOME=/home/xxx/
It allows MAILTO (that's how I'm getting the e-mails at my offsite
address) so now I'm testing the HOME function too.
Cheers,
Sean
------------------------------
Date: Wed, 24 Sep 2003 03:08:22 GMT
From: Sean O'Dwyer <notspam@spamfree.dud>
Subject: Re: cron/http absolute directories
Message-Id: <notspam-76C010.23091523092003@nyctyp01-ge0.rdc-nyc.rr.com>
In article <bkqveo$4spdh$1@ID-202028.news.uni-berlin.de>,
"Gregory Toomey" <NOSPAM@bigpond.com> wrote:
> HOME=/home/xxx/
This seems to have cured my disease. Thanks a million.
Sean
------------------------------
Date: Tue, 23 Sep 2003 23:38:05 -0400
From: Eric Amick <eric-amick@comcast.net>
Subject: Re: D not deleting all breakpoints
Message-Id: <6642nv0al3b0fgtrekouia014c77dt9die@4ax.com>
On Sun, 21 Sep 2003 17:15:40 GMT, Sam <samj2@austarmetro.com.au> wrote:
>Hello
>DB<45>D
>DB<45>L
>still lists the 3 breakpoints I have had and the code stops at them.
>how can I delete all breakpoint. it seams the D switch is not working.
According to my copy of perldoc perldebug, "B *" is the command to delete
all breakpoints.
--
Eric Amick
Columbia, MD
------------------------------
Date: Wed, 24 Sep 2003 13:00:30 +1000
From: Sisyphus <kalinabears@iinet.net.au>
Subject: Determine connection status on Linux
Message-Id: <3f710980$0$23607$5a62ac22@freenews.iinet.net.au>
Hi,
Not entirely on-topic, I'm afraid, but how do I determine from a perl
script if I'm currently connected to the Internet ?
A system() command would be satisfactory, if I can just find out which
one to use :-)
I'm having dificulty with Device::Modem - should I persevere ?
For making the connection manually, I use the kppp dialer on (Mandrake)
linux - which connects me through an external dialup modem.
Cheers,
Rob
------------------------------
Date: Wed, 24 Sep 2003 09:46:41 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: How do I pass a value to a PERL script from an <a href?
Message-Id: <3366823.mi8c9MkqOD@gregs-web-hosting-and-pickle-farming>
It was a dark and stormy night, and Rodney managed to scribble:
> I want to use a regular HTML href to call a PERL script and I also want
> to include information to pass to the PERL script.
>
> IE:
> <a href="/cgi-local/PerlScript.pl">
Just like normal html:
<a href="/cgi-local/PerlScript.pl?var1=value1&var2=value2">
You can also generate an image (gif/jpeg/png etc):
<img src="/cgi-local/PerlScript.pl?var1=value1&var2=value2">
gtoomey
------------------------------
Date: 23 Sep 2003 19:10:25 -0700
From: jwillmore@cyberia.com (James Willmore)
Subject: Re: How do I pass a value to a PERL script from an <a href?
Message-Id: <e0160815.0309231810.627a43af@posting.google.com>
"Rodney" <NoSpamPlease@bellsouth.net> wrote in message news:<HQ0cb.20401$an.10076@bignews6.bellsouth.net>...
> I want to use a regular HTML href to call a PERL script and I also want to
> include information to pass to the PERL script.
>
> IE:
> <a href="/cgi-local/PerlScript.pl">
>
> I would like to pass a value such as 567 along with this call.
>
> Can it be done using a regular <A HREF= > ?
> If so, what is the syntax?
From a Perl script or raw HTML?
Post your code -or- post your question to a CGI authoring newsgroup.
Jim
------------------------------
Date: Wed, 24 Sep 2003 09:49:48 +0800
From: "mkl" <mkl.tw@ttt.com>
Subject: Re: how to find the biggest ????
Message-Id: <bkqt89$5n9@netnews.hinet.net>
I want to compare number and print the whole line,
I know the biggest value is 298 in this file and
print a (298:298) (9:9)
thanks your help!!!!
"Chris Mattern" <syscjm@gwu.edu> ??? news:3F70621F.5060508@gwu.edu ???...
> mkl wrote:
> > If I have a file ,named txt
> >
> > ###############
> > a (298:298) (9:9)
> > b (2:2)
> > c (3:3)
> > d (5:5)
> > ############################
> >
> >
> > how do i select the biggest one and print ?
> >
> >
> Biggest what? And how are you determining
> that x is bigger than y?
>
> Chris Mattern
>
------------------------------
Date: Wed, 24 Sep 2003 03:35:45 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: how to find the biggest ????
Message-Id: <3f7109a5.36381005@news.erols.com>
[Please do not top-post replies. Please trim reply-quoted material to
the minimum necessary to establish context. See the clpm posting
guidelines at http://mail.augustmail.com/~tadmc/clpmisc.shtml for
explanations and other good advices.]
"mkl" <mkl.tw@ttt.com> wrote:
: "Chris Mattern" <syscjm@gwu.edu> ??? news:3F70621F.5060508@gwu.edu ???...
: > mkl wrote:
: > > If I have a file ,named txt
: > >
: > > ###############
: > > a (298:298) (9:9)
: > > b (2:2)
: > > c (3:3)
: > > d (5:5)
: > > ############################
: > >
: > > how do i select the biggest one and print ?
: > >
: > Biggest what? And how are you determining
: > that x is bigger than y?
:
: I want to compare number and print the whole line,
: I know the biggest value is 298 in this file and
: print a (298:298) (9:9)
Have you tried writing any code on your own yet?
One possible way,
use List::Util qw(reduce max);
my $big = reduce{max($a=~/\d+/g)>max($b=~/\d+/g)?$a:$b} <DATA>;
__DATA__
a (298:298) (9:9)
b (2:2)
c (3:3)
d (5:5)
------------------------------
Date: Wed, 24 Sep 2003 00:27:01 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Net::POP3->new() fails in PerlApp compiled script
Message-Id: <auo1nv40sa73dd6u1eht8qhh17p07rehda@4ax.com>
Eric McDaniel wrote:
>Any ideas?
Your error message isn't that helpful. See if you can print out a string
with some more info. See the docs for Net::POP3 -- I'm a bit lazy
myself.
Anyway, it's rather typical for apps compiled with PerlApp or its
distant nephew perl2exe, if it fails, that one or more modules were
overlooked when building the distribution. (= the EXE). At first look I
see a lot of "use" statements in Net::POP3, so I suggest you try and
dump the contents of %INC before that call on line 3. Data::Dumper would
be fine. Let's see if one isn't listed that is listed in the list you
gave in your post.
--
Bart.
------------------------------
Date: 23 Sep 2003 19:00:10 -0700
From: jwillmore@cyberia.com (James Willmore)
Subject: Re: Net::POP3->new() fails in PerlApp compiled script
Message-Id: <e0160815.0309231800.572ba4a6@posting.google.com>
"Eric McDaniel" <netnews1@mcdanielhome.com> wrote in message news:<24Ybb.553105$YN5.373571@sccrnsc01>...
> This may be a question for ActiveState support, but just in case anyone out
> there knows what the problem is...
>
> My call to Net::POP3->new() works fine when run through the perl
> interpreter, but fails when I compile the script with PerlApp and run it. My
> system is Windows 2000, ActiveState Perl 5.8.0 build 806, PerlApp 5.2.0
> build 520.
>
> Here is the script:
>
> ##############################################################
> #!perl -w
>
> use strict;
>
> use Net::POP3;
>
> my $p = Net::POP3->new('mail.mydomain.com', Debug=>99)
> or die('Server connection error');
> ##############################################################
>
> The command'perl pop3.pl' yields this (successful) output:
>
> Net::POP3: Net::POP3(2.23)
> Net::POP3: Net::Cmd(2.21)
> Net::POP3: Exporter(5.566)
> Net::POP3: IO::Socket::INET(1.26)
> Net::POP3: IO::Socket(1.27)
> Net::POP3: IO::Handle(1.21)
>
> Net::POP3=GLOB(0x1d524ac)<<< +OK X1 NT-POP3 Server mail013.readyhosting.com
> (IMail 7.10 2193398-16)
> Net::POP3=GLOB(0x1d524ac)>>> RSET
> Net::POP3=GLOB(0x1d524ac)<<< +OK
> Net::POP3=GLOB(0x1d524ac)>>> QUIT
> Net::POP3=GLOB(0x1d524ac)<<< +OK POP3 Server saying Good-Bye
>
>
> However, when I compile it with PerlApp ('perlapp pop3.pl') and run the
> resulting pop3.exe, it dies:
>
> Server connection error at pop3.pl line 7.
>
>
> Any ideas?
With perlcc, you have to include the modules that you have included in
the script. It may be the same with PerlApp.
Just a thought.
Jim
------------------------------
Date: Tue, 23 Sep 2003 23:18:57 GMT
From: "dpm" <danmurph@att.net>
Subject: OpenGL module
Message-Id: <Bx4cb.156251$3o3.11148348@bgtnsc05-news.ops.worldnet.att.net>
I would like to get comments (good or bad) from anyone who has used the
OpenGL module, especially for 3D graphics on Unix. Any information would be
appreciated.
------------------------------
Date: Tue, 23 Sep 2003 20:41:41 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: reading STDIN with Perl on Linux / Apache
Message-Id: <Xns93FFDCAFDDD07sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Juha Laiho <Juha.Laiho@iki.fi> wrote in
news:bkppjk$ki2$2@ichaos.ichaos-int:
> "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> said:
...
> Ok, change to method="POST", and adapt your script appropriately, and
> you're done.
>
>>Why not? It's not really any less secure than transmitting it via
>>POST method.
>
> The difference is that you don't see POST data from server logs,
> whereas GET data will be logged. It's not a major difference, but at
> least I feel more comfortable browsing server logs when the logs do
> not contain passwords.
Mmmm, I *suppose*... but if you're worried about your sysadmins snooping
passwords from the apache logs, you've got bigger problems. :-)
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP3D2TWPeouIeTNHoEQJM3gCg6QBdZijrDUwVQV0yK7mBcvf33GgAn2RY
d3Ao1tT+k2XU+Rb++5TQTsnF
=+fzH
-----END PGP SIGNATURE-----
------------------------------
Date: 23 Sep 2003 22:54:20 GMT
From: Martien Verbruggen <mgjv@tradingpost.com.au>
Subject: Re: RegExp: Matching
Message-Id: <slrnbn1jou.7ha.mgjv@verbruggen.comdyn.com.au>
On Tue, 23 Sep 2003 11:55:09 +0200,
Tore Aursand <tore@aursand.no> wrote:
> On Tue, 23 Sep 2003 02:09:29 +0000, Martien Verbruggen wrote:
>>> /var/www/html/test/ - Match
>>> /var/www/html/test - Match
>>> /var/www/html/test/2 - Match
>>> /var/www/html/test/23/ - Match
>>> /var/www/html/test/_foo/ - Do _not_ match
>
>> I wouldn't normally try to capture this in a single regexp, but I
>> guess that's what you're looking for, so...
>
> That's right. If I had the chance, which I don't think I have, I need to
> catch this in _one_ regular expression. Ack! :-)
>
>> my $dir = "/var/www/html/test";
>> print "matches" if m#\A^$dir(/[^_]|/?\Z)#;
>
> I don't get this one to work the way intended, either. Even tried it in
> Perl with a list of possible directory names.
>
> It matches on '/var/www/html/test/subdir/_foo/', but it shouldn't.
Oh. I didn't get that at all out of the original post. maybe you
should have included that as an example as well.
> Any idea?
That makes it alltogether more difficult to do it in one regex, and I
suspect you'd need to use features of Perl's RE that won't be
available in Apache. I wouldn't even try to do this in a single regex
anymore in Perl, and I do think that trying to come up with a single
one for Perl would be futile, given that it has to work in Apache.
In Perl, I'd say:
print "match" if m#\A$dir# and not m#/_#;
or, if you want to make sure you don't match
/var/www/html/test.dir
print "match" if m#\A$dir(/|\Z)# and not m#/_#;
Expressing that "not" in a regular expression is tough, if at all
possible. I expect it's possible, but, as I said, I think it'd require
some of Perl's specific RE features.
Martien
--
|
Martien Verbruggen | If at first you don't succeed, destroy all
Trading Post Australia | evidence that you tried.
|
------------------------------
Date: 23 Sep 2003 19:07:21 -0700
From: jwillmore@cyberia.com (James Willmore)
Subject: Re: Session Management: NO Cookies....
Message-Id: <e0160815.0309231807.227c41@posting.google.com>
sucpraran@yahoo.com (Sucpraran) wrote in message news:<938f9bf4.0309230831.796712c3@posting.google.com>...
> New to Perl, Apache world.
> Like to get thoughts on maintaining session WITHOUT using Client Side
> Cookies.
> Our environment is Perl, Apache, Oracle DB, Unix OS.
>
> What are the capabilities of Server side/Database session management
> in this environment? We can't compromise on security and load
> balancing (multiple servers).
>
You could use hidden fields, but that's not a 100% secure method. Or
an Apache module (think mod_auth), but I believe that uses cookies.
You could restrict access based upon IP addresses, but those can be
spoofed.
Any reason why you don't want to use cookies? I mean, if you _only_
use cookies, that's not very secure. However, they are useful when
used in conjunction with other methods. It's just another layer of
authentication that someone has to figure out, but it's still a layer.
It keeps honest people honest.
HTH
Jim
------------------------------
Date: Tue, 23 Sep 2003 15:53:42 -0700
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: string length?
Message-Id: <bkqj22$iub$1@news.astound.net>
Abigail wrote:
> But more than lazy people, I hate whiners who whine if you don't
> want to kiss up to people.
Then you miss understand me and proceed to a false conclusion of my intent.
I was not trying to be anyone's lawyer. Actually I was poking fun at
Abigail's "rosting over a fire" gag in my last reply. I was not in any way
trying to motivate "kissing up" to anyone.
> *PLONK*
I'm sorry, but what real gain is there from publically announcing additions
to one's kill file?
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'
------------------------------
Date: 24 Sep 2003 00:10:28 GMT
From: sholden@flexal.cs.usyd.edu.au (Sam Holden)
Subject: Re: string length?
Message-Id: <slrnbn1o7k.sug.sholden@flexal.cs.usyd.edu.au>
On Tue, 23 Sep 2003 15:53:42 -0700, Trent Curry <tcurrey@no.no.i.said.no> wrote:
> Abigail wrote:
>
>> But more than lazy people, I hate whiners who whine if you don't
>> want to kiss up to people.
>
> Then you miss understand me and proceed to a false conclusion of my intent.
> I was not trying to be anyone's lawyer. Actually I was poking fun at
> Abigail's "rosting over a fire" gag in my last reply. I was not in any way
> trying to motivate "kissing up" to anyone.
I suspect Abigail was referring to all your posts in the thread and not
just the specific post that was replied to.
>
>> *PLONK*
>
> I'm sorry, but what real gain is there from publically announcing additions
> to one's kill file?
Other people see examples of wht not to do if they dont want to also end
up in that person's killfile. And I guess what to do if they do want to
end up in that person's killfile. And possibly a guide to others who
didn't follow the thread as to a poster who's posts might be worth
checking to see if the killfile entry should be duplicated. The second
two reasons are less likely and less important, obviously, but that's
three just off the top of my head.
I consider it of great benefit to know what I should avoid in order to
have a chance of knowledgable, experienced perl programmers answering a
question I may have in the future.
--
Sam Holden
------------------------------
Date: Tue, 23 Sep 2003 19:26:35 -0700
From: "Trent Curry" <tcurrey@no.no.i.said.no>
Subject: Re: string length?
Message-Id: <bkqvh8$mnc$1@news.astound.net>
Sam Holden wrote:
> On Tue, 23 Sep 2003 15:53:42 -0700, Trent Curry
> <tcurrey@no.no.i.said.no> wrote:
>> Abigail wrote:
>>
>>> But more than lazy people, I hate whiners who whine if you don't
>>> want to kiss up to people.
>>
>> Then you miss understand me and proceed to a false conclusion of my
>> intent.
>> I was not trying to be anyone's lawyer. Actually I was poking fun at
>> Abigail's "rosting over a fire" gag in my last reply. I was not in
>> any way trying to motivate "kissing up" to anyone.
>
> I suspect Abigail was referring to all your posts in the thread and
> not
> just the specific post that was replied to.
>
>>
>>> *PLONK*
>>
>> I'm sorry, but what real gain is there from publically announcing
>> additions to one's kill file?
>
> Other people see examples of wht not to do if they dont want to also
> end
> up in that person's killfile. And I guess what to do if they do want
> to
> end up in that person's killfile. And possibly a guide to others who
> didn't follow the thread as to a poster who's posts might be worth
> checking to see if the killfile entry should be duplicated. The second
> two reasons are less likely and less important, obviously, but that's
> three just off the top of my head.
>
> I consider it of great benefit to know what I should avoid in order to
> have a chance of knowledgable, experienced perl programmers answering
> a question I may have in the future.
So in other words I'm not allowed to have an opinion, lest Abigail be not in
agreeance? I take pride in being able to think for my self.
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'
------------------------------
Date: Tue, 23 Sep 2003 18:31:05 -0600
From: Eric Schwartz <emschwar@pobox.com>
Subject: Re: Using variables in RegEx statements?
Message-Id: <etozngv58om.fsf@wormtongue.emschwar>
"Eric J. Roode" <REMOVEsdnCAPS@comcast.net> writes:
> "Rodney" <NoSpamPlease@bellsouth.net> wrote in news:YmKbb.12719$iO.1221
> @bignews5.bellsouth.net:
>> Here's an example of my code so far... it simply doesn't work ????
>
> Let me guess: You're the kind of person who takes his car to the repair
> shop and says, "My car doesn't work -- what's wrong with it????", right?
Which is a completely rational thing to do when you're paying a
professional to diagnose and fix the problem. Posting to clpm, OTOH,
is almost exactly the opposite case. :)
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
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 5552
***************************************