[15707] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3120 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 22 11:05:32 2000

Date: Mon, 22 May 2000 08:05:12 -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: <959007912-v9-i3120@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 22 May 2000     Volume: 9 Number: 3120

Today's topics:
    Re: about sending HTML email from perl <dave@dave.org.uk>
    Re: Clueless NEWBIE help: Can't find error in code. <tigertom@NOSPAMusa.net>
    Re: DBI and apostrophes <jeff@vpservices.com>
    Re: file locking (Michel Dalle)
    Re: Getting rid of leading and trailing spaces (Michael Budash)
    Re: Getting rid of leading and trailing spaces (Gabriel Kihlman)
        HELP MEEEEEE <adolftw@tcts1.seed.net.tw>
    Re: HELP MEEEEEE <jeff@vpservices.com>
        help <guest@yale.edu>
        help <guest@yale.edu>
        help <guest@yale.edu>
        help <guest@yale.edu>
        help <guest@yale.edu>
        help <guest@yale.edu>
    Re: help <blah@nospam.com>
        IP Address Query <hackel@media-saturn.com>
    Re: LWP Module and error 500 <tony_curtis32@yahoo.com>
        MSWord doc in Perl-generated HTML <dressen@casema.net>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: Novice request for help to simplify matching <jhelman@wsb.com>
    Re: problem with split <dnichols@fhcrc.org>
    Re: regexes *sigh* damn I hate these things <godzilla@stomp.stomp.tokyo>
    Re: Removing null character padding from the strings Ef <kraja@miel.mot.com>
        Sendmail problem <webmaster@animationlibrary.com>
    Re: Sendmail problem <tony_curtis32@yahoo.com>
    Re: Sendmail problem <Nick@ucecom.com>
    Re: Sendmail? <tigertom@NOSPAMusa.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 22 May 2000 14:57:47 +0100
From: Dave Cross <dave@dave.org.uk>
Subject: Re: about sending HTML email from perl
Message-Id: <04fiiss5me2g2osou6rk8ajo2vgtdh2rln@4ax.com>

On Mon, 22 May 2000 20:12:46 +0800, "Nice" <abc@def.com> wrote:

>hi all,
>I am newbie to UNIX, I tried to write a Perl program for email sending, the
>mailing program I am using is sendmail, my question is how can I send a HTML
>format email by sendmail?? what is the param or instruction, thx

Look at the MIME::Lite module from CPAN <http://ww.cpan.org>.

 ...oh. And while you're there, get the MailTools package as well -
it'll make your mail sendind scripts much easier to write!

hth,

Dave...
-- 
<http://www.dave.org.uk>  SMS: sms@dave.org.uk
yapc::Europe - London, 22 - 24 Sep <http://www.yapc.org/Europe/>

"There ain't half been some clever bastards" - Ian Dury [RIP]


------------------------------

Date: Sun, 21 May 2000 19:06:44 +0100
From: tigertom <tigertom@NOSPAMusa.net>
Subject: Re: Clueless NEWBIE help: Can't find error in code.
Message-Id: <392825B3.347EA38E@NOSPAMusa.net>

Thank you for your help, Mr. Zucker.

The Carp call didn't work, even when I put the following
at the top of the script:

#!/usr/local/bin/perl
 require "CGI.pm";
 use strict;
 use CGI qw(:standard);
 use diagnostics -verbose;
 use CGI::Carp qw{fatalsToBrowser};

It flagged up a lot of imperfect code, but nothing serious.

I then went to look at other examples of this kind of script.
I copied part of the 'Nomodomo' script at Bignosebird.com into
mine, as it can use Sockets.  It also shows each mail being sent,
and has an error report.  I modified it to throw out *anything* to the
browser if the mail-out didn't work, like so:

sub error_report {

 local($errormsg) = @_;
 print "Content-type: text/html\n\n";
 print "<CENTER><H2><B>The following error has
occurred:</B></H2></CENTER><br>\n";
 print "$errormsg\n";
 print "$_\n";
 print "$!\n";
 exit;
 }


I eventually found that the problem seemed to be that I had blank
lines in my subscriber file.  I got rid of these, and both my code and
the Bignosebird code seemed to work fine.



Jeff Zucker wrote:

