[19224] in Perl-Users-Digest
Perl-Users Digest, Issue: 1419 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 1 00:05:49 2001
Date: Tue, 31 Jul 2001 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)
Message-Id: <996638707-v10-i1419@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 31 Jul 2001 Volume: 10 Number: 1419
Today's topics:
Another perlpod question (Doug McGrath)
FAQ: What is the difference between $array[1] and @arra <faq@denver.pm.org>
Re: Finding "this" but not "this and that" with a regex <ren@tivoli.com>
Re: Finding "this" but not "this and that" with a regex (Jay McGavren)
Re: Finding a word in a sorted list. <mischief@velma.motion.net>
Re: Flock on DATA? (John Lin)
Re: getting users ip (Abigail)
Re: Having some trouble with map (Abigail)
Re: Help Please <mjcarman@home.com>
How do I launch a web page (Robert J. Kolker)
Re: How do I launch a web page <godzilla@stomp.stomp.tokyo>
Re: How do I launch a web page <flavell@mail.cern.ch>
Re: How do I launch a web page <bart.lateur@skynet.be>
join lines ? (Tim)
Re: join lines ? <godzilla@stomp.stomp.tokyo>
Re: join lines ? <krahnj@acm.org>
Re: newbe question splitting a string into two differen <ow22@nospam-cornell.edu>
Re: newnews using Net::NNTP (Charles DeRykus)
Re: OT: spelling (was Re: chess in perl) <SEE_MY_SIG@nospam.demon.co.uk>
Re: OT: spelling (was Re: chess in perl) <bowman@montana.com>
Re: perl and Informix <obnoxio@hotmail.com>
Re: perl and Informix <ahamm@sanderson.net.au>
Re: Purify-clean Perl for Solaris? (Abigail)
Re: Reporting Questionable Programming Activity <comdog@panix.com>
Re: Reporting Questionable Programming Activity <godzilla@stomp.stomp.tokyo>
Re: Reporting Questionable Programming Activity <newspost@coppit.org>
Re: THIS GUY NEEDS A BULLET <ahamm@sanderson.net.au>
Re: What's the regular expression to check emails and (Abigail)
Re: What's the regular expression to check emails and (Abigail)
Re: What's the regular expression to check emails and <ilya@martynov.org>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 31 Jul 2001 15:08:42 -0700
From: doug.mcgrath@us.telegyr.com (Doug McGrath)
Subject: Another perlpod question
Message-Id: <a4e10296.0107311408.1384f92d@posting.google.com>
I ran perlfunc.pod through pod2html; in the last paragraph of the
binmode description, the syswrite and tell functions are linked to
their respective definitions, but read, seek, and sysread are not.
In the .pod file, none of them are marked for linking with the
"L<...>" syntax, but two of them are linked. I can only assume that
there's some sort of automatic -- but apparently undocumented --
linkage mechanism that sometimes works and sometimes doesn't.
I'm hoping to avoid reading all of the pod conversion routines to
figure this out, so if someone knows what the intent is here and why
it works in two cases, but not in three other apparently identical
cases, I'd appreciate any pointers.
Thanks,
Doug McGrath
------------------------------
Date: Wed, 01 Aug 2001 00:19:45 GMT
From: PerlFAQ Server <faq@denver.pm.org>
Subject: FAQ: What is the difference between $array[1] and @array[1]?
Message-Id: <BWH97.22$l_m.170286080@news.frii.net>
This message is one of several periodic postings to comp.lang.perl.misc
intended to make it easier for perl programmers to find answers to
common questions. The core of this message represents an excerpt
from the documentation provided with every Standard Distribution of
Perl.
+
What is the difference between $array[1] and @array[1]?
The former is a scalar value; the latter an array slice, making it a
list with one (scalar) value. You should use $ when you want a scalar
value (most of the time) and @ when you want a list with one scalar
value in it (very, very rarely; nearly never, in fact).
Sometimes it doesn't make a difference, but sometimes it does. For
example, compare:
$good[0] = `some program that outputs several lines`;
with
@bad[0] = `same program that outputs several lines`;
The "use warnings" pragma and the -w flag will warn you about these
matters.
-
Documents such as this have been called "Answers to Frequently
Asked Questions" or FAQ for short. They represent an important
part of the Usenet tradition. They serve to reduce the volume of
redundant traffic on a news group by providing quality answers to
questions that keep coming up.
If you are some how irritated by seeing these postings you are free
to ignore them or add the sender to your killfile. If you find
errors or other problems with these postings please send corrections
or comments to the posting email address or to the maintainers as
directed in the perlfaq manual page.
Answers to questions about LOTS of stuff, mostly not related to
Perl, can be found by pointing your news client to
news:news.answers
or to the many thousands of other useful Usenet news groups.
Note that the FAQ text posted by this server may have been modified
from that distributed in the stable Perl release. It may have been
edited to reflect the additions, changes and corrections provided
by respondents, reviewers, and critics to previous postings of
these FAQ. Complete text of these FAQ are available on request.
The perlfaq manual page contains the following copyright notice.
AUTHOR AND COPYRIGHT
Copyright (c) 1997-1999 Tom Christiansen and Nathan
Torkington. All rights reserved.
This posting is provided in the hope that it will be useful but
does not represent a commitment or contract of any kind on the part
of the contributers, authors or their agents.
04.38
--
This space intentionally left blank
------------------------------
Date: 31 Jul 2001 16:58:07 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Finding "this" but not "this and that" with a regex?
Message-Id: <m3elqwep74.fsf@dhcp9-161.support.tivoli.com>
On 31 Jul 2001, sgarfunkle@hotmail.com wrote:
> Oops; I'm getting this backwards and possibly confusing the hell out
> of everyone. What I'm really looking for:
>
> if ($Record =~ /this/ && $Record =~ /that/)
Here is one way:
/(?=.*this)(?=.*that)/
You can, of course, leave off the look-ahead portion for the second
part (that is, /(?=.*this).*that/), but I prefer the symmetric
solution. You can automate it with something like:
my $pat = join "", map "(?=.*\Q$_\E)", @strings;
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 31 Jul 2001 20:25:23 -0700
From: sgarfunkle@hotmail.com (Jay McGavren)
Subject: Re: Finding "this" but not "this and that" with a regex?
Message-Id: <6bb557e1.0107311925.2ef77ee6@posting.google.com>
> Oops; I'm getting this backwards and possibly confusing the hell out
> of everyone. What I'm really looking for:
Never mind; I'm the only confused person here. :) if ($Record =~
/this/ && $Record !~ /that/) would indeed be what I need. Makes you
wonder if my original logic is as efficient as it could be...
Implemented Steffen and Ren's solution(s), and it seems to be working
nicely. Many thanks for the help!
------------------------------
Date: Tue, 31 Jul 2001 22:11:29 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Finding a word in a sorted list.
Message-Id: <tmeb8hb7tr958e@corp.supernews.com>
Bart Lateur <bart.lateur@skynet.be> wrote:
> Mario Rizzuti wrote:
>>I have a fixed-length-records file where:
>>
>>* each record is 18 bytes made by an username (12 bytes) and a number
>>(6 bytes).
>>* the records are sorted alphabetically.
>>
>>I am wondering what is the fastest possible way to find the associated
>>numbers of a given list of usernames?
> Theoretically: binary search. I would think.
Binary search on disk, of course, would require estimating the
distance to jump in the file based on overall file size and an
assumed distribution of the data. It's a very viable approach,
but it might be edged out for certain data sets. If, however,
you have a reliable heuristic for likely distribution of
letters in the primarily used language, then you could have
a binary search in which the best-case is far better than its
guaranteed worst case. Even its worst case, if implemented
in any reasonabe way, is excellent.
The bulk of the speed in a search on disk being lost to disk
reads, a binary search which uses seek() to only read the
parts of a file that are likley to need to be searched can speed
things up quite a bit over most methods. Perl should do as well
with this as any language.
Chris
--
Parking for people we like only. All other vehicles will be vandalized.
------------------------------
Date: 31 Jul 2001 19:50:16 -0700
From: johnlin@chttl.com.tw (John Lin)
Subject: Re: Flock on DATA?
Message-Id: <a73bcad1.0107311850.49dc7726@posting.google.com>
"Bart Lateur" wrote
> Benjamin Goldberg wrote:
>
> >I'm not sure how well this would work, but... if a particular file (say,
> >a DB file) is only being accessed from one module, could we simply lock
> >the DATA filehandle within that module, rather than creating something
> >*just* to be a lockfile?
>
> No. You need write access for an exclusive lock.
Ho, ho... but I think the OP's idea is interesting. It could be used in
main program to avoid multiple executing. I did an experiment:
use Fcntl ':flock';
$| = 1;
flock(DATA,LOCK_EX|LOCK_NB) or die "$0 is executing\n";
print sleep 1 for 1..10;
__DATA__
Great!!! When one program is running, the same program cannot be
evoked again. But no die messages are shown because perl is unable
to open the script at all.
Best regards.
John Lin
------------------------------
Date: 31 Jul 2001 23:05:05 GMT
From: abigail@foad.org (Abigail)
Subject: Re: getting users ip
Message-Id: <slrn9meee7.d4m.abigail@alexandra.xs4all.nl>
Chris Micallef (cmicallef@playground.net) wrote on MMDCCCLXXXIII
September MCMXCIII in <URL:news:3B5B98F6.21D02821@playground.net>:
:} I am using perl to write cgi scripts for a web page.
:}
:} Can some one explain to me how and why the following code successfully
:} obtains users ip.
:}
:} $RemoteHost = (gethostbyaddr(pack('C4',$1,$2,$3,$4),2))[0] ||
:} $ENV{'REMOTE_ADDR'};
Yellow magic.
Abigail
--
$_ = "\x3C\x3C\x45\x4F\x54"; s/<<EOT/<<EOT/e; print;
Just another Perl Hacker
EOT
------------------------------
Date: 1 Aug 2001 00:58:52 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Having some trouble with map
Message-Id: <slrn9mel3g.d4m.abigail@alexandra.xs4all.nl>
Uri Guttman (uri@sysarch.com) wrote on MMDCCCXCI September MCMXCIII in
<URL:news:x71ymw266i.fsf@home.sysarch.com>:
.. >>>>> "AM" == Andras Malatinszky <andras@mortgagestats.com> writes:
..
.. AM> John Joseph Trammell wrote:
..
.. >> using map() in void context is frowned upon.
..
.. AM> Why? What is wrong with using map() in void context?
..
..
.. two issues. first it is inefficient as currently implemented (abigail, i
.. know your thoughts here). this may be corrected in 5.X or 6.
..
.. secondly, i (and many others) think it is semantically msidirecting the
.. reader of this code. map's (primary) purpose was to generate a new list
.. from the incoming list. the fact that it can also do side effects is
.. nice but not critical as you can do that with for loops or for
.. modifiers. in fact the for modifier was created to fill in that semantic
.. gap and not for any critical coding reasons. so map's well known
.. semantic purpose is being ignored when it is used in a void
.. context. yes, it works and it is not newbie level bad perl, but many
.. experienced dislike map in a void context.
Actually, the for modifier was created because there were while, until,
if and unless modifiers, and for was missing.
It wasn't created to replace map in void context.
I'm sorry, but the reasoning that "side effects are ok, but only if
the keyword is between the expression and the list - it's evil when
the keyword preceeds the expression" sound like a pile of utter crap.
Could be please leave silly nitpicking like this to fragmented groups
of certain churches?
I could understand someone arguing side effects should be avoided.
But ok-ing if the keyword is in the right place...? Come on.
Abigail
--
perl -e '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %;
BEGIN {% % = ($ _ = " " => print "Just Another Perl Hacker\n")}'
------------------------------
Date: Tue, 31 Jul 2001 16:38:45 -0500
From: Michael Carman <mjcarman@home.com>
Subject: Re: Help Please
Message-Id: <3B672565.13B65F83@home.com>
"John W. Krahn" wrote:
>
> Michael Carman wrote:
>>
>> News Only wrote:
>>>
>>> 4. Change the modify date back to the original one.
>>
>> Perl doesn't have a builtin to do this,
>
> perldoc -f utime
> utime LIST
> Changes the access and modification times on each
> file of a list of files. ...
Thank you for making a liar out of me. :) I *thought* that there should
be a builtin, but I couldn't remember what it was. All I could think of
was 'touch'.
perlport has this to add:
utime LIST
Only the modification time is updated. (Mac OS, VMS, RISC OS)
May not behave as expected. Behavior depends on the C runtime
library's implementation of utime(), and the filesystem being
used. The FAT filesystem typically does not support an "access
time" field, and it may limit timestamps to a granularity of
two seconds. (Win32)
-mjc
------------------------------
Date: 31 Jul 2001 16:37:12 -0700
From: bobkolker@mediaone.net (Robert J. Kolker)
Subject: How do I launch a web page
Message-Id: <1ac7da4c.0107311537.770a8b76@posting.google.com>
How do I launch a web page, given its URL
from inside a PERL progragm.
Thank you in advance,
Bob Kolker
Please also reply by e-mail to bobkolker@mediaone.net
------------------------------
Date: Tue, 31 Jul 2001 17:02:17 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: How do I launch a web page
Message-Id: <3B674709.28086A37@stomp.stomp.tokyo>
Robert J. Kolker wrote:
> How do I launch a web page, given its URL
> from inside a PERL progragm.
Have you tried a surplus Titan II booster rocket?
This will launch a web page nude picture of me:
#!perl
print "Location: http://la.znet.com/~callgirl/webchat/dinosaur/dinol5.jpg";
exit;
Godzilla!
------------------------------
Date: Wed, 1 Aug 2001 02:13:31 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: How do I launch a web page
Message-Id: <Pine.LNX.4.30.0108010210450.25491-100000@lxplus023.cern.ch>
On Jul 31, Robert J. Kolker pijnigte haar/zijn toetsenbord:
> How do I launch a web page,
with a steep ramp and a bottle of champagne?
> given its URL
> from inside a PERL progragm.
You might be looking for the LWP bundle, but your question is too
vague. Which is the server, which is the client, where are you in
relation to them, where is the script running?
------------------------------
Date: Wed, 01 Aug 2001 01:05:43 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: How do I launch a web page
Message-Id: <ahlemtspbrt3eap3polvt1og3s4g58s5bj@4ax.com>
Robert J. Kolker wrote:
>How do I launch a web page, given its URL
>from inside a PERL progragm.
On Win95 and related:
system "start", "http://search.cpan.org";
--
Bart.
------------------------------
Date: 31 Jul 2001 18:04:53 -0700
From: tvn007@hotmail.com (Tim)
Subject: join lines ?
Message-Id: <21724be2.0107311704.7263ba94@posting.google.com>
Hi ,
Could someone help me on this ?
I am reading lines from input file.
The lines has the following format:
line "line1" = "001\
010\
11";
line "line2" = "111\
011\
1";
I would like to have the output as follow:
line "line1" = "0,0,1,0,1,0,1,1";
line "line2" = "1,1,1,0,1,1,1";
I did try join and $/= ""\;" and it did not work out for me.
Thanks for any help.
Tim
------------------------------
Date: Tue, 31 Jul 2001 19:07:02 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: join lines ?
Message-Id: <3B676446.4AA26BD6@stomp.stomp.tokyo>
Tim wrote:
(snipped)
> Could someone help me on this ?
> I am reading lines from input file.
> I would like to have the output as follow:
> I did try join and $/= ""\;" and it did not work out for me.
Post your code you have developed so far,
working or not, to show sincere effort on
your part. My preference is to help those
who help themselves.
Godzilla!
------------------------------
Date: Wed, 01 Aug 2001 03:26:26 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: join lines ?
Message-Id: <3B677779.9F11B32A@acm.org>
Tim wrote:
>
> Hi ,
>
> Could someone help me on this ?
>
> I am reading lines from input file.
>
> The lines has the following format:
>
> line "line1" = "001\
> 010\
> 11";
> line "line2" = "111\
> 011\
> 1";
>
> I would like to have the output as follow:
>
> line "line1" = "0,0,1,0,1,0,1,1";
> line "line2" = "1,1,1,0,1,1,1";
Here is one way to do it:
#!/usr/bin/perl -w
use strict;
my $line;
my @numbers;
while ( <DATA> ) {
if ( /^(line.*")(.*)$/ ) {
$line = $1;
@numbers = $2 =~ /(\d)/g;
}
elsif ( /;$/ ) {
push @numbers, /(\d)/g;
local $" = ',';
print qq{$line@numbers";\n};
}
else {
push @numbers, /(\d)/g;
}
}
__DATA__
line "line1" = "001\
010\
11";
line "line2" = "111\
011\
1";
John
--
use Perl;
program
fulfillment
------------------------------
Date: Tue, 31 Jul 2001 19:36:49 -0700
From: "Oliver" <ow22@nospam-cornell.edu>
Subject: Re: newbe question splitting a string into two different variables
Message-Id: <9k7q0j$g3h$1@news01.cit.cornell.edu>
believe it or not, its always the minor variations that trip me up. heh
oliver
"Helgi Briem" <helgi@NOSPAMdecode.is> wrote in message
news:3b6678a7.694281123@news.isholf.is...
> On Mon, 30 Jul 2001 10:45:30 -0700, "Oliver"
> <ow22@nospam-cornell.edu> wrote:
>
> >i have a slightly harder question, how could i split a string like
> >
> > hello good bye 1 444
> >
> >into an array of strings (hello,good,bye,1,444). basically i have these
> >strings that are seperated by an arbitary number of spaces, and i need to
> >get them into an array. okay thanks in advance
> >
> >oliver
> >
> >
> >"fred58" <none@nowere.com> wrote in message
> >news:3roamt4jqf75g3ierd9qic6d8m8ar42dvj@4ax.com...
> >> Right here is my problem i would like to split this string at the |
> >> "hello | good buy" into two different variables but im unsure of the
> >> best way to do this any help would be gratefully received
> >>
> You are posting the same question with minor
> variations over and over again. Why don't you
> think just a little bit before reposting?
>
> Regards,
> Helgi Briem
------------------------------
Date: Wed, 1 Aug 2001 01:08:21 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: newnews using Net::NNTP
Message-Id: <GHD75x.K7w@news.boeing.com>
In article <9k77l9$lc0$1@ausnews.austin.ibm.com>,
KEN <kencox@us.ibm.com> wrote:
>Hola,
>
>I am trying to use the newnews method of Net::NNTP. I can get and read the
>news from my news server, but I cannot understand the instructions for the
>newnews method.
>
>newnews ( SINCE [, GROUPS [, DISTRIBUTIONS ]])
>
>SINCE is a time value. GROUPS is either a group pattern or a reference to a
>list of group patterns. DISTRIBUTIONS is either a distribution pattern or a
>reference to a list of distribution patterns.
>Returns a reference to a list which contains the message-ids of all news
>posted after SINCE, that are in a groups which matched GROUPS and a
>distribution which matches DISTRIBUTIONS.
>
>1. Specifically, what is a group pattern or a distribution in this case.
>Also, what is the time value format?
>
>could someone please give me an example of a line using this method?
>
Look closely at the newnews section in the News::NNTPClient docs
(perldoc News::NNTPClient). Both patterns and distributions are
discussed I believe.
Here's an example that'll pull new clpm articles that've posted in
the last hour:
foreach ($c->newnews("comp.lang.perl.misc", time() - 3600)) {
print $c->body($_);
}
HTH,
--
Charles DeRykus
------------------------------
Date: Wed, 1 Aug 2001 00:39:22 +0100
From: James Taylor <SEE_MY_SIG@nospam.demon.co.uk>
Subject: Re: OT: spelling (was Re: chess in perl)
Message-Id: <ant312322064fNdQ@oakseed.demon.co.uk>
In article <MPG.15d1113993180cb7989692@news.yhteys.mtv3.fi>,
Sami Jarvinen <if.xoboi@jks.invalid> wrote:
>
> Speaking of spelling, why do some people sometimes say 'optomize'
> instead of 'optimize'?
Oh please! It's optimise not optimize. ;-)
--
James Taylor <james (at) oakseed demon co uk>
Based in Southam, Cheltenham, UK.
PGP key available ID: 3FBE1BF9
Fingerprint: F19D803624ED6FE8 370045159F66FD02
------------------------------
Date: Tue, 31 Jul 2001 20:48:44 -0600
From: "bowman" <bowman@montana.com>
Subject: Re: OT: spelling (was Re: chess in perl)
Message-Id: <v7K97.25$Ve4.1103@newsfeed.slurp.net>
"James Taylor" <SEE_MY_SIG@nospam.demon.co.uk> wrote in message
news:ant312322064fNdQ@oakseed.demon.co.uk...
>
> Oh please! It's optimise not optimize. ;-)
after sitting through _Sexy Beast_ this weekend, I've become convinced that
Brits can't speak English, let alone spell common words in the language :)
------------------------------
Date: Wed, 1 Aug 2001 01:10:52 +0100
From: Obnoxio The Clown <obnoxio@hotmail.com>
Subject: Re: perl and Informix
Message-Id: <996624671.219478800@news.cis.dfn.de>
On Tue, 31 Jul 2001, Abigail wrote:
>miss (north@nmpm.com.my) wrote on MMDCCCLXXXI September MCMXCIII in
><URL:news:3B16152B.ED538A@nmpm.com.my>:
>%% Hai all;
>%%
>%% If I want to using Perl and Informix as my database.What I should
>%% install???
>
>Python and DB2.
>
>HTH. HAND.
You forgot to mention a JDBC driver.
------------------------------
Date: Wed, 1 Aug 2001 10:26:00 +1000
From: "Andrew Hamm" <ahamm@sanderson.net.au>
Subject: Re: perl and Informix
Message-Id: <9k7ich$32pn5$1@ID-79573.news.dfncis.de>
Abigail wrote in message ...
>miss (north@nmpm.com.my) wrote on MMDCCCLXXXI September MCMXCIII in
><URL:news:3B16152B.ED538A@nmpm.com.my>:
>%% Hai all;
>%%
>%% If I want to using Perl and Informix as my database.What I should
>%% install???
>
>Python and DB2.
>
>HTH. HAND.
>
Nice to see such a timely response to the original posting dated from 31st
May.
--
Lamarr: My mind is a raging torrent, flooded with rivulets of thought
cascading into a waterfall of creative alternatives.
Taggart: Gol-darn it, Mr. Lamarr, you use your tongue purdier than a
twenty dollar who.re.
Lamarr: Sh!t - kicker...
-- Blazing Saddles
------------------------------
Date: 31 Jul 2001 22:54:34 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Purify-clean Perl for Solaris?
Message-Id: <slrn9medqg.d4m.abigail@alexandra.xs4all.nl>
Jonathan Epstein (jepstein@helix.nih.gov) wrote on MMDCCCLXXXII September
MCMXCIII in <URL:news:hbB67.104$Uf1.296899@mencken.net.nih.gov>:
{}
{} I am working on a SWIG extension, and won't be really satisfied with it
{} until I try it with Purify. I would like to use both (a) the best
{} platform and (b) the Perl release or pre-release, which will provide the
{} most Purify-clean starting point.
Alan Burlison did some time ago quite a lot of work in making Perl Purify
clean. His results are in perl-5.7.2, which is a development version. He
did his work of course on a Sun, with the SunPro compiler.
The p5p archives should have articles with his results.
Abigail
--
perl -wlpe '}{$_=$.' file # Count the number of lines.
# A pair of butterflies
# in a willow. Two flying
# songbirds. A trout.
------------------------------
Date: Tue, 31 Jul 2001 18:07:09 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: Reporting Questionable Programming Activity
Message-Id: <comdog-5F5F1F.18070931072001@news.panix.com>
In article <3b672381.218715906@news1.on.sympatico.ca>,
gurm@intrasof.com (Smiley) wrote:
> The company I'm working for purchased a Perl CGI Script that turns out
> to be seriously faulty - so much so that my boss asked me to
> investigate whether there's any international agency or organization
> set up that we can report this kind of thing to.
well, there is BUGTRAQ, but make sure you check their
archives to see if it has already been reported.
http://www.securityfocus.com/
if you are talking about some sort of tort, well, you'd
have to ask a lawyer. :)
--
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html
------------------------------
Date: Tue, 31 Jul 2001 16:12:33 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Reporting Questionable Programming Activity
Message-Id: <3B673B61.7DC703BF@stomp.stomp.tokyo>
Smiley wrote:
> The company I'm working for purchased a Perl CGI Script that turns out
> to be seriously faulty - so much so that my boss asked me to
> investigate whether there's any international agency or organization
> set up that we can report this kind of thing to.
> Does anybody know? Thanks :)
Have you contacted INTERPOL?
Idiots Not Talented Efficient Real Programmers On Line.
Ironically, you have posted to one of their branch offices.
Could be, the Code Cops will be crawling out of the woodwork
any moment now.
Godzilla! Queen Of RedWorm.
------------------------------
Date: Tue, 31 Jul 2001 19:18:04 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: Reporting Questionable Programming Activity
Message-Id: <3B673CAC.1050403@coppit.org>
Godzilla! wrote:
> Smiley wrote:
>
>
>>The company I'm working for purchased a Perl CGI Script that turns out
>>to be seriously faulty - so much so that my boss asked me to
>>investigate whether there's any international agency or organization
>>set up that we can report this kind of thing to.
>>
>>Does anybody know? Thanks :)
>
> Have you contacted INTERPOL?
>
> Idiots Not Talented Efficient Real Programmers On Line.
>
> Ironically, you have posted to one of their branch offices.
> Could be, the Code Cops will be crawling out of the woodwork
> any moment now.
Yeah, but he won't actually get a response unless he posts the code with
a subject line which says "HELP!! Mine CGI scrpit does not work!!!!1!!"
David ;)
------------------------------
Date: Wed, 1 Aug 2001 11:42:17 +1000
From: "Andrew Hamm" <ahamm@sanderson.net.au>
Subject: Re: THIS GUY NEEDS A BULLET
Message-Id: <3b675f0a$1@news.iprimus.com.au>
Bart Lateur wrote in message <5hq2mtgnbam8706lrvpt0dmv1qemn9hc3c@4ax.com>...
>
>>BEWARE, Brad! You have just fallen into a troll trap. This message comes
>>around every few months and it is designed to trigger enormous arguments
on
>>the newsgroups.
>
>I think not. IMO it's spam, posted in order to draw people TO that
>website, instead of away from it.
>
Probably that too, but every time this spam is posted, one of the most
noticable effects is flame wars between people who either want to defend
free speech (even though they don't like the site etc etc etc) or people who
just don't like the site. Coupled with the odd loony who agrees with the
site ;-)
--
Lamarr: My mind is a raging torrent, flooded with rivulets of thought
cascading into a waterfall of creative alternatives.
Taggart: Gol-darn it, Mr. Lamarr, you use your tongue purdier than a
twenty dollar who.re.
Lamarr: Sh!t - kicker...
-- Blazing Saddles
------------------------------
Date: 31 Jul 2001 22:58:19 GMT
From: abigail@foad.org (Abigail)
Subject: Re: What's the regular expression to check emails and to remove html
Message-Id: <slrn9mee1h.d4m.abigail@alexandra.xs4all.nl>
Miriam Raphael-Roberts (miriamraphael@yahoo.com) wrote on MMDCCCLXXXII
September MCMXCIII in <URL:news:748729f5.0107220938.385b2e0f@posting.google.com>:
%% Hi,
%% I know that you can remove HTML from text by using one regular expression.
Really? I'd like to see it. Most attempts don't even get close.
%% I saw it once in a book amd I tried to find it today unsuccessfully.
%% Also, does anyone have a good regular expression that can check whether or not
%% an email address is in the correct format ?(and not a bogus email).
No, there isn't one. There are a few modules that check for them,
for instance RFC::RFC822::Address, but no singular regular expression.
Because any such beast would need heavy use of (?{ }) to be able to do so.
%% Can anyone help me with these two items? My email is miriamraphael@yahoo.com
There are modules that achieve your goals, but you are requesting a
curious, inefficient and hard to reach them. Why?
Abigail
--
use lib sub {($\) = split /\./ => pop; print $"};
eval "use Just" || eval "use another" || eval "use Perl" || eval "use Hacker";
------------------------------
Date: 31 Jul 2001 22:59:09 GMT
From: abigail@foad.org (Abigail)
Subject: Re: What's the regular expression to check emails and to remove html
Message-Id: <slrn9mee33.d4m.abigail@alexandra.xs4all.nl>
Ilya Martynov (ilya@martynov.org) wrote on MMDCCCLXXXII September
MCMXCIII in <URL:news:874rs42757.fsf@abra.ru>:
@@
@@ MR> Hi,
@@ MR> I know that you can remove HTML from text by using one regular expression.
@@ MR> I saw it once in a book amd I tried to find it today
@@ MR> unsuccessfully.
@@
@@ I'm not sure what do you really want. If you need to remove all tags
@@ try this:
@@
@@ $html =~ s/<[^>]*>//g;
Oh, please. That's so horribly wrong, that even the FAQ mentions it
as wrong.
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
# A pair of songbirds
# flying away. Ryonen.
# A singing songbird.
------------------------------
Date: 01 Aug 2001 03:09:03 +0400
From: Ilya Martynov <ilya@martynov.org>
Subject: Re: What's the regular expression to check emails and to remove html
Message-Id: <873d7cpugg.fsf@abra.ru>
A> @@ I'm not sure what do you really want. If you need to remove all tags
A> @@ try this:
A> @@
A> @@ $html =~ s/<[^>]*>//g;
A> Oh, please. That's so horribly wrong, that even the FAQ mentions it
A> as wrong.
I know but it works for simple cases. Correct way is parse HTML of
course.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80 E4AE BE1A 53EB 323B DEE6 |
| AGAVA Software Company (http://www.agava.com/) |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
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 1419
***************************************