[23271] in Perl-Users-Digest
Perl-Users Digest, Issue: 5491 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 12 00:05:56 2003
Date: Thu, 11 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 Thu, 11 Sep 2003 Volume: 10 Number: 5491
Today's topics:
Re: "between" function equivalent in Perl? <sagittaur@ftml.net>
Re: "between" function equivalent in Perl? <sagittaur@ftml.net>
Re: Building perl on mandrake linux <kalinabears@iinet.net.au>
Re: Building perl on mandrake linux <kalinabears@iinet.net.au>
Re: Direct experience of text manipulation in Perl/TCL? (MegaZone)
Re: error in win32, not in linux? (Jay Tilton)
Re: error in win32, not in linux? <bart-news@NOSPAMtvreclames.nl>
Re: How to replace a variable string within /* variable <abigail@abigail.nl>
Re: Installing from CPAN on Win32 (James Willmore)
Re: Making a script write to a file (take 2) (Dave)
Re: Making a script write to a file (take 2) <tony_curtis32@yahoo.com>
Re: not able to access a URL with LWP::UserAgent. (ko)
Re: Posting with Net::NNTP (Mike)
Re: Printing a hash of hashes using an array for the he <usenet@dwall.fastmail.fm>
Re: Redemption, SafeMailItem and ActivePerl (Jay Tilton)
Re: seeking Win32::OLE example (Jay Tilton)
Re: Speeding up LWP::Simple <tcurrey@no.no.no.i.said.no>
Re: Speeding up LWP::Simple <gregs@trawna.com>
Re: split() matching regular expression question - open <abigail@abigail.nl>
Re: Wierd result from hash array <jkeen@concentric.net>
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 11 Sep 2003 16:21:10 -0700
From: "Alexandra" <sagittaur@ftml.net>
Subject: Re: "between" function equivalent in Perl?
Message-Id: <bjr019$hrl$1@lumberjack.rand.org>
"Tad McClellan" wrote:
> Alexandra wrote:
>
> > $mystring = ('xxx blah=bleh @', 'yyy bloh=bluh @', 'zzz blea=blech @');
>
>
> You should always enable warnings when developing Perl code!
Whoops, I didn't see warnings in my inherited code (obviously). The
explanations in Learning Perl and Programming Perl were minimal but I found
the pod doc on warnings to read.
> Did you print out $mystring to see what it contains at this point?
Yes, $mystring came out similary to the dummied text string as follows:
$mystring = 'aaa @ bbbb @ c @ dd @ eeeeee @ FFFFF=xxxx @ ggg @ h'
My apologies for using dummied code. The real result string contained
sensitive data so I had to mask it. In the future I'll make an effort to
post more accurate coding examples in these cases.
> That code has the same effect as:
>
> $mystring = 'zzz blea=blech @';
>
> (only it doesn't do "busy work" and then discard the results)
>
>
> > $mymatch = $mystring =~ /=(.*?)\s/; #for example (one of the
> > correct solutions previously provided) returns 1
>
>
> That is m// in a scalar context, it returns "true" or "false".
>
> (which might be 1 or 0, but could be something else.)
>
> > ($mymatch) = $mystring =~ /=(.*?)\s/; #returns 'blech', the
last
> > value to match in the string
>
>
> That is m// in a list context, it returns all of the "memories"
> if the match succeeds.
With these explanations, rereading the Camel books, *are* more clear.
> > Would you know how to get it to return 3 instead of 1?
>
>
> if $mystring contains the "3" character, then:
>
>
> ($mymatch) = $mystring =~ /(3)/;
I didn't phrase my question very well and the masked code was a bit
misleading (still masked below, but less so). I was looking to find a return
value of the count of the 3 list values. I've since discovered the count
function. What I also read is that scalar values (in some cases) can be
thought of list values which return the last list item, which is why I was
receiving the 3rd value in my list of 3 values:
$mystring = ('namea server1=login_a @', ' nameb server1=login_b @', 'namec
server2=login_c @');
> > (I know, I've got to read and keep at this to understand lists and
contexts.
> > The advanced and even not-advanced programmers reading this must be
laughing
> > at me but if I can learn it then its worth it.)
>
>
> Please see the Posting Guidelines that are posted here frequently.
(found it in Google Groups, and also the pointer to the Perl FAQ, thanks)
> It suggests you use warnings.
>
> It suggests you post real code.
>
> We could save a lot of round-and-round if you had just
> done it right the first time...
Very true. I see this now.
Unfortunately I did understand how to specifically address (or post enough
code with out posting "too much code" to address) related issues in the
code that I wasn't aware of in the first place nor did I anticipate how many
more questions my initial post would raise. Sometimes textbooks are just not
enough. So again, thank you for taking the time to help this newbie.
> If you don't understand something in the "Context" section
> of perldata.pod, then post that part here, and we'll try
> helping you to understand it.
>
> It is unclear what you've already seen, and it would be a waste
> of time doing all here if what is in the std docs is enough for you.
Alexandra
------------------------------
Date: Thu, 11 Sep 2003 16:24:24 -0700
From: "Alexandra" <sagittaur@ftml.net>
Subject: Re: "between" function equivalent in Perl?
Message-Id: <bjr07a$hrq$1@lumberjack.rand.org>
"Tad McClellan" wrote:
> Eric Bohlman wrote:
> > "Alexandra" wrote:
> >
> >> Okay, I read up a bit more (and re-read), and I still do not fully
> >> understand the implications of scalar v. list context.
(still reading Camel 3 and pod docs, it's slowly sinking in... thanks to all
for the references)
> > Probably the most important thing to remember about context is this:
>
> The most important thing to remember about context is this:
>
> It is the operator or function being used that imposes
> context its operands/arguments.
Thanks Eric and Tad, for taking the time to explain. Would it be accurate to
assume that most Perl expressions/functions will evaluate "at large" and
then look to "format" (for lack of a better term) the return value depending
on the context of the assignment variable or operand?
I read somewhere that you do not have to declare variables in Perl, you just
use them. Getting a grasp on contexts, even a tiny one, explains now how
that can work.
Alexandra
------------------------------
Date: Fri, 12 Sep 2003 11:16:10 +1000
From: Sisyphus <kalinabears@iinet.net.au>
Subject: Re: Building perl on mandrake linux
Message-Id: <3f611f09$0$23599$5a62ac22@freenews.iinet.net.au>
Abigail wrote:
> Sisyphus (kalinabears@iinet.net.au) wrote on MMMDCLXIII September
> MCMXCIII in <URL:news:3f608533$0$23594$5a62ac22@freenews.iinet.net.au>:
> `'
> `' Anyway .... advice, any pointers to relevant documentation, etc,
> `' gratefully accepted.
>
> Instead of answering your question, I'll point you to the documentation.
> With the source comes a file INSTALL, a file README, and a whole bunch of
> README.xxx files, where xxx is one of many platforms; the latter files
> contain platform specific information.
>
I read 'INSTALL' and 'README', and even had a look in the 'hints'
folder, but I can't find any Readme.xxx for linux. I'll start opening
them one by one until I find the appropriate one. (I was expecting it to
be named 'Readme.linux', but I have no such file.)
Cheers,
Rob
------------------------------
Date: Fri, 12 Sep 2003 11:28:36 +1000
From: Sisyphus <kalinabears@iinet.net.au>
Subject: Re: Building perl on mandrake linux
Message-Id: <3f6121f2$0$23584$5a62ac22@freenews.iinet.net.au>
Sisyphus wrote:
>
> I read 'INSTALL' and 'README', and even had a look in the 'hints'
> folder, but I can't find any Readme.xxx for linux.
It's ok - I've just found the answer to one of my questions in
'INSTALL'. I suspect all questions will be answered there. Should have
read it properly .... apologies for not having done that prior to posting.
Cheers,
Rob
------------------------------
Date: 12 Sep 2003 02:27:19 GMT
From: usenet@megazone.org (MegaZone)
Subject: Re: Direct experience of text manipulation in Perl/TCL?
Message-Id: <megazone.1063333638@sidehack.sat.gweep.net>
selwyn.leeke@camcon.co.uk (Selwyn Leeke) shaped the electrons to say:
>As a little project, I'm trying to investigate the differences between
>TCL and Perl(something never before attempted), especially in terms of
>their text manipulation capabilities.
OK, did someone issue a homework assignment that requires comparing
TCL and Perl?
-MZ, RHCE #806199299900541, ex-CISSP #3762
--
<URL:mailto:megazone@megazone.org> Gweep, Discordian, Author, Engineer, me..
"A little nonsense now and then, is relished by the wisest men" 508-755-4098
<URL:http://www.megazone.org/> <URL:http://www.eyrie-productions.com/> Eris
------------------------------
Date: Thu, 11 Sep 2003 22:06:11 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: error in win32, not in linux?
Message-Id: <3f60f10e.774757616@news.erols.com>
"Bart van den Burg" <bart-news@NOSPAMtvreclames.nl> wrote:
: can someone take a look at:
:
: http://bart.tvreclames.nl:8080/showfile.pl, files index.pl, functions.pm and
: config.pm?
:
: for some reason, this script works fine in linux, but not in win32 :/
:
: the error i'm getting:
:
: [Thu Sep 11 22:10:51 2003] [error] [client 80.60.202.155] Undefined
: subroutine &main::config called at functions.pm line 6.
:
: I really don't understand why this happens in win32...
Because the Win32 filesystem is case-insensitive.
"use config;" is finding "Config.pm" in another @INC path before it
finds "config.pm" in the current directory.
------------------------------
Date: Fri, 12 Sep 2003 01:40:16 +0200
From: "Bart van den Burg" <bart-news@NOSPAMtvreclames.nl>
Subject: Re: error in win32, not in linux?
Message-Id: <bjr18e$e4h$1@reader11.wxs.nl>
----- Original Message -----
From: "Jay Tilton" <tiltonj@erols.com>
Newsgroups: comp.lang.perl.misc
Sent: Friday, September 12, 2003 12:06 AM
Subject: Re: error in win32, not in linux?
> "Bart van den Burg" <bart-news@NOSPAMtvreclames.nl> wrote:
>
> : can someone take a look at:
> :
> : http://bart.tvreclames.nl:8080/showfile.pl, files index.pl, functions.pm
and
> : config.pm?
> :
> : for some reason, this script works fine in linux, but not in win32 :/
> :
> : the error i'm getting:
> :
> : [Thu Sep 11 22:10:51 2003] [error] [client 80.60.202.155] Undefined
> : subroutine &main::config called at functions.pm line 6.
> :
> : I really don't understand why this happens in win32...
>
> Because the Win32 filesystem is case-insensitive.
> "use config;" is finding "Config.pm" in another @INC path before it
> finds "config.pm" in the current directory.
ahhh thanks for pointing that out :D
I guess I'll just have to put the backup on my (slower and more instable)
linux comp :/
probably better anyway, since i wont have to change all the first lines :)
thanks
Bart
------------------------------
Date: 11 Sep 2003 22:32:56 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: How to replace a variable string within /* variable_string */ with x for each character in string?
Message-Id: <slrnbm1u0o.6v3.abigail@alexandra.abigail.nl>
Victor (gvictor97@yahoo.com) wrote on MMMDCLXIII September MCMXCIII in
<URL:news:ab759f.0309111049.48aafe05@posting.google.com>:
^^ How to replace a variable string within /* variable_string */ with x
^^ for each character in string?
^^
^^ The string may span on multiple lines.
^^
^^ for eaxmple:
^^
^^ /* string */ ->
^^ /* xxxxxx */
^^
^^ /* stringstring */ ->
^^ /* xxxxxxxxxxxx */
^^
^^ /* string1
^^ string2
^^ */ ->
^^
^^ /* xxxxxxx
^^ xxxxxxx
^^ */
use Regexp::Common;
$str =~ s{$RE{comment}{C}{-keep}}{my $x = $3; $x =~ s!\S!x!g; "/*$x*/"}ge;
Abigail
--
sub _ {$_ = shift and y/b-yB-Y/a-yB-Y/ xor !@ _?
exit print :
print and push @_ => shift and goto &{(caller (0)) [3]}}
split // => "KsvQtbuf fbsodpmu\ni flsI " xor & _
------------------------------
Date: 11 Sep 2003 18:32:21 -0700
From: jwillmore@cyberia.com (James Willmore)
Subject: Re: Installing from CPAN on Win32
Message-Id: <e0160815.0309111732.6396614e@posting.google.com>
"Michael P. Broida" <michael.p.broida@boeing.com> wrote in message news:<3F60C5B5.2CA81791@boeing.com>...
> Sisyphus wrote:
> >
> > Michael P. Broida wrote:
<snip>
>
> I looked there yesterday; LOTS and LOTS of confusing info. :)
>
> Just now tried using "LIB=" as you suggest, pointing to a new
> subdirectory on C:, but I get the same error: it wants to find
> the Perl installation on the S: drive, but ours is on T: instead.
>
> Any ideas how to make it see the Perl installation on T:??
> Or why MakeMaker wants to see it on S:??
Just some suggestions/questions ...
Are you _sure_ the drive mappings are correct? Something isn't fouled
in whatever login script may be launched? Re-map the drive just to be
sure?
And how about your PATH? Is it set properly? Have you tried to
change it so that the only directories in there are for what you're
trying to do?
What do you get when you type 'perl -V'? Is the result from this
command expected? @INC is what you expect it to be?
Again, just some suggestions/questions to be answered.
Jim
------------------------------
Date: 11 Sep 2003 18:22:52 -0700
From: prometheus_au@excite.com.au (Dave)
Subject: Re: Making a script write to a file (take 2)
Message-Id: <526e114e.0309111722.5f17f82c@posting.google.com>
drew@perlmad.com (Philip) wrote in message news:<9826ff94.0309092008.35913517@posting.google.com>...
> > $orders_dat = "http//....path to file"
>
> that's your problem. you need to use the real system path to the
> file, not it's HTTP URL.
so if I change it to....
$orders_dat = "/home/user/public_html/web/orders.dat"
open(ORDERS,">>$orders_dat");
print ORDERS
"$invoice$delimiter$date$delimiter$processing_msg\n"; close(ORDERS);
It should work! I'll give it a whirl.
Thanks for the constructive criticism!
Dave.
------------------------------
Date: Thu, 11 Sep 2003 20:27:32 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Making a script write to a file (take 2)
Message-Id: <87isny4wzf.fsf@limey.hpcc.uh.edu>
>> On 11 Sep 2003 18:22:52 -0700,
>> prometheus_au@excite.com.au (Dave) said:
> drew@perlmad.com (Philip) wrote in message
> news:<9826ff94.0309092008.35913517@posting.google.com>...
>> > $orders_dat = "http//....path to file"
>>
>> that's your problem. you need to use the real system
>> path to the file, not it's HTTP URL.
(An http URL does not refer to a file.)
> so if I change it to....
> $orders_dat = "/home/user/public_html/web/orders.dat"
> open(ORDERS,">>$orders_dat"); print ORDERS
> "$invoice$delimiter$date$delimiter$processing_msg\n";
> close(ORDERS);
> It should work! I'll give it a whirl. Thanks for the
> constructive criticism!
Don't forget you have to deal with locking.
perldoc -q lock
hth
t
------------------------------
Date: 11 Sep 2003 18:16:58 -0700
From: kuujinbo@hotmail.com (ko)
Subject: Re: not able to access a URL with LWP::UserAgent.
Message-Id: <92d64088.0309111716.6d99bf99@posting.google.com>
danglesocket <danglesocket@no_spam> wrote in message news:<3f60cda7@shknews01>...
> Rather than responding with a half assed answer that proves that you didn't
> read the question and
> tries to make me look like an idiot, either don't respond or offer somthing
> more 'insightful'.
Whoa, don't take things so personally...that's harsh, considering two
things:
1. You're asking for free advice.
2. Really don't see where he was trying to make you look like an idiot
or that a 'half assed answer' was offered. Speaking from *personal*
experience (time wasted looking for something complex when something
simple was breaking my script), its best to *first* look at basic
things when debugging.
Not sure if LWP has some kind of redirection limit (I wouldn't think
that it does), but from the lynx error message you got it seems that
the original URL is being redirected a number of times. LWP::UserAgent
follows redirects automatically. If you deal with the redirects
manually, you can trace what's happening along the way:
====CODE
#!/usr/bin/perl -w
use strict;
use LWP;
my $url = 'your_URL_here';
my $ua = LWP::UserAgent->new(
requests_redirectable => [] # don't follow redirects
);
my @urls = ($url);
while ( @urls ) {
my $r = $ua->head( shift @urls );
if ($r->is_redirect) {
print $r->status_line, "\n"; # server response
print "Redirected: ", $r->header('location'),"\n"; # redirect URL
push @urls, $r->header('location');
}
}
Then you can see the URL of each redirect, and hopefully, where the
problem is occurring.
HTH - keith
------------------------------
Date: 11 Sep 2003 16:23:45 -0700
From: csdude@hotmail.com (Mike)
Subject: Re: Posting with Net::NNTP
Message-Id: <46cdc619.0309111523.721a76bf@posting.google.com>
> [...]
> > my @message = (
> > "Subject: This is a Test",
>
> missing newline
Thanks, John and Tina. The \n was exactly it. Geez, you'd have thought
I would have caught that myself! I think my brain's starting to fry...
Mike
------------------------------
Date: Thu, 11 Sep 2003 22:48:52 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: Printing a hash of hashes using an array for the headings and getting the columns to line up
Message-Id: <Xns93F3BF63A6FB2dkwwashere@216.168.3.30>
Anno Siegel wrote:
[regarding Text::Table]
> In fact there's too little user control over alignment in more respects,
> title-to-body alignment is just one of them. It will be the first thing
> to fix if there is another release, but I'm not yet sure how to do it.
>
> The problem isn't that these features are hard to implement, but how
> to squeeze them into the user interface, which isn't exactly a beauty
> to begin with. In fact, that's why I left them out in the first place,
> that, and that I'd have to describe them all. I thought I'd get away
> with it, but you're not the first to complain.
I haven't examined the internals closely, so I may be way off-base here, but
since it already allows users to define columns with hashes, wouldn't that be
the obvious place to add new features for column formats? But I'd guess
you're looking at far more features than I have in mind, so I'll shut up
before I embarrass myself *too* much. :-)
------------------------------
Date: Thu, 11 Sep 2003 22:10:39 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Redemption, SafeMailItem and ActivePerl
Message-Id: <3f60f2a6.775165701@news.erols.com>
brankin@enbonline.net (Brian Rankin) wrote:
: Trying to import an RFC822 message into a PST message store results in
: the error "Can't modify non-lvalue subroutine call" when I set the
: Redemption item equal to the new message item.
: ERROR: $RedemptionSession->Item = $newmsg;
I'm not familiar with that library, but the error message and a gloss of
the docs suggest that Item is a property of the object, not a method.
$RedemptionSession->{Item} = $newmsg;
------------------------------
Date: Thu, 11 Sep 2003 22:29:08 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: seeking Win32::OLE example
Message-Id: <3f60f2e1.775224971@news.erols.com>
gbacon@hiwaay.net (Greg Bacon) wrote:
: In article <3f5fbdd5.696097308@news.erols.com>,
: Jay Tilton <tiltonj@erols.com> wrote:
:
: : gbacon@hiwaay.net (Greg Bacon) wrote:
: :
: : : I was trying to put together a quick hack to extract review comments
: : : (using the Comments property) from a Word document
:
: No, not the comment itself, the comment *tag*. I'm talking about the
: tags identify each comment and show up in the document as hidden text.
: The leader seems to be the author's initials because in a dummy doc I
: just created, Word tagged my comments as [geb1] and so on.
I'm hip. You want the comments embedded within the document's body, not
the "comment" property of the document object.
: Here's the code I've been using to explore:
[snipped here, but mostly retained in comments below]
: : : I played with the code in <36182bc8.8113706@news2.ibm.net> and found
: : : that it made a difference whether I called Documents->Open or
: : : GetActiveObject -- although the two seem equivalent in the docs.
: :
: I see that I was unclear. I should have written "equivalent, assuming
: the document we want is open". Using the code above with the --active
: option, I get the following error:
:
: Win32::OLE(0.1603) error 0x80020011: "Does not support a collection"
: in METHOD/PROPERTYGET "" at props line 29
: Can't call method "Name" on an undefined value at props line 30.
I see now. No, the GetActiveObject method cannot be used to hook into
an already-open document in one step. It can be used to connect with a
running Word application, then that application object can return the
open document.
#! perl
use strict;
use Win32::OLE qw/ in /;
sub usage { "Usage: $0 [--active | --open]\n" }
die usage unless @ARGV;
Win32::OLE->Option(Warn => 2);
my $Word;
my $Doc;
my $arg = shift;
if ($arg eq '--active') {
$Word = Win32::OLE->GetActiveObject('Word.Application');
$Doc = $Word->Documents->Item(1);
}
elsif ($arg eq '--open') {
$Word = Win32::OLE->new('Word.Application', 'Quit');
$Doc = $Word->Documents->Open('c:\temp\foo.doc');
}
: I obviously read more into the docs than was there, and I'm happy to
: take correction. Where can I find a good orientation to thinking OLE?
I don't know. Familiarity with the various forms of Visual Basic is
helpful. Drafting a program in VBScript and running it with the Windows
Script Host (cscript.exe) is often useful since you won't need to
translate sample code into its Perl equivalent.
: Now I'm trying to get at the highlighted portion of the document
: associated with a given comment. Strike that:
:
: foreach my $c (in $Doc->{Comments}) {
: my $tag = $c->{Initial} . $c->{Index};
: print $tag, " - ", $c->{Range}{Text}, "\n";
: print $c->{Scope}{Text}, "\n";
: }
That seems to work well. Does it need more tweaking?
: : As for your original quick hack program, see if this does not fill the
: : need.
:
[code snipped]
:
: That produced no output. (Yes, I used the appropriate path.)
Just as well. You want the inline comments, not the document's Comments
property. These aren't the droids you're looking for.
: A couple of remaining questions:
:
: Why does iterating over the BuiltinDocumentProperties make the
: application think I have changes that need saving? (I see that setting
: the Saved property says nothing needs saving.)
I don't know. Reasonably, a simple peek at an object's properties
should not alter the object. It is quite a nuisance.
: What the difference between getting at the document via Documents->Open
: versus GetActiveObject? I'd like to avoid typing long paths.
See above.
------------------------------
Date: Thu, 11 Sep 2003 15:47:01 -0700
From: "Trent Curry" <tcurrey@no.no.no.i.said.no>
Subject: Re: Speeding up LWP::Simple
Message-Id: <bjqu5f$j7i$1@news.astound.net>
Greg Schmidt wrote:
> On Thu, 11 Sep 2003 13:28:49 -0700, "Trent Curry"
> <tcurrey@no.no.no.i.said.no> wrote:
>
>> Tintin wrote:
>>> Time for you to use http://www.spamassassin.org/
>>>
>>> Written in Perl of course :-)
>>
>> I had recently read an article (somewhere in groups.google.com)
>> claiming that, while it cna block some spam, in reality, it will
>> not block everything and many spams cna get through it. Though nice
>> to know these solutions are being attempted in Perl ;p
>
> I have it running on my server. It is currently correctly blocking
> over 1000 spams per week, and allowing only a small handful (I'd say
> single digits, often low single digits) through in the same period.
Well Greg, thanks for setting the record straight. I was hoping someone with
experience with it would shed some light. I will see if I can locate a copy
to test it out for my self. I assume it will work fine with sendmail?
--
Trent Curry
perl -e
'($s=qq/e29716770256864702379602c6275605/)=~s!([0-9a-f]{2})!pack("h2",$1)!eg
;print(reverse("$s")."\n");'
------------------------------
Date: Fri, 12 Sep 2003 02:36:11 GMT
From: Greg Schmidt <gregs@trawna.com>
Subject: Re: Speeding up LWP::Simple
Message-Id: <57c2mvol2r9figllt5555nnd4r2ig3f2ef@4ax.com>
On Thu, 11 Sep 2003 15:47:01 -0700, "Trent Curry"
<tcurrey@no.no.no.i.said.no> wrote:
>Greg Schmidt wrote:
>> On Thu, 11 Sep 2003 13:28:49 -0700, "Trent Curry"
>> <tcurrey@no.no.no.i.said.no> wrote:
>>
>>> Tintin wrote:
>>>> Time for you to use http://www.spamassassin.org/
>>>>
>>>> Written in Perl of course :-)
>>>
>>> I had recently read an article (somewhere in groups.google.com)
>>> claiming that, while it cna block some spam, in reality, it will
>>> not block everything and many spams cna get through it. Though nice
>>> to know these solutions are being attempted in Perl ;p
>>
>> I have it running on my server. It is currently correctly blocking
>> over 1000 spams per week, and allowing only a small handful (I'd say
>> single digits, often low single digits) through in the same period.
>
>Well Greg, thanks for setting the record straight. I was hoping someone with
>experience with it would shed some light. I will see if I can locate a copy
>to test it out for my self. I assume it will work fine with sendmail?
It can be made to work with Sendmail. It can be made to work much more
easily with Postfix, which I find to be superior to Sendmail in many,
very off-topic, ways.
--
Greg Schmidt (gregs@trawna.com)
Trawna Publications (http://www.trawna.com/)
------------------------------
Date: 11 Sep 2003 22:39:44 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: split() matching regular expression question - openwebmail bug...
Message-Id: <slrnbm1udg.6v3.abigail@alexandra.abigail.nl>
Bart van den Burg (bart-news@NOSPAMtvreclames.nl) wrote on MMMDCLXIII
September MCMXCIII in <URL:news:bjqmsu$6nd$1@reader11.wxs.nl>:
&&
&& Because that's hard to do if it's in a web environment, cause if you press
&& [tab], you'll go to the next input box. Ok, you could go and copy/paste one,
&& but would you really wanna do that everytime you wanna login there?
Don't make the newbie mistake of "if it works on my browser, it will
work anywhere". While tabs might go to the next field in some browsers,
it won't in others. And yet another set of browsers allow tabs to be
escaped.
Not that this has anything to do at all with Perl.
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: 11 Sep 2003 22:02:02 GMT
From: "James E Keenan" <jkeen@concentric.net>
Subject: Re: Wierd result from hash array
Message-Id: <bjqrcq$oot@dispatch.concentric.net>
"Pacman" <piercer@nospam_pacbell.net> wrote in message
news:110920031318586753%piercer@nospam_pacbell.net...
>
>
> I'm getting 'used' to hash arrays and am writing a perl script to
> backup my harddrive automatically. I couldn't figure out how to get
> the following code to work, so I must be making a mistake I can't see.
>
> Here's my expected result:
>
> foreaching on key one
> result: red/green
>
> instead I get the following:
>
> foreaching on key one
> two:three
> foreaching on key HASH(0x804c014)
> :
>
> #!/usr/bin/perl
>
> $BLAH = "one:red:green";
>
> %NADA = {};
This line is your problem. You probably meant: %NADA = ();
You would have discovered this if you had enable warnings (or diagnostics,
as another poster indicated).
jimk
------------------------------
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 5491
***************************************