> > tigertom wrote:
> >
> > > This sub-routine executes successfully (it sends out the emails ok), and
> > > then crashes (500 server error).
>
> Put this line near the top of your script, it will send most error
> messages to the browser:
>
>     use CGI::Carp qw(fatalsToBrowser);
>
> > > ... I don't have my own server, so I can't check the
> > > error logs.
>
> Even if it is not your server, one would think the admins would give you
> access to the error logs, it is to their advantage for you to know about
> what is in them.  Have you asked?
>
> --
> Jeff



------------------------------

Date: Mon, 22 May 2000 07:49:40 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: DBI and apostrophes
Message-Id: <39294904.DB0554CC@vpservices.com>


Nick Liebmann wrote:
> 
> I have done a bodge fix on the a mysql call using the DBI module
> 
> if($artistname =~ /\'/){$artistname =~ s/\'/\\'/;}
> 
> eg $artistname =  "Gary O'Dea"
> 
> after ---- $artistname =  "Gary O\'Dea"
> 
> this puts an escape character before the apostrophe.
> 
> on some of the entries the artistname has an apostrophy which when called
> without the above change, fails to finish the statement correctly.
> 
> $tabledata = $dbh->prepare("SELECT * FROM gig_guide WHERE
> artist='$artistname'");
>    $tabledata->execute || die "Unable to execute query: $dbh->errstr";
> 
> There must be a better way of doing this....any ideas?


The best way to avoid this problem (and several other even more serious
problems) is to always use placeholders:

 $tabledata = $dbh->prepare("SELECT * FROM gig_guide WHERE artist = ?");
 $tabledata->execute($artistname) 
    || die "Unable to execute query: $tabledata->errstr";

That construct will not care if the apostrophe in $artistname is escaped
or not.

-- 
Jeff


------------------------------

Date: Mon, 22 May 2000 14:48:04 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: file locking
Message-Id: <8gbhe0$plu$1@news.mch.sbs.de>

In article <B54DC4B0.B06%john@digitalmx.com>, John Springer <john@digitalmx.com> wrote:
>As a matter of curiousity, do you think there is any reason
>to worry about file locking on a file that is opened for append only.
>
>No trying to read and then rewrite anything; just stick something on the
>end.
>
>I'm worried about getting a lot hits in a hurry and losing something.

AFAIK, appending doesn't require locking, since its atomicity is
handled by the underlying O.S. A typical example would be logging
web hits... File locking would only add an unnecessary bottleneck
here.

However, if you're planning on appending large chunks of data to
the same file, and you want to keep the order of the chunks written
by the different scripts, I would recommend using file locking and
system calls anyway. This may be a piece of FUD, but I don't have
an unlimited confidence in all O.S.s :)

Michel.


------------------------------

Date: Mon, 22 May 2000 07:13:34 -0700
From: mbudash@sonic.net (Michael Budash)
Subject: Re: Getting rid of leading and trailing spaces
Message-Id: <mbudash-2205000713340001@adsl-216-103-91-123.dsl.snfc21.pacbell.net>

In article <391EF15B.CB276724@yahoo.com>, Prashant TR
<prashant_tr@yahoo.com> wrote:

> prakash_ojha@my-deja.com wrote:
> 
> > I need to clear a word, that I read from file, of leading and trailing
> > spaces and later compare this with some other query.
> 
> my $x = "  This  ";
> 
> $x =~ s/^ *//;
> 
> $x =~ s/ *$//;
> 
> (Note: Untested code).
> 
> --
> Prashant

this is a faq:

How do I strip blank space from the beginning/end of a string? 

The simplest approach, albeit not the fastest, is probably like this: 

    $string =~ s/^\s*(.*?)\s*$/$1/;

It would be faster to do this in two steps: 

    $string =~ s/^\s+//;
    $string =~ s/\s+$//;

Or more nicely written as: 

    for ($string) {
        s/^\s+//;
        s/\s+$//;
    }

hth-
-- 
Michael Budash ~~~~~~~~~~ mbudash@sonic.net


------------------------------

Date: 22 May 2000 14:29:04 GMT
From: m10723@atle.abc.se (Gabriel Kihlman)
Subject: Re: Getting rid of leading and trailing spaces
Message-Id: <8gbg7g$e76$1@oden.abc.se>

