[18481] in Perl-Users-Digest
Perl-Users Digest, Issue: 649 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 7 14:10:33 2001
Date: Sat, 7 Apr 2001 11:10:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <986667015-v10-i649@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 7 Apr 2001 Volume: 10 Number: 649
Today's topics:
Re: Perl training courses in the UK? <abe@ztreet.demon.nl>
problem with making dirs! <webmaster@netdating.nl>
Re: problem with making dirs! (Tad McClellan)
Re: problem with making dirs! <rick.delaney@home.com>
Re: problem with making dirs! <webmaster@netdating.nl>
Re: problem with making dirs! (Tad McClellan)
problem with perlscript <toploader23@lineone.net>
Re: problem with perlscript <paulus86@ascat.de>
Re: Radius detail File to csv <rick.delaney@home.com>
Re: Reverse DNS Lookup (Mark Jason Dominus)
Re: The return value takes no notice about the exact ma <joe+usenet@sunstarsys.com>
To Perl Or Not To Perl (Re: Why Perl?) (Abigail)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 07 Apr 2001 19:51:27 +0200
From: Abe Timmerman <abe@ztreet.demon.nl>
Subject: Re: Perl training courses in the UK?
Message-Id: <n5juctsua8qjjqe90drth6m14bvq4gkc7m@4ax.com>
On Thu, 5 Apr 2001 00:01:40 +0100, "pgroves" <pgroves@ntlworld.com>
wrote:
> Can anyone recommend any good 3-5 day introductory and/or intermediate
> commercial Perl courses in the UK (preferably in the Thames Valley or London
> area)?
Have you been in contact with the London Perl M[ou]ngers?
http://london.pm.org
--
Good luck,
Abe
perl -e '$_=sub{split//,pop;print pop while@_};&$_("rekcah lreP rehtona
tsuJ")'
------------------------------
Date: Sat, 7 Apr 2001 16:45:48 +0200
From: "Bert" <webmaster@netdating.nl>
Subject: problem with making dirs!
Message-Id: <3acf278c$0$4568@reader2>
hi there!
Since i've been running my perl-scripts on a windows 2000 server I've got a
problem:
I can't make dirs!
mkdir $anydir,0777;
(nor without 0777)
does not work... can anyone please tell me what to do?
I've been searching all around the world wide web in order to solve this
problem but I cannot find anything usefull.
Thanx in ahead, Bert
------------------------------
Date: Sat, 7 Apr 2001 10:35:46 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: problem with making dirs!
Message-Id: <slrn9cu9e2.ogq.tadmc@tadmc26.august.net>
Bert <webmaster@netdating.nl> wrote:
>
>Since i've been running my perl-scripts on a windows 2000 server I've got a
>problem:
>I can't make dirs!
>
>mkdir $anydir,0777;
>(nor without 0777)
>
>does not work... can anyone please tell me what to do?
Yes. The "anyone" there would be the perl itself. To have perl
tell you why the mkdir() failed, simply check the return value
from the function call, and include the $! special variable in
the output message:
mkdir $anydir, 0777 or die "could not mkdir($anydir) $!";
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 07 Apr 2001 15:30:40 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: problem with making dirs!
Message-Id: <3ACF35DE.EBD509CF@home.com>
[posted & mailed]
Bert wrote:
>
> mkdir $anydir,0777;
> (nor without 0777)
>
> does not work... can anyone please tell me what to do?
The first thing to do is to ask Perl why it doesn't work.
mkdir $anydir, 0777 or die "mkdir: '$anydir': $!";
On windows 2000, $^E may give you more information than $!.
perldoc perlvar
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sat, 7 Apr 2001 18:16:10 +0200
From: "Bert" <webmaster@netdating.nl>
Subject: Re: problem with making dirs!
Message-Id: <3acf3cba$0$13297@reader5>
> Yes. The "anyone" there would be the perl itself. To have perl
> tell you why the mkdir() failed, simply check the return value
> from the function call, and include the $! special variable in
> the output message:
>
> mkdir $anydir, 0777 or die "could not mkdir($anydir) $!";
>
>
aha, thank you, but now I get:
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
mkdir: 'd:/internet/root/www/mrp/test': Access is denied at
d:\internet\root\www\mrp\www\join\reg.cgi line 4.
So mr Perl is not helping me that much :)
Why is my access denied?
------------------------------
Date: Sat, 7 Apr 2001 12:39:41 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: problem with making dirs!
Message-Id: <slrn9cugmd.or4.tadmc@tadmc26.august.net>
[ Please do not send Stealth Cc's. It is not nice. ]
Bert <webmaster@netdating.nl> wrote:
>> Yes. The "anyone" there would be the perl itself. To have perl
>> tell you why the mkdir() failed, simply check the return value
>> from the function call, and include the $! special variable in
>> the output message:
>>
>> mkdir $anydir, 0777 or die "could not mkdir($anydir) $!";
>>
>>
>aha, thank you,
So I guess you haven't read the answer to this Perl Frequently
Asked Question:
perldoc -q CGI
"How can I get better error messages from a CGI program?"
>but now I get:
>
>CGI Error
^^^^^^^^^
See that? You have a CGI error, not a Perl error.
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
All of the messages that perl might issue are documented in the
perldiag.pod standard doc. If your message is not in there, then
it is not coming from Perl.
Your message above is not coming from Perl. It is coming from your
web server. You do not have a Perl problem, you have a web server
configuration problem.
>mkdir: 'd:/internet/root/www/mrp/test': Access is denied at
>d:\internet\root\www\mrp\www\join\reg.cgi line 4.
>
>So mr Perl is not helping me that much :)
Because it is not Mr. Perl's problem.
It is Mr. Web Server's problem.
>Why is my access denied?
I dunno.
Please ask web server configuration questions in a newsgroup about
web servers, such as:
comp.infosystems.www.servers.mac
comp.infosystems.www.servers.misc
comp.infosystems.www.servers.ms-windows
comp.infosystems.www.servers.unix
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sat, 7 Apr 2001 18:05:25 +0100
From: "Ryan Walkowski" <toploader23@lineone.net>
Subject: problem with perlscript
Message-Id: <tcui3csiceis08@corp.supernews.co.uk>
when ever i try to open any asp page that was in the perl installation
specifacally in C:\Perl\eg\aspSamples the debugging tells me this which is
displayed in the browser window
The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot
be displayed.
--------------------------------------------------------------------------
Please try the following:
a.. Click the Refresh button, or try again later.
b.. Open the localhost home page, and then look for links to the
information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
--------------------------------------------------------------------------
Technical Information (for support personnel)
a.. Error Type:
Active Server Pages, ASP 0129 (0x80004005)
The scripting language 'PerlScript' is not found on the server.
/PerlScript/ado11.asp, line 1
b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
c.. Page:
GET /PerlScript/ado11.asp
d.. Time:
07 April 2001, 17:57:49
e.. More information:
Microsoft Support
if anyone can help please reply to me at toploader23@lineone.net
------------------------------
Date: Sat, 7 Apr 2001 19:30:59 +0200
From: "Florian Paulus" <paulus86@ascat.de>
Subject: Re: problem with perlscript
Message-Id: <9anitj$5o3ab$1@ID-62217.news.dfncis.de>
do you expect this to be a Perl problem? doesn't it tell you to contact
micro$oft ? so what?
"Ryan Walkowski" <toploader23@lineone.net> schrieb im Newsbeitrag
news:tcui3csiceis08@corp.supernews.co.uk...
> when ever i try to open any asp page that was in the perl installation
> specifacally in C:\Perl\eg\aspSamples the debugging tells me this which is
> displayed in the browser window
> The page cannot be displayed
> There is a problem with the page you are trying to reach and it
cannot
> be displayed.
>
> --------------------------------------------------------------------------
>
> Please try the following:
>
> a.. Click the Refresh button, or try again later.
>
> b.. Open the localhost home page, and then look for links to the
> information you want.
> HTTP 500.100 - Internal Server Error - ASP error
> Internet Information Services
>
> --------------------------------------------------------------------------
>
> Technical Information (for support personnel)
>
> a.. Error Type:
> Active Server Pages, ASP 0129 (0x80004005)
> The scripting language 'PerlScript' is not found on the server.
> /PerlScript/ado11.asp, line 1
>
>
> b.. Browser Type:
> Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
>
> c.. Page:
> GET /PerlScript/ado11.asp
>
> d.. Time:
> 07 April 2001, 17:57:49
>
>
> e.. More information:
> Microsoft Support
>
>
> if anyone can help please reply to me at toploader23@lineone.net
>
>
------------------------------
Date: Sat, 07 Apr 2001 15:25:36 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: Radius detail File to csv
Message-Id: <3ACF34AE.48C031A4@home.com>
[posted & mailed]
hangover wrote:
>
[snip]
> If someone has such a beast or is feeling generous enough to whip one up, i
> would be most appreciative!
If you're just looking to find scripts, a search engine will probably be
more fruitful than this newsgroup.
> I am not able to do something like this myself at this stage :(
If you're willing to try then feel free to ask questions when you get
stuck (but check the FAQ first). If not, then I suggest you hire a
programmer.
--
Rick Delaney
rick.delaney@home.com
------------------------------
Date: Sat, 07 Apr 2001 17:40:57 GMT
From: mjd@plover.com (Mark Jason Dominus)
Subject: Re: Reverse DNS Lookup
Message-Id: <3acf5128.53c1$377@news.op.net>
[Mailed and posted]
In article <9al7ej$lpt$1@morgoth.sfu.ca>,
Anthony Delorenzo <ajdelore@sfu.ca> wrot:e
>1) I have been unable to find any documentation that can satisfactorily
>tell me what the ADDRTYPE argument (the second one supplied to the
>gethostbyaddr function) is.
The address that you give to to gethostbyaddr() might not be an
internet address, at least in principle. The world is full of network
address formats that aren't internet addresses. (The hardware address
built into your ethernet card is an example of this.) The folks who
designed gethostbyaddr() did not want it to work only for internet
addresses; they wanted it to work for any kind of address that anyone
would want.
The ADDRTYPE argument tells gethostbyaddr() what kind of address you
are giving it.
The 2 is just a magic constant that the gethostbyaddr() function
interprets to mean "internet address". Inside of gethostbyaddr() is
code that is something like this:
if ($addrtype == 2) {
... do whatever is appropriate for internet addresses ..
} elsif ($addrtype == 9) {
... do whatever is appropriate for X25 addresses ..
} else {
return ; # unknown address type; return false
}
You're not supposed to use the number 2 directly, because it might
have a different meaning on some other system. On your system, it
means 'internet address', but on some other system the number 2 might
represent some other sort of address. It is better to use the special
constant AF_INET, which is provided by the 'Socket' module:
use Socket;
$name = gethostbyaddr($address, AF_INET);
"AF" is short for "address family", so this is the constant that
represetns the internet family of addresses. On your system, it is
just an abbreviation for the number 2. On some other system, it might
be some other number.
>I found some old code from a 1996 article that led me to use the
>value of '2', but I really don't know why or for what.
Hope this helps.
--
@P=split//,".URRUU\c8R";@d=split//,"\nrekcah xinU / lreP rehtona tsuJ";sub p{
@p{"r$p","u$p"}=(P,P);pipe"r$p","u$p";++$p;($q*=2)+=$f=!fork;map{$P=$P[$f^ord
($p{$_})&6];$p{$_}=/ ^$P/ix?$P:close$_}keys%p}p;p;p;p;p;map{$p{$_}=~/^[P.]/&&
close$_}%p;wait until$?;map{/^r/&&<$_>}%p;$_=$d[$q];sleep rand(2)if/\S/;print
------------------------------
Date: 07 Apr 2001 11:37:56 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: The return value takes no notice about the exact match.
Message-Id: <m38zlcbu0b.fsf@mumonkan.sunstarsys.com>
"Kalle Anka" <kalle@tvettsvamp.a.se> writes:
> This is the script that tells you that your address is removed = perfect
> match, even if its not:
> #!/usr/bin/perl -w
^
T
use strict;
[...]
> while (<INFILE>) {
> chomp; # drops trailing newlines; can omit if undesirable
> $line = $_, last if /^\Q$email/i && ! /^$/; # substr match!
> }
Try removing the comments since they seem to be of no relevance to you.
HTH
--
Joe Schaefer "What a waste it is to lose one's mind. Or not to have a mind is
being very wasteful. How true that is."
-- Dan Quayle
------------------------------
Date: Sat, 7 Apr 2001 14:07:12 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: To Perl Or Not To Perl (Re: Why Perl?)
Message-Id: <slrn9cu7og.apt.abigail@tsathoggua.rlyeh.net>
GrapeApe (grapeape@aol.comjunk) wrote on MMDCCLXXVI September MCMXCIII in
<URL:news:20010406224639.03914.00002106@ng-fh1.aol.com>:
== Thats why I ask, why Perl? What can it do for me? It certainly was embedded i
== the answer to many of my specific questions in the past, but I don't know if
== can't find the baby steps back into exploring the language again. Perhaps you
== will see pathways I do not.
==
== Comments? TIA
Well, the best we can do is give you a list of pros and cons, and you
can make the decision yourself.
Pros: Having dinner with Perl Mongers.
Camels can go weeks without water.
(But Pythons can go weeks without food)
It looks like line noise - even your cat can program!
Damian Conway.
Perl Golf.
Cute babes.
JAPHs.
Cheap puns.
#perl
YAPC
purl
perl5
comp.lang.perl.misc
Cons: Having dinner with Perl Mongers.
There are no fun anagrams of "Larry Wall".
Godzilla.
It looks like line noise - even your cat hates it!
People claim you can program OO in Perl.
Slashdot.
Each new version of Perl will break half of your programs.
Perl is hard for most people to write. They write PERL or Pearl.
TPC
CGI
perl6
comp.lang.perl.misc
Abigail
------------------------------
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 649
**************************************