[11979] in Perl-Users-Digest
Perl-Users Digest, Issue: 5579 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 6 09:07:10 1999
Date: Thu, 6 May 99 06:00:23 -0700
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, 6 May 1999 Volume: 8 Number: 5579
Today's topics:
ANNOUNCE: Data::Locations 5.2 <sb@sdm.de>
Re: ANNOUNCE: Data::Locations 5.2 <sb@sdm.de>
apache 1.3.6 & mod_perl (J.Orlowsky)
Re: apache 1.3.6 & mod_perl <gellyfish@gellyfish.com>
Re: apache 1.3.6 & mod_perl (J.Orlowsky)
Re: Can a DNS lookup be performed from within perl ? (Michael Fuhr)
Re: Declaration Help Please!! (Bart Lateur)
Define a constant <h-montalan@i-france.com>
Re: Define a constant (Bart Lateur)
Re: deleting files <wyzelli@yahoo.com>
Re: Detecting screen resolution... <gellyfish@gellyfish.com>
Expect.pm problems (Brian Lane)
Extracting Emails from TXT <joeyandsherry@mindspring.com>
Re: HELP! can script use file w/o exposing it? (Miles R. Fidelman)
Re: installing APi507e.exe on Win 95 <Matija.Exel@lag.ensieg.inpg.fr>
Re: ISPs that offer cgi space?? <bblackmoor@my-dejanews.com>
Man Pages in Windows NT <DeleteThisdev@stabiplan.nl>
Re: matching hyphenated words across line ends (Bart Lateur)
Re: OReilly bullshit.... Camel logo trademark <wyzelli@yahoo.com>
Re: OReilly bullshit.... Camel logo trademark <rra@stanford.edu>
Re: OReilly bullshit.... Camel logo trademark (Bart Lateur)
Re: Pentium III Chips Released with IDs - Intel won't b <gellyfish@gellyfish.com>
Re: Perl virus scanner? (Peter van der Landen)
processor time <tbsmith@viper.net>
Re: Q: checking defined/usable handles? <sf@tellux.de>
Re: regexp for matching IP address block <gellyfish@gellyfish.com>
Re: syswrite() lies sstarre@my-dejanews.com
Re: syswrite() lies (Sam Holden)
Umlaute <dave@fbp.fh-frankfurt.de>
Re: Umlaute (Bart Lateur)
Re: using $, (was Re: having problems) (Bart Lateur)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 6 May 1999 11:59:21 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: ANNOUNCE: Data::Locations 5.2
Message-Id: <7gs06p$t1q$2@solti3.sdm.de>
Unfortunately I found a nasty little bug in versions 5.0 and 5.1 of
my module "Data::Locations", wherefore I am announcing
=========================================
Package "Data::Locations" Version 5.2
=========================================
This package is available for download either from my web site at
http://www.engelschall.com/u/sb/download/
or from any CPAN (= "Comprehensive Perl Archive Network") mirror server:
http://www.perl.com/CPAN/authors/id/STBEY/
Prerequisites:
--------------
Perl version 5.004 (subversion 0) or higher.
What's new in version 5.2:
--------------------------
+ Fixed a bug in method "read()" which prevented empty lines
to be read back in list context (empty lines were mistaken
for the end-of-file marker).
+ When an item in a location has the value "undef", the method
"read()" now returns the empty string instead. You would have
mistaken this for the end-of-file marker in previous versions.
Abstract:
---------
Data::Locations is a virtual file manager which allows you to write and
read data (text and binary) to and from virtual files (think of bubbles).
Moreover, this manager allows you to (recursively) define "magic" insertion
points in these virtual files (bubbles inside other bubbles) which can be
filled in (inflated) later (through a "straw", i.e., the object's reference),
at any convenient time and in any order you like. Since this software acts
purely in memory, there is no slowing down through costly file input/output
(i.e., no temporary files).
Legal issues:
-------------
This package with all its parts is
Copyright (c) 1997, 1998, 1999 by Steffen Beyer.
All rights reserved.
This package is free software; you can redistribute it and/or
modify it under the same terms as Perl itself, i.e., under the
terms of the "Artistic License" or the "GNU General Public License".
Please refer to the files "Artistic.txt" and "GNU_GPL.txt" in
this distribution for details!
Author's note:
--------------
I would be very pleased over *ANY* kind of feedback, questions,
suggestions, donations ;-) and so on, since unfortunately none of
you lazy bums ;-) (for exceptions to this see the "CREDITS.txt"
file in this distribution!) hardly ever writes me.
This feedback is essential for me in order to know wether this
module is useful, to estimate how many people use it and for
what (essential to assess the potential impact an incompatible
change may have, for instance), where its problems and weak-
nesses lie, what should be improved, what additional features
would be useful, etc.
Even e-mail with an empty body and just a subject line such as
"I'm using Data::Locations" would help!
Thank you very much in advance!
In any case, I hope you will find this module beneficial,
share and enjoy!
Yours sincerely,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
http://www.oreilly.de/catalog/perlmodger/bnp/
------------------------------
Date: 6 May 1999 12:06:52 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: ANNOUNCE: Data::Locations 5.2
Message-Id: <7gs0ks$t1q$3@solti3.sdm.de>
In comp.lang.perl.misc Steffen Beyer <sb@sdm.de> wrote:
> Prerequisites:
> --------------
> Perl version 5.004 (subversion 0) or higher.
Actually, you also need a
<<< C compiler >>>
starting with version 5.0, as there is an XS part now to do the most
tricky parts... :-)
Best regards,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
http://www.oreilly.de/catalog/perlmodger/bnp/
------------------------------
Date: Thu, 06 May 1999 11:21:29 -0700
From: SDK.DE@t-online.de (J.Orlowsky)
Subject: apache 1.3.6 & mod_perl
Message-Id: <3731DDA8.46B5A7D7@sdk.de>
Hi,
my perl-scripts do not get any parameters, that are posted with the call
of the scipts ?
the scripts are running fine on my isp-servers and are running on my
server, too.
But I get no results
J.O@gmx.net
------------------------------
Date: 6 May 1999 10:32:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: apache 1.3.6 & mod_perl
Message-Id: <373161b8@newsread3.dircon.co.uk>
J.Orlowsky <SDK.DE@t-online.de> wrote:
> Hi,
>
> my perl-scripts do not get any parameters, that are posted with the call
> of the scipts ?
> the scripts are running fine on my isp-servers and are running on my
> server, too.
> But I get no results
>
Lets guess - you have some hand-rolled piece of CGI form handling code
right ?
You will need to read the documentatiom for mod_perl and its associated
modules. Alternatively you can use the module CGI.pm which handles
most of it relatively seamlessly.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Thu, 06 May 1999 13:36:27 -0700
From: SDK.DE@t-online.de (J.Orlowsky)
To: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: apache 1.3.6 & mod_perl
Message-Id: <3731FD4B.7096C5B5@sdk.de>
Hello Jonathan,
the message-file of my apache server says:
10.0.0.2 -- [06/may/1999:12:59:19 -700] "POST
/cgi-local/script.pl?function:calc+person:1 HTTP/1.0" 200 147
an the script answers to my browser, that it doesn't get any parameters.
I've configured the following in my httpd.conf:
NameVirtualHost 10.0.0.2
<VirtualHost 10.0.0.2>
PerlModule Apache::Registry
PerlFreshRestart on
DocumentRoot "/htdocs"
Servername "www.willy.de"
Customlog /usr/local/apache/logs/willy-access.log
<Directory "/htdocs/cgi-local">
Options +ExecCgi
</Directory>
ScriptAlias /cgi-bin/ "/htdocs/cgi-local"
Alias /cgi-local/ "htdocs/cgi-local"
AddHandler server-parsed .htm
AddHandler server-parsed .html
AddType text/html
AddType text/htm
<Location "/cgi-local">
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
allow from all
PerlSendHandler on
</Location>
</VirtualHost>
I don't know, why it doesn't work and I've read many manuals.
J.O
Jonathan Stowe schrieb:
> J.Orlowsky <SDK.DE@t-online.de> wrote:
> > Hi,
> >
> > my perl-scripts do not get any parameters, that are posted with the call
> > of the scipts ?
> > the scripts are running fine on my isp-servers and are running on my
> > server, too.
> > But I get no results
> >
>
> Lets guess - you have some hand-rolled piece of CGI form handling code
> right ?
>
> You will need to read the documentatiom for mod_perl and its associated
> modules. Alternatively you can use the module CGI.pm which handles
> most of it relatively seamlessly.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 6 May 1999 04:16:07 -0600
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: Can a DNS lookup be performed from within perl ?
Message-Id: <7grq57$28k@flatland.dimensional.com>
efflandt@xnet.com (David Efflandt) writes:
> On 22 Apr 1999 07:01:56 GMT, Uri Raz <uraz@iil.intel.com> wrote:
> > I'm working on a perl script that analyses a web server's log file.
> >
> > As part of the script I want to translate an IP address into a host's
> > name, using (reverse) DNS lookup.
> >
> > Is there a way to do this from within perl, as a function and not by
> > calling a shell to perform nslookup ?
>
> # Get remote host if server does not
> unless ($ENV{REMOTE_HOST} && $ENV{REMOTE_ADDR} ne $ENV{REMOTE_HOST}) {
> my $ip_num = pack("C4", split(/\./, $ENV{REMOTE_ADDR}));
> $ENV{REMOTE_HOST} = scalar gethostbyaddr($ip_num, 2);
> $ENV{REMOTE_HOST} = $ENV{REMOTE_ADDR} unless $ENV{REMOTE_HOST};
> }
If your network and nameserver can stand the traffic, you might
be able to speed things up with a program I posted recently:
http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=455581292
Rather than wait for one query to complete before sending the
next, it sends many queries and handles them as they arrive.
I just used the program to resolve 8497 IP addresses from one of my
HTTP server's logs. I received 6108 responses in 219 seconds, which
includes the timeout period during which no responses arrived.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
------------------------------
Date: Thu, 06 May 1999 10:10:08 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Declaration Help Please!!
Message-Id: <37336980.1338467@news.skynet.be>
Jerome O'Neil wrote:
>He might try using a pattern match vice eq.
>
>if( $department =~ /Information/){ # etc...
He might try using less verbose, and therefore less error-prone, values
for his (hidden) form values. After all, this comes from a combo box,
doesn't it?
if($department eq 'inf') { ...
The checkbox HTML code would then look like
<OPTION value=inf>Information</OPTION>
Bart.
------------------------------
Date: Thu, 6 May 1999 11:36:38 +0200
From: "Hervi Montalan" <h-montalan@i-france.com>
Subject: Define a constant
Message-Id: <7grn48$no2$1@news.nctech.fr>
How to define a constant ?
------------------------------
Date: Thu, 06 May 1999 10:41:27 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Define a constant
Message-Id: <37376f41.2810677@news.skynet.be>
Hervi Montalan wrote:
>How to define a constant ?
use constant PI => 4 * atan2(1,1);
which generates a function PI(), or
*PI = \(4*atan2(1,1));
which assigns a read-only value to $PI . Both CAN be circumvented, e.g.
by doing this again. The first one will give a warning, but it's slower
(function call versus scalar access).
Bart.
------------------------------
Date: Thu, 6 May 1999 20:53:11 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: deleting files
Message-Id: <AYeY2.3$We3.1312@vic.nntp.telstra.net>
Bob Trieger <sowmaster@juicepigs.com> wrote in message news:7gqon9>
> perldoc -f unlink
>
>
> HTH
>
I am using Activeperl 5.005
When I run the above command I get:
No documentation found for "perlfunc"
Is this a known problem with the documentation on windoze?
Wyzelli
------------------------------
Date: 6 May 1999 10:28:09 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Detecting screen resolution...
Message-Id: <373160a9@newsread3.dircon.co.uk>
JB / MDO <jbdross@club-internet.fr> wrote:
> Can somenone please help me ?
>
Not here they cant. I suppose we're talking browsers here right ?
then I guess you'd better be asking in a group that is interested in
the subject.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: 6 May 1999 06:57:08 GMT
From: brian@tatoosh.com (Brian Lane)
Subject: Expect.pm problems
Message-Id: <slrn7j2f7i.2t0.brian@gromit.tatoosh.com>
Hello,
I'm having a hell of a time getting a simple Expect.pm script to work. I
ant to be able to use telnet via expect to do some things on my local
machine. But it keeps hanging after I send the username in response to the
login: prompt. It acts as if it isn't getting the CR (or CR/LF). I'm running
on a RedHat 5.1 Linux machine , kernel 2.0.36, perl version 5.004_04 built
for i386-linux. If I dump it into interact, then I can login normally.
Here's a copy of the script that fails:
#!/usr/bin/perl -w
use Expect;
# Uncomment to turn off debugging output
#$Expect::Log_Stdout=0
# My prompts look like [user@host dir]$
$prompt = '['.$username.'\@.*\][%>$]\s';
$telnet = Expect->spawn("/usr/bin/telnet localhost");
# Login to the local system
$telnet->expect(10,"ogin: ") || die "login:\n".$telnet->exp_error()."\n";
print $telnet "user\r";
$telnet->expect(10,"ssword: ") || die "Password:\n".$telnet->exp_error()."\n";
print $telnet "password\r";
# Execute a simple command
$telnet->expect(10,"-re",$prompt) || die "shell\n".$telnet->exp_error()."\n";
print $telnet "ls\r";
# Grab the echo
$telnet->expect(10,"ls\r\n");
# Get the listing
$telnet->expect(10,"-re",$prompt) || die "shell2\n".$telnet->exp_error()."\n";
print $telnet->exp_before();
print $telnet "exit\r";
$telnet->hard_close();
Thanks for any insight you can provide!
Brian
--
--------[Inside 71.29]-------[Outside 43.09F]-------[Drink 64.07F]---------
Brian Lane/KC7TYU http://www.tatoosh.com/~brian
Nexus Computing http://www.nexuscomputing.com
Linux Consulting & Web Hosting brian@nexuscomputing.com
------------------------------
Date: Thu, 6 May 1999 07:48:54 -0400
From: <joeyandsherry@mindspring.com>
Subject: Extracting Emails from TXT
Message-Id: <7gs03s$pck$1@nntp5.atl.mindspring.net>
Thanks in advance.
I've been struggling with a script to extract emails from a txt file. Is
there a way?
Any assistance would be grealty appreciated.
--
Joey Cutchins
President
Trading Post.Com, L.L.C.
http://internettradingpost.com
ceo@internettradingpost.com
------------------------------
Date: Thu, 6 May 1999 12:56:00 GMT
From: fidelman@world.std.com (Miles R. Fidelman)
Subject: Re: HELP! can script use file w/o exposing it?
Message-Id: <FBBALC.5J2@world.std.com>
the key is putting a User directive in your server's config file (see
below)
Sam Holden (sholden@pgrad.cs.usyd.edu.au) wrote:
: On Tue, 27 Apr 1999 04:16:27 GMT, pkuhar@my-dejanews.com wrote:
: >Please help!
: >
: >I have a data file (passwords.dat) which a perl script (getthem.cgi) opens,
: >reads into a variable called @passwords, and then closes. @passwords is
: >then printed. (This is just a test script so I know how to write a
: >useful one I am planning to write).
: >
: >However, I can't figure out how to get this done WITHOUT making passwords.dat
: >vulnerable to the "world" viewing it!
: >
: >My failing attempt to do this was as follows: I created passwords.dat with
: >getthem.cgi and set passwords.dat's chmod to 0700, also with getthem.cgi.
: >The hope was that getthem.cgi would be considered password.dat's "owner" and
: >that only getthem.cgi would be able to read, write and execute password.dat,
: >as I want. BUT when I did this, getthem.cgi fails to read the data! printing
: >@passwords displays nothing!
this would work IF getthem.cgi is running as you, for example:
in httpd.conf, for your directory:
..
User yourname
..
getthem.cgi: owned by yourname, file protection 700
passwords.dat: owned by yourname, file protection 700
the result: the server runs getthem.cgi as you, with your privileges, and
your account (or a process running as you) is the only one that access
either the script and the datafile
: The owner of the file and the 'owner' of the process are different concepts.
: One solution would be to make the perl script suid. That opens up a some
: security concerns and would require very careful authoring of the script.
: It's a possible solution though.
bad idea - you don't need to go that far - all you need to do is run as
you
------------------------------
Date: Thu, 06 May 1999 08:57:07 +0200
From: Matija Exel <Matija.Exel@lag.ensieg.inpg.fr>
Subject: Re: installing APi507e.exe on Win 95
Message-Id: <37313D43.D7433DAD@lag.ensieg.inpg.fr>
Brian Jepson wrote:
> I had this problem on a couple of machines. I think it was caused by the
> fact that I uninstalled Perl, did not reboot, and then installed Perl.
>
> I think there is something in the release notes about this. I believe
> that it is caused by the original (from the version I uninstalled) Perl
> DLL remaining resident during the installation of the new version of
> Perl. After I got into the habit of rebooting between uninstalling and
> reinstalling Perl, I never had this problem again.
>
well , that was not the case with my tests: most of the installations were
initial
installations of Active Perl.
------------------------------
Date: Thu, 06 May 1999 12:07:55 GMT
From: BBlackmoor <bblackmoor@my-dejanews.com>
Subject: Re: ISPs that offer cgi space??
Message-Id: <7gs0mp$mb8$1@nnrp1.deja.com>
Hash: SHA1
In article <372FF4EC.A5FC65E@chatbase.com>,
webmaster@chatbase.com wrote:
>
> ...take it into private emails -- where flames belong...
A curious statement, since I was chastising you and others for flaming
someone who asked a perfectly reasonable question.
--
Brandon Blackmoor Web Designer
BBlackmoor@sff.net 757-937-7038
Version: PGP Personal Privacy 6.0.2
Comment: DH/DSS: 2E7E 0FE6 5CFE A01A 1237 4602 D235 87E3 4653 39E7
iQA/AwUBNzGGNNI1h+NGUznnEQIB2ACcCuyCCwP0yQkz48xR/fJLdWV6SqkAn0dr
LgQpzz8jTc0J9aIpKzB23cNV
=+LL0
-----END PGP SIGNATURE-----
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 6 May 1999 14:53:29 +0200
From: "Martijn van der Kooij" <DeleteThisdev@stabiplan.nl>
Subject: Man Pages in Windows NT
Message-Id: <7gs3fb$q7u$1@news.Kijfhoek.NL.net>
Probably off topic, but i'm wondering how I can view man files in Windows
NT.
Has someone the source of the man utility, or does someone know where to
start searching?
Thanks,
Matijn van der Kooij
(BTW Are there utilities to create man pages for Windows NT ?)
------------------------------
Date: Thu, 06 May 1999 10:10:05 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: matching hyphenated words across line ends
Message-Id: <3732684d.1031436@news.skynet.be>
Jed Parsons wrote:
>This is more or less what I came up with, too, expect my regex was (is)
> s/(\w)-\n(\w+)/\1\2\n/g;
>The question that remains is whether it is possible to do something like
>this without undefining the $/ variable. Reason: I don't want to treat
>the input in paragraph mode. I want, e.g., $. to still refer to line
>numbers (as I think of them).
Well, here's MY solution (attempt). I delete the newline on the first
line if it ends with /\w\-$/, and then replace the first blank on the
following line with a newline.
my $combine; #flag = false
while(<IN>) {
s/\s/\n/ if $combine; # second line
$combine = s/(\w\-)\n/$1/; # first line
}
Bart.
------------------------------
Date: Thu, 6 May 1999 20:20:13 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: OReilly bullshit.... Camel logo trademark
Message-Id: <FteY2.2$We3.539@vic.nntp.telstra.net>
Russ Allbery <rra@stanford.edu> wrote in message
news:ylemku1yrt.fsf@windlord.stanford.edu...
> Unfortunately, they can't do that. They're screwed over by the way US
> trademark law works. If they don't do what they're doing to you, they
> run the risk of losing the trademark completely. Because you're talking
> about the language Perl, your use of the trademark is within the same
> domain as theirs, so they have to defend it or have it diluted.
>
> Sucks, but that's unfortunately the way the law works.
>
Is this a case of the law being an Ass? And what is the relation of an Ass
to a Camel?
:^)
Wyzelli
------------------------------
Date: 06 May 1999 03:59:02 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: OReilly bullshit.... Camel logo trademark
Message-Id: <ylaevixy4p.fsf@windlord.stanford.edu>
David Cantrell <NukeEmUp@ThePentagon.com> writes:
> rjk@linguist.dartmouth.edu (Ronald J Kimball) enlightened us thusly:
>> Of course, O'Reilly can't trademark the colors, but it seems to me that
>> you have actually admitted to copy your representation of the camel
>> directly from O'Reilly.
> And O'Reilly lose out in what way? Surely no-one could be confused
> that just because he has a picture of a camel on his perl page he must
> be associated with O'Reilly?
You're accusing the legal system of having common sense. Stop it. ;)
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: Thu, 06 May 1999 11:53:28 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: OReilly bullshit.... Camel logo trademark
Message-Id: <37338296.7760463@news.skynet.be>
I propose we stop calling Larry Wall's book "the camel".
Bart.
------------------------------
Date: 6 May 1999 10:07:05 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Pentium III Chips Released with IDs - Intel won't budge
Message-Id: <37315bb9@newsread3.dircon.co.uk>
In comp.lang.perl.misc Larry Rosler <lr@hpl.hp.com> wrote:
> In article <3764acce.5879494@news.earthlink.net> on Wed, 05 May 1999
> 21:07:19 GMT, Intel No Privacy <Intelz@nospam.net> says...
>
> <SPAM clipped>
>
> Spamming a dozen newsgroups -- two times, at that -- is irresponsible
> Usenet behavior, no matter how righteous your cause may be.
>
> And that's a hell of an email address for a spammer!
>
> I certainly won't take part in your activities, and I hope others agree.
>
I certainly do - and just for good measure have forwarded the offending
article to abuse@earthlink.net and abuse@home.com as it appears that it
was a dialup customer of the latter using a news server of the former.
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Thu, 06 May 1999 12:56:30 GMT
From: landen@frg.eur.nl (Peter van der Landen)
Subject: Re: Perl virus scanner?
Message-Id: <373490ac.2336041590@zeus.safenet.nl>
On Tue, 27 Apr 1999 01:24:44 GMT, runge@crl.com (Karl J. Runge) wrote:
>Hi, this is an odd request. Is there a perl script (or even sh/grep script)
>that utilizes some PC virus string database and checks MSDOS/Windows files
>for occurrences of those strings?
>
>Basically I want a perl script I could run from Unix/Linux and check a
>Windows partition (or even run inside Windows if need be). I've written a
>trivial one that checks for a handful of virus strings, but wondered if
>someone had written something to parse a virus string database. Today's
>CIH virus reminded me about wanting such a tool.
Writing a virus scanner is no trivial task. Simply looking for 'virus
strings' is not sufficient by a long shot.
Do yourself a favor, buy a professional Linux virus scanner (several
vendors have one, NAI is one of them). Surround it with Perl code as
much as you like but don't expect to write a virus scanner on a rainy
afternoon.
Regards,
Peter van der Landen
---------------------------------------------------------------------
Law Faculty, L5-47, Erasmus University, Rotterdam, Holland
------------------ E-mail Landen@frg.eur.nl -------------------------
------------------------------
Date: Thu, 06 May 1999 07:11:39 -0500
From: Todd Smith <tbsmith@viper.net>
Subject: processor time
Message-Id: <373186FB.1F04AF7@viper.net>
How can i make a program that does infinite loops not use 99% of the
processor?
--
--------------------------
Todd Smith
-Just Another Perl Hacker
ITC^DeltaCom
tbsmith@deltacom.net
------------------------------
Date: Thu, 06 May 1999 13:55:42 +0200
From: Sebastian Frankfurt <sf@tellux.de>
To: William Blasius #42722 <Wm.Blasius@ks.sel.alcatel.de>
Subject: Re: Q: checking defined/usable handles?
Message-Id: <3731833E.35B2A105@tellux.de>
William Blasius #42722 wrote:
>
>
> DESCRIPTION
> The IO::Select package implements an object approach to the
> system select function call. It allows the user to see what
> IO handles, see the IO::Handle manpage, are ready for
> reading, writing or have an error condition pending.
>
> So:
>
> $rin = "";
> vec($rin, fileno($p_out), 1) = 1 if defined fileno($p_out);
> if select( $rout=$rin, undef, $eout=$rin, 0) {
> $rout ? syswrite $p_out "some nice output\n" : die "some nasty
> error";
> };
>
Well, I've tested this twice and it does not work. Don't hurt me ;-)
but I don't know why...
I've used the code above and it does _not_ work... the select
returns '-1' if the handle exists and '-1' if not.
cu,
Sebastian Frankfurt
------------------------------
Date: 6 May 1999 09:55:28 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: regexp for matching IP address block
Message-Id: <37315900@newsread3.dircon.co.uk>
Gavin Cato <gavin@optus.net.au> wrote:
> Has anyone ever managed to create a regexp that matches if input is a valid IP
> address block?
>
> i.e.
> 202.33.77.0
<snip>
Actually as I understand it the only way to know that it is a valid
IP address *block* - as opposed to merely a valid IP address is to
do a whois lookup with the appropriate numbering authority:
inetnum: 202.33.77.0 - 202.33.77.255
netname: OHKURANET-JP
descr: OHKURA ELECTRIC Co., LTD.
descr: 2-9-20, Shirako, Wako-shi, Saitama351-01
country: JP
admin-c: TY091JP-JP
tech-c: TK190JP-JP
notify: ip-staff@nic.ad.jp
mnt-by: MAINT-JPNIC
changed: ip-staff@nic.ad.jp 19990105
source: JPNIC
You will probably want to start with whois.arin.net and then if it is
indicated go to the regional authority to whom it has been delegated -
in this case whois.apnic.net.
Now how you go about doing this I will leave as an exercise for the
reader as I dont have the time right now :-)
There is a Net::Whois module.
Or am I mssing something ?
/J\
--
Jonathan Stowe <jns@gellyfish.com>
------------------------------
Date: Thu, 06 May 1999 11:13:56 GMT
From: sstarre@my-dejanews.com
Subject: Re: syswrite() lies
Message-Id: <7grthj$jkn$1@nnrp1.deja.com>
I'm no fan of anything Microsoft, but this broken O/S argument seems hollow.
When someone had ported Perl for Windows and NT, you'd think that this
function would have been tested, demonstrated to not work, and corrected.
Maybe its true that the O/S is causing the difficulties, and that the code
works fine in other O/S's, but to just leave it broken is remiss. Otherwise,
one could just take Perl for unix, stick the source on NT, and say "OK, its
ported! Oh some stuff won't work...".
It reminds me of way back in the early 80's when DEC finally decided they
needed a c-compiler. I couldn't get my code to work correctly, and finally
after researching the offending function, DEC's docs reported that: "this
function is here only for compatibility with C-standards, and performs no
actual operation."
-S
In article <m3iua75w7i.fsf@joshua.panix.com>,
Jonathan Feinberg <jdf@pobox.com> wrote:
> elderr@us.ibm.com writes:
>
> > $srcfilesize=sysread(SRCFILE,$srcfiledata,10000000); # read at most 10MB
>
> That number is nowhere near 10MB.
>
> > #write 2KB of data
> > open(OUTFILE,">outfile.txt");
> > $byteswritten=syswrite(OUTFILE,$srcfiledata,2048); # write 2KB (hopefully)
>
> This is a broken OS problem, best attacked with the binmode() builtin.
>
> perldoc -f binmode
>
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 6 May 1999 11:33:24 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: syswrite() lies
Message-Id: <slrn7j2vg4.b8v.sholden@pgrad.cs.usyd.edu.au>
On Thu, 06 May 1999 11:13:56 GMT, sstarre@my-dejanews.com wrote:
>I'm no fan of anything Microsoft, but this broken O/S argument seems hollow.
>When someone had ported Perl for Windows and NT, you'd think that this
>function would have been tested, demonstrated to not work, and corrected.
>Maybe its true that the O/S is causing the difficulties, and that the code
>works fine in other O/S's, but to just leave it broken is remiss. Otherwise,
>one could just take Perl for unix, stick the source on NT, and say "OK, its
>ported! Oh some stuff won't work...".
It does work. It just does what is meant to happen on that platform which
is broken in almost everybodies opinion. Namely that text files and
binary files are different, and when you write a binary file as a text file
it gets broken due to some bytes being added.
This can't be fixed in perl. Since then syswrite would be broken for
those who want to use it to write a text file.
The function does work. It works as documented. binmore also works. It also
works as documented. The problem is that the platform that requires the
use of binmode, is the platform which has the highest proportion of
people who don't bother reading the documentation to find out.
I'll just say again. The brokeness is not perl's problem, and can not
be fixed by perl. It is a 'feature' of the platform.
--
Sam
There's no such thing as a simple cache bug.
--Rob Pike
------------------------------
Date: Thu, 06 May 1999 08:55:16 +0000
From: David Paenson <dave@fbp.fh-frankfurt.de>
Subject: Umlaute
Message-Id: <373158F3.4D890138@fbp.fh-frankfurt.de>
Hallooo!
Umlaute unter Linux sind OK, trotzdem kann Perl eine einfache Wortliste
mit Umlauten drin nicht korrekt bearbeiten. Was tun?
Schvne Gr|sse
dave
------------------------------
Date: Thu, 06 May 1999 10:41:25 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Umlaute
Message-Id: <37366ee1.2714997@news.skynet.be>
David Paenson wrote:
>Umlaute unter Linux sind OK, trotzdem kann Perl eine einfache Wortliste
>mit Umlauten drin nicht korrekt bearbeiten. Was tun?
use locale;
That should be a start...
Bart.
------------------------------
Date: Thu, 06 May 1999 10:41:29 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: using $, (was Re: having problems)
Message-Id: <373870b8.3185759@news.skynet.be>
Uri Guttman wrote:
>i imagine in some awkish -p or -n loop $, might be useful.
Huh?
>has anyone ever seen or used it in production code?
What do you mean? Do I use $, in production code? Yes, all the time. I
use it to create "tab delimited text files" in a simple, reliable
manner.
($\,$,) = ("\n","\t");
print qw(a b c);
print qw(d e f);
Try loading the result in Excel on a PC.
The disadvantage is that those special variables are global, and not
associated with a specific filehandle, e.g. the one currently
select()-ed.
Bart.
------------------------------
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 5579
**************************************