>> I need to clear a word, that I read from file, of leading and trailing
>> spaces and later compare this with some other query.

What is wrong with \s ? Like in $x =~ s/^\s*|\s*$//g;


----------
Lame signature



------------------------------

Date: 22 May 2000 14:27:34 GMT
From: "Adolf" <adolftw@tcts1.seed.net.tw>
Subject: HELP MEEEEEE
Message-Id: <8gbg4m$sul$1@news.seed.net.tw>

source code:
print <<Hi
yes
Hi

when type => c:\perl\bin\perl e:\www\hi.plx

why show"Can't find string terminator "Hi" anywhere before EOF at
e:\www\hi.plx line 1"?

HELP MEEEEEEEE





------------------------------

Date: Mon, 22 May 2000 07:56:23 -0700
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: HELP MEEEEEE
Message-Id: <39294A97.E92ABFB8@vpservices.com>

Adolf wrote:
> 
> source code:
> print <<Hi
> yes
> Hi
> 
> when type => c:\perl\bin\perl e:\www\hi.plx
> 
> why show"Can't find string terminator "Hi" anywhere before EOF at
> e:\www\hi.plx line 1"?
> 
> HELP MEEEEEEEE


Two questions:

Is there a carriage return after the last "Hi"?

Is there anything betweent the "i" of the last "Hi" and that carriage
return?

Play with those and your problem will go away.

-- 
Jeff


------------------------------

Date: Mon, 22 May 2000 10:04:12 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <39293E5C.7DD286C0@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 10:05:28 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <39293EA8.FBC4FB79@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 10:08:33 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <39293F61.799D11DC@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 10:26:11 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <39294383.64BA53CC@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 10:27:36 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <392943D8.7A8D5DC2@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 10:29:48 -0400
From: Guest <guest@yale.edu>
Subject: help
Message-Id: <3929445C.65E3395B@yale.edu>

I am a beginner at perl and I have been using perl for text editing and
formatting.
I have been trying to take a text file which is over 2000 lines long and
basically
trying to delete lines for example delete every other 3rd line in the
file. I can
write a script to substitute every 3rd line with a blank line but not
really
delete the line unless I go into an editor and do it manually. I was
wondering
if there is an easy way in perl to do this?

Thank you
earle adams



------------------------------

Date: Mon, 22 May 2000 17:03:27 +0200
From: Marco Natoni <blah@nospam.com>
Subject: Re: help
Message-Id: <39294C3F.476F9097@nospam.com>

Guest,

Guest wrote:
> I am a beginner at perl 

  Six copies of the same message plonk you down in the great ring of the
beginners at UseNet too... ;)

> I have been trying to take a text file which is over 2000 lines 
> long and basically trying to delete lines for example delete 
> every other 3rd line in the file. I can write a script to 
> substitute every 3rd line with a blank line but not really delete 
> the line unless I go into an editor and do it manually. I 
> was wondering if there is an easy way in perl to do 
> this?

<code>
	$myfile='...';
	open INPUT,"<$myfile" or die "$myfile: $!\n";
	open OUTPUT,">$myfile.tmp" or die "$myfile.new: $!\n";

	while ($line=<INPUT>) { print OUTPUT $line unless ($.%3)==0 }

	close INPUT;
	close OUTPUT;
	rename $myfile.'new',$myfile;
</code>


	Best regards,
		Marco


------------------------------

Date: Mon, 22 May 2000 13:04:21 +0000
From: soulfly <hackel@media-saturn.com>
Subject: IP Address Query
Message-Id: <39293055.5AF6400@media-saturn.com>

Hello,

can anyone help me in getting the ipaddress from winx/nt machines with a
perl-script.

Regards
U.Hackel




------------------------------

Date: 22 May 2000 08:31:53 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: LWP Module and error 500
Message-Id: <87g0rag186.fsf@limey.hpcc.uh.edu>

>> On Mon, 22 May 2000 11:48:32 +0100,
>> "Franck Lalane" <f.lalane@no-spam.pra.org.uk> said:

> Hello, I made a search engine for an Intranet and I had
> a problem accessing files not on the same server as the
> one which run the script (I can't use a simple OPEN).

That's because what you are accessing on remote servers
are not files (you open a stream, not a file).  This is
because the remote end does not necessarily implement what
you are trying to fetch as a file on disk
(e.g. dynamically created HTML).

> After a post on that newsgroup, I have been adviced to
> use the LWP module.

Good! :-)

> code 500 for each file on the Intranet (meaning Internal
> Server Error I think).

That's coming from the web server so that generally means
your program is generating some kind of output which
doesn't conform to the required format for data returned
over HTTP.

> I really don't understand why!
> Here is what I use (very simple really!):

> use LWP::Simple;
> $doc = get 'http://www.mysite.com/myfile.htm';

I assume this is running in some kind of CGI context.  Is
that right?  If so, you aren't returning *anything* to the
requesting client (browser).  You have at least to return
a Content-Type indicating what kind of data is coming
back, see "perldoc CGI" and look for the header() method.
If you just want to return another document somewhere else
on the web, a redirect() method might be simpler.

If it isn't CGI then you need to provide more information.

hth
t


------------------------------

Date: Mon, 22 May 2000 15:56:01 +0200
From: "Seb" <dressen@casema.net>
Subject: MSWord doc in Perl-generated HTML
Message-Id: <39293c9a$0$554@reader3>

My question is this:

Is it possible to display an uploaded msword doc within a HTML page
generated by Perl?

I'd like to know, because at the moment I'm using txt files, which I have to
structure before generating the corresponding HTML.
MS Word has a defined structure with tabs, and other lay-out options, which
I would like to use instead of txt files.

p.s. I don't really need to manipulate the text in the documents.

Thanks,
Seb





------------------------------

Date: Mon, 22 May 2000 13:44:28 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <siiedsv5o1157@corp.supernews.com>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 15 May 2000 14:54:14 GMT and ending at
22 May 2000 14:01:37 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 1999 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  211 (42.3% of all posters)
Articles: 376 (21.8% of all articles)
Volume generated: 676.1 kb (21.2% of total volume)
    - headers:    301.8 kb (6,003 lines)
    - bodies:     365.1 kb (12,246 lines)
    - original:   258.9 kb (9,120 lines)
    - signatures: 8.8 kb (244 lines)

Original Content Rating: 0.709

Averages
========

Posts per poster: 1.8
    median: 1 post
    mode:   1 post - 150 posters
    s:      2.5 posts
Message size: 1841.3 bytes
    - header:     821.9 bytes (16.0 lines)
    - body:       994.4 bytes (32.6 lines)
    - original:   705.0 bytes (24.3 lines)
    - signature:  24.1 bytes (0.6 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   24    68.9 ( 22.7/ 44.6/ 20.2)  Jeff Helman <jhelman@wsb.com>
   18    32.1 ( 17.8/ 14.1/  7.2)  Brad Baxter <bmb@dataserv.libs.uga.edu>
    9    22.4 (  8.1/ 13.6/  6.2)  jones <ra.jones@NO_UCE*cwcom.net>
    8    14.5 (  6.0/  7.5/  3.7)  Gwyn Judd <tjla@guvfybir.qlaqaf.bet>
    7    17.5 (  6.2/ 11.2/  4.5)  Bert IJff <bert@scanlaser.nl>
    6     9.0 (  4.4/  4.6/  2.6)  gregsptl1962@my-deja.com
    6     9.3 (  4.6/  4.7/  3.2)  "[TNN]G.Bloke" <GBloke@actiongames.co.uk>
    6    10.0 (  5.8/  4.2/  4.1)  "A Pietro" <apietro@my-deja.com>
    5     8.4 (  4.7/  3.7/  2.9)  "Jim Stout" <notacceptingspam@nowhere.can>
    5     5.0 (  3.6/  1.5/  1.4)  "Lance Boyle" <lancelotboyle@hotmail.com>

These posters accounted for 5.4% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  68.9 ( 22.7/ 44.6/ 20.2)     24  Jeff Helman <jhelman@wsb.com>
  32.1 ( 17.8/ 14.1/  7.2)     18  Brad Baxter <bmb@dataserv.libs.uga.edu>
  22.4 (  8.1/ 13.6/  6.2)      9  jones <ra.jones@NO_UCE*cwcom.net>
  17.5 (  6.2/ 11.2/  4.5)      7  Bert IJff <bert@scanlaser.nl>
  14.5 (  6.0/  7.5/  3.7)      8  Gwyn Judd <tjla@guvfybir.qlaqaf.bet>
  13.4 (  0.7/ 12.6/ 12.6)      1  adam_streeter@my-deja.com
  11.8 (  3.0/  8.8/  4.6)      4  "Brian McDonald" <mcdonabNO@SPAMyahoo.com>
  10.9 (  3.0/  7.9/  5.2)      3  "Megan Garrison" <megan@aracnet.com>
  10.0 (  5.8/  4.2/  4.1)      6  "A Pietro" <apietro@my-deja.com>
   9.3 (  4.6/  4.7/  3.2)      6  "[TNN]G.Bloke" <GBloke@actiongames.co.uk>

These posters accounted for 6.6% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

1.000  (  1.9 /  1.9)      3  "Leonard Thornton" <LeonardT@Intelis-Inc.Com>
0.990  (  4.1 /  4.2)      6  "A Pietro" <apietro@my-deja.com>
0.939  (  4.7 /  5.0)      4  jeffhenke@my-deja.com
0.930  (  1.4 /  1.5)      5  "Lance Boyle" <lancelotboyle@hotmail.com>
0.877  (  2.7 /  3.0)      4  glauber <glauber.ribeiroNOglSPAM@experian.com.invalid>
0.857  (  2.1 /  2.5)      4  NagaPutih <s0218327@unix1.cc.ysu.edu>
0.795  (  3.0 /  3.8)      3  Sergey Gribov <sergey@cgen.com>
0.794  (  2.9 /  3.7)      5  "Jim Stout" <notacceptingspam@nowhere.can>
0.790  (  1.4 /  1.8)      3  "Roy Wood" <roy.wood@ukonline.co.uk>
0.774  (  2.7 /  3.4)      3  daveleroy@my-deja.com

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.527  (  4.6 /  8.8)      4  "Brian McDonald" <mcdonabNO@SPAMyahoo.com>
0.507  (  7.2 / 14.1)     18  Brad Baxter <bmb@dataserv.libs.uga.edu>
0.494  (  3.7 /  7.5)      8  Gwyn Judd <tjla@guvfybir.qlaqaf.bet>
0.458  (  1.4 /  3.0)      3  "red [2]" <reevesg@cableinet.co.ukx>
0.457  (  6.2 / 13.6)      9  jones <ra.jones@NO_UCE*cwcom.net>
0.452  ( 20.2 / 44.6)     24  Jeff Helman <jhelman@wsb.com>
0.442  (  1.4 /  3.2)      3  ahaakmat@cable.a2000.nl
0.404  (  4.5 / 11.2)      7  Bert IJff <bert@scanlaser.nl>
0.332  (  0.4 /  1.1)      4  pinin <pinin@xchain.com>
0.299  (  0.9 /  3.0)      4  Eric Liao <ekliao@mediaone.net>

32 posters (15%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      29  comp.lang.perl.modules
      28  comp.infosystems.www.authoring.html
      27  comp.infosystems.www.servers.unix
      22  alt.perl
      13  comp.lang.perl
       8  microsoft.public.word.conversions
       7  comp.infosystems.www.servers.ms-windows
       4  comp.lang.perl.moderated
       2  comp.lang.javascript
       2  comp.os.ms-windows.programmer.misc

Top 10 Crossposters
===================

Articles  Address
--------  -------

       6  Alan Silver <alan-silver@prestwich-smile-gemach.freeserve.furryferret.co.uk>
       6  "JB Goss" <jgoss@goss-com.com>
       4  jones <ra.jones@NO_UCE*cwcom.net>
       4  Eric Liao <ekliao@mediaone.net>
       3  Hendrik Uhlmann <HUhlmann@stn-atlas.de>
       3  "William J. Wolfe" <wjwolfe1@bluestem.prairienet.org>
       3  killbeck@pointecom.net
       3  Kenneth Lee <kenneth.lee@alfacomtech.com>
       2  Mark Holt <null@zaz.com.br>
       2  Brad Baxter <bmb@dataserv.libs.uga.edu>


------------------------------

Date: Mon, 22 May 2000 14:10:34 GMT
From: Jeff Helman <jhelman@wsb.com>
Subject: Re: Novice request for help to simplify matching
Message-Id: <39293FFF.F7214AD2@wsb.com>

Larry Rosler wrote:
> 
> In article <3925C83F.3F5E5C55@wsb.com>, jhelman@wsb.com says...
> > Oops.  Point taken.  Can you tell that my brain has pretty much stopped
> > functioning for the night. :)  To be correct, the "if
> > ($ENV{'REMOTE_ADDR'..." line should read:
> >
> > if ($ENV{'REMOTE_ADDR'} =~ /^\Q$ipx[$i]\E/) {
> >
> > or, in the case of my second post:
> >
> > if ($ENV{'REMOTE_ADDR'} =~ /^\Q$addr\E/) {
> >
> > Good catch.  Thanks.
> 
> A better catch would be to ask why you are using those dolled-up regex
> matches instead of simple string equality testing.  Do you really want
> 1.2.3.40 to match 1.2.3.4?  So you could append '$' to those regexes, but
> don't!

I was just going with the code that he gave me.  If he was attempting to
match members of Class-C networks, then the regex is the only way to go
(well, not really, but the other way would involve a regex on the user's
IP followed by a string comparison.)  And though you can never be sure
that, for example, 1.2.3.10 and 1.2.3.100 are indeed on the same subnet,
that's another discussion. :)

> As a general principle, any regex that reads /^\Qwhatever\E$/ is better
> replaced by a string comparison or an index test.  (If the /i modifier
> would be needed, use lc() on one or both operands.)

I agree, but again, you'll note the distinct lack of a string terminator
character ($) in my above regex.

> (Just Another Larry) Rosler
> Hewlett-Packard Laboratories
> http://www.hpl.hp.com/personal/Larry_Rosler/
> lr@hpl.hp.com


JH
----------------------------------------------------------------
Jeff Helman                 Product Manager -- Internet Services
jhelman@wsb.com                    CCH Washington Service Bureau
----------------------------------------------------------------


------------------------------

Date: Mon, 22 May 2000 16:32:57 +0000
From: Douglas Nichols <dnichols@fhcrc.org>
Subject: Re: problem with split
Message-Id: <39296138.D5591CEE@fhcrc.org>

I think you wany split "\|", .....

dn

system PRIVILEGED account wrote:

> I am facing problem in splitting an ascii line.
> The fields are delimited by "|" (pipe) .
> I m using following command:
>
> @array=split("|", $line) . The command is not working
> properly.
>
> When i changes the delimiter to ":" and gives a similar
> command, it works fine.
>
> Any suggestions are welcome??

--
Cheers, dn

Douglas Nichols                              dnichols@fhcrc.org
---------------------------------------------------------------
National Wilms Tumor Study Group                   206.667.4283
Seattle, WA





------------------------------

Date: Mon, 22 May 2000 06:29:55 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: regexes *sigh* damn I hate these things
Message-Id: <39293653.F905A7D3@stomp.stomp.tokyo>

The WebDragon wrote:
> 
> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
>  | The WebDragon wrote:
>  | >  "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:

> read any Alan Watts and gotten something out of it...

You are displaying your age. I have an entire
collection of Alan Watts' lectures on Zen Buddhism
he presented during the seventies decade. This
collection is on old fashion reel-to-reel tape.

Perhaps it is his influence during my early
teen years which accounts for my odd nature.
Nonetheless, I have never liked Nehru Jackets.
Full Metal Jacket seems a better fit for me.

Godzilla!


------------------------------

Date: Mon, 22 May 2000 18:27:45 +0530
From: Rajasankar K <kraja@miel.mot.com>
Subject: Re: Removing null character padding from the strings Efficiently
Message-Id: <39292EC9.5A7A5AA3@miel.mot.com>


Hi,

Ulrich Ackermann wrote:
> my $str =~ s/0*$//;

It doesn't work this way.

It searches for the character 0 (i.e. ascii 48) not for null (ascii 0).


>
> --
> Ulrich Ackermann
> ORGA Kartensysteme GmbH (SY-PEAT-STA)
> Tel.:+49.5254.991-925
> mailto:uackermann@orga.com



------------------------------

Date: Mon, 22 May 2000 09:28:56 -0400
From: "Yevgeniy Leshchinskiy" <webmaster@animationlibrary.com>
Subject: Sendmail problem
Message-Id: <8gbcnb$kuk$1@bob.news.rcn.net>

Hi everyone,
I am having a very strange problem with sendmail. When my script tries to
send an email, everything goes fine, I don't receive any errors, but the
recipients doesn't receive the email either.

I have checked the sendmail's mail que and all of the message are there,
with the following statuses "Warning: could not send message for past 4
hours" or " Warning: could not send message for past 1 day" .

In other words, the messages reach sendmail, but sendmail is having problems
sending them out. The problem must be with sendmail since I have this script
on another site and it works perfectly. Anyone know what could be causing
this problem?


Hope to hear from you soon,

Sincerely,
Yevgeniy Leshchinskiy
webmaster@animationlibrary.com
Animation Library
http://www.animationlibrary.com




------------------------------

Date: 22 May 2000 08:35:30 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Sendmail problem
Message-Id: <87d7meg125.fsf@limey.hpcc.uh.edu>

>> On Mon, 22 May 2000 09:28:56 -0400,
>> "Yevgeniy Leshchinskiy" <webmaster@animationlibrary.com> said:

> Hi everyone, I am having a very strange problem with
> sendmail. When my script tries to send an email,
> everything goes fine, I don't receive any errors, but
> the recipients doesn't receive the email either.

> In other words, the messages reach sendmail, but
> sendmail is having problems sending them out. The
> problem must be with sendmail since I have this script
> on another site and it works perfectly. Anyone know what
> could be causing this problem?

I'd go and ask this in comp.mail.sendmail if I were you.

If sendmail is receiving and queueing the messages then
it's out of perl's hands.


[ off-topic for clpm, added as a +ve footnote ]

It sounds like either the sites you're trying to send to
aren't accepting messages at the moment, or they are
generating soft fails due to the machine's mail setup or
location in IP-space (maybe on a soft-blocked SPAM list).

Then again it could be the network topology: is there a
route out from this machine like there is for the other
machine?

hth
t


------------------------------

Date: Mon, 22 May 2000 14:30:59 +0100
From: "Nick Liebmann" <Nick@ucecom.com>
Subject: Re: Sendmail problem
Message-Id: <NKaW4.4814$1W6.91196@news2-win.server.ntlworld.com>


Yevgeniy Leshchinskiy <webmaster@animationlibrary.com> wrote in message
news:8gbcnb$kuk$1@bob.news.rcn.net...
> Hi everyone,
> I am having a very strange problem with sendmail. When my script tries to
> send an email, everything goes fine, I don't receive any errors, but the
> recipients doesn't receive the email either.
>
> I have checked the sendmail's mail que and all of the message are there,
> with the following statuses "Warning: could not send message for past 4
> hours" or " Warning: could not send message for past 1 day" .

Sounds like the router has gone down...

I've had the same problem, working on a unix server, the problem we
encoutered was that the routing handles may have to be changed. Our fire
wall went down and reset evreything. You need check with your webmaster to
check that it is working from the server end.

Also, you say that you used it on other sites, have you put a  refferer in
the script? Basically blocks all domains from using the script apart from
the ones specified.

Regards

Nick





------------------------------

Date: Sun, 21 May 2000 19:21:45 +0100
From: tigertom <tigertom@NOSPAMusa.net>
Subject: Re: Sendmail?
Message-Id: <39282939.C3EBB8C6@NOSPAMusa.net>

Perhaps you need to look at other scripts, say at http://www.cgi-resources.com,
and
find one that has a better email validity sub-routine, that won't exclude
addresses of that type.  I don't know what the copyright is on bits of Perl code
[ I'm not a programmer, just a hack], but maybe you could just copy that bit
that checks the email adddress syntax into FormMail, if you find a better, or
less picky(!) one.

TigerTom.

Marcus wrote:

> I am using Matt's cgi script to send a form via email. It used to work fine
> on my old
> server but now I am having the weirdest thing happen to me on my new
> dedicated server (Red Hat Linux 6.1). The script will send out to any email
> address like: hell@hello.com or hi@hi.ca but when you try and send to
> something like: hello@mindlink.bc.ca or hello@sk.sympatico.ca it won't send.
> I have verified the email address' I am trying to send to and it they work
> otherwise. Any suggestions on where the problem lies or how I can fix it?



------------------------------

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 3120
**************************************


home help back first fref pref prev next nref lref last post