[25051] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7301 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 25 09:11:09 2004

Date: Mon, 25 Oct 2004 06:10:13 -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           Mon, 25 Oct 2004     Volume: 10 Number: 7301

Today's topics:
        Regex and chemistry <dzluk8fsxsw0001@sneakemail.com>
        Regular expressions to find the presence of special cha <vertica.garg@siemens.com>
    Re: Regular expressions to find the presence of special <jurgenex@hotmail.com>
    Re: Regular expressions to find the presence of special <vertica.garg@siemens.com>
    Re: Regular expressions to find the presence of special <do-not-use@invalid.net>
    Re: Regular expressions to find the presence of special (Anno Siegel)
    Re: Regular expressions to find the presence of special <noreply@gunnar.cc>
        Statistics for comp.lang.perl.misc <gbacon@hiwaay.net>
    Re: where download web application source code examples <sholden@flexal.cs.usyd.edu.au>
    Re: where download web application source code examples <nospam@bigpond.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 25 Oct 2004 12:16:57 +0200
From: "Jonas Nilsson" <dzluk8fsxsw0001@sneakemail.com>
Subject: Regex and chemistry
Message-Id: <clil81$57b$1@news.island.liu.se>

I'd like to parse equilibria and linear dependencies of concentrations as
follows:

_Equilibria_
Input:
Three parts:
1. Reactants
2. Products
3. Equilibrium constant.

1,2: Reactants and products are separated by /\s+[^\s]*>[^\s]*\s+/.
3: Equilibrium constant is in parenthesis with optional value.

Individual items in reactants and products are separated by /\s+\+\s+/.
Each item have a coefficient (decimal, integer or fraction (1/2)) and an
identifier.

Output:
Equilibrium constant with optional value, reactants with coefficients*-1 and
products with coefficients like this:

2A + 3B <=> C (K=1.02e-2)
parses to: ['K=1.02e-2', [-2, 'A'], [-3, 'B'], [1, 'C']]

 (Kox) H2 + 1/2O2 => H2O
parses to: ['Kox', [-1, 'H2'], [-0.5,'O2'], [1, 'H2O]]

EP+ <-> E + P+ (Kdiss=1.06e-7)
parses to: ['Kdiss=1.06e-7', [-1,'EP+'], [1, 'E'], [1, 'P+']]

_Linear_dependencies_
Input:
Two or three parts divided by /=/.
If three parts: one of the parts is a number (any notation).
Of the two additional parts one is identifier and the other is a linear
combination (integer or decimal notation) of concentrations.
Concentration is noted as [_ident_].

Output:
Identifier with optional value, and concentrations with coefficients.

CAtot = 2*[  CA2  ] + [CAKE]=1e-6
Parses to: ['CAtot=1e-6', ['2', 'CA2'], ['1', 'CAKE']]

 charge=0=[Na+] - 2 * [SO4 2-]
Parses to: ['charge=0', ['1', 'Na+'], ['-2', 'SO4 2-']]

[A] + [B] + 0.5*[C] = tot
Parses to: ['tot', ['1', 'A'], ['1', 'B'], ['0.5', 'C']]

I give some code down here that croaks on some errors in input and parses
the strings. Would you please be kind to comment on is and propose some
improvements. The croaks should give som meaningful hints to the user but
that is left out for now...

_CODE_

use strict;
use Carp;

my @test=(
"2A + 3B <=> C (K=1.02e-2)",
" (Kox) H2 + 1/2O2 => H2O",
"EP+ <-> E + P+ (Kdiss=1.06e-7)"
);
for (@test) {
 my $equi=ParseEqui($_);
 print "$_\nparses to: ";
 Dumpit($equi);
}
print "-" x 80,"\n";

my @test2=(
"CAtot = 2*[CA2] + [CAKE]=1e-6",
" charge=0=[Na+] - 2 * [SO4 2-]",
"[A] + [B] + 0.5*[C] = tot "
);
for (@test2) {
 my $tot=ParseTot($_);
 print "$_\nParses to: [";
 Dumpit($tot);
}


sub ParseEqui {
 $_=shift;
 croak unless (my @bits=split /\s+[^\s]*>[^\s]*\s+/)==2;
 $bits[0]=~s/(^|\s)\(([^\)]+)\)(\s|$)// ||
$bits[1]=~s/(^|\s)\(([^\)]+)\)(\s|$)// or croak;
 my $equi=[$2];
 for my $lr (0,1) {  #left or right?
  for (split /\s+\+\s+/,$bits[$lr]) {
   m/^\s*([\d\.]*)(\/([\d\.]*)|)\s*(.+?)\s*$/ or croak;
   my $coeff=$1?$2?$1/$3:$1:1;
   push @{$equi},[$lr?$coeff:-$coeff,$4];
  }
 }
 return $equi;
}

sub ParseTot {
 $_=shift;
 croak unless int 0.5*(my @bits=split /\s*=\s*/)==1;
 my $num;
 if (@bits==3) {
  my $i=0;
  while ($bits[$i]!~/^\s*([\d\.]+([eE](\+|-|)\d+)?)\s*$/) {
   $i++;
   croak if $i==3;
  }
  $num=splice @bits,$i,1;
 }
 @bits=reverse @bits if $bits[0]=~/\[/ && $bits[1]!~/\[/;
 $bits[0]=~s/^\s+|\s+$//g;
 my $tot=[defined $num?"$bits[0]=$num":$bits[0]];
 $bits[1]="+ $bits[1]";
 push @{$tot},[0+($2?$1.$3:$1.1),$4] while
($bits[1]=~s/\s*([+-])\s*(([\d\.]+)\s*\*\s*)?\[\s*([^\]]+?)\s*\]\s*//);
 croak if $bits[1]=~/[^\s]/;
 return $tot;
}

sub Dumpit {
 my $in=shift;
 print "[";
 for (@{$in}) {
  if (ref($_)) {
   print "['",join("',\t'",@{$_}),"'],\t";
  } else {
   print "'$_',\t";
  }
 }
 print "]\n\n";
}




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

Date: Mon, 25 Oct 2004 11:22:34 +0100
From: "Vertica Garg" <vertica.garg@siemens.com>
Subject: Regular expressions to find the presence of special characters
Message-Id: <clik5d$gqg$1@news.mch.sbs.de>

I am trying to validate that the string contains characters [A-Z a-z 0-9 /
 . -] only. If there is any other charcter in the string, I have to print the
error message. No special characters like *, &, $ etc should be allowed.

Example:
$code=Hello*Hi

$code=567$fg

$code=@ghyt

For each of the above, I want to print error message.

Is there any easy way of doing it using regular expressions?

Regards,
Vertica





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

Date: Mon, 25 Oct 2004 10:37:35 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Regular expressions to find the presence of special characters
Message-Id: <PH4fd.1139$dW.528@trnddc08>

Vertica Garg wrote:
> I am trying to validate that the string contains characters [A-Z a-z
> 0-9 / . -] only. If there is any other charcter in the string, I have
> to print the error message. No special characters like *, &, $ etc
> should be allowed.

Ask the negated question: You got an error condition if your string contain 
any character _not_ in that class.

    [^A-Z a-z0-9 / . -]

Unfortunately the doc page entry is well hidden way down in "perldoc 
perlre":

    You can specify a character class, by enclosing a list of characters in
    "[]", which will match any one character from the list. If the first
    character after the "[" is "^", the class matches any character not in
    the list.

jue 




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

Date: Mon, 25 Oct 2004 12:35:05 +0100
From: "Vertica Garg" <vertica.garg@siemens.com>
Subject: Re: Regular expressions to find the presence of special characters
Message-Id: <cliodd$3pd$1@news.mch.sbs.de>

Thanks Jue..

But unfortunately, this does not work in all the cases.
e.g., if

$code="@KK.L";
if ($code=~m/[^A-Za-z0-9.]/)
{
     print "Found";
}

I expected the program to print "Found" but it does not.

Regards,
Vertica


"Jürgen Exner" <jurgenex@hotmail.com> wrote in message
news:PH4fd.1139$dW.528@trnddc08...
> Vertica Garg wrote:
> > I am trying to validate that the string contains characters [A-Z a-z
> > 0-9 / . -] only. If there is any other charcter in the string, I have
> > to print the error message. No special characters like *, &, $ etc
> > should be allowed.
>
> Ask the negated question: You got an error condition if your string
contain
> any character _not_ in that class.
>
>     [^A-Z a-z0-9 / . -]
>
> Unfortunately the doc page entry is well hidden way down in "perldoc
> perlre":
>
>     You can specify a character class, by enclosing a list of characters
in
>     "[]", which will match any one character from the list. If the first
>     character after the "[" is "^", the class matches any character not in
>     the list.
>
> jue
>
>




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

Date: 25 Oct 2004 13:44:13 +0200
From: Arndt Jonasson <do-not-use@invalid.net>
Subject: Re: Regular expressions to find the presence of special characters
Message-Id: <yzdvfcz3tv6.fsf@invalid.net>


"Vertica Garg" <vertica.garg@siemens.com> writes:
> But unfortunately, this does not work in all the cases.
> e.g., if
> 
> $code="@KK.L";
> if ($code=~m/[^A-Za-z0-9.]/)
> {
>      print "Found";
> }
> 
> I expected the program to print "Found" but it does not.

This may be platform-dependent, but on my machine, the same thing
happens. You need to output a newline as well. This will work:

$code="@KK.L";
if ($code=~m/[^A-Za-z0-9.]/)
{
     print "Found\n";
}


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

Date: 25 Oct 2004 11:56:54 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Regular expressions to find the presence of special characters
Message-Id: <clipm6$4st$3@mamenchi.zrz.TU-Berlin.DE>

Arndt Jonasson  <do-not-use@invalid.net> wrote in comp.lang.perl.misc:
> 
> "Vertica Garg" <vertica.garg@siemens.com> writes:
> > But unfortunately, this does not work in all the cases.
> > e.g., if
> > 
> > $code="@KK.L";
> > if ($code=~m/[^A-Za-z0-9.]/)
> > {
> >      print "Found";
> > }
> > 
> > I expected the program to print "Found" but it does not.
> 
> This may be platform-dependent, but on my machine, the same thing
> happens. You need to output a newline as well. This will work:
> 
> $code="@KK.L";
> if ($code=~m/[^A-Za-z0-9.]/)
> {
>      print "Found\n";
> }

Without "strinct" and "warnings", Perl will silently interpolate the
(empty) package variable "@LL", so the result is ".L".  That doesn't
match.  Try '@LL.L' instead.

Anno


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

Date: Mon, 25 Oct 2004 13:44:27 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Regular expressions to find the presence of special characters
Message-Id: <2u48aiF22h16sU1@uni-berlin.de>

Vertica Garg wrote:
> Thanks Jue..
> 
> But unfortunately, this does not work in all the cases.
> e.g., if
> 
> $code="@KK.L";
> if ($code=~m/[^A-Za-z0-9.]/)
> {
>      print "Found";
> }
> 
> I expected the program to print "Found" but it does not.

Enable strictures and warnings to have Perl help you prevent such mistakes!

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Mon, 25 Oct 2004 12:27:58 -0000
From: Greg Bacon <gbacon@hiwaay.net>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <10npsae1tn85o52@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 18 Oct 2004 13:25:20 GMT and ending at
25 Oct 2004 12:06:10 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) 2004 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com
faq\@(?:.*\.)?denver\.pm\.org
comdog\@panix\.com

Totals
======

Posters:  174
Articles: 789 (268 with cutlined signatures)
Threads:  124
Volume generated: 1533.0 kb
    - headers:    746.1 kb (13,388 lines)
    - bodies:     747.4 kb (23,920 lines)
    - original:   464.1 kb (16,057 lines)
    - signatures: 38.8 kb (780 lines)

Original Content Rating: 0.621

Averages
========

Posts per poster: 4.5
    median: 2.0 posts
    mode:   1 post - 83 posters
    s:      7.8 posts
Posts per thread: 6.4
    median: 4.0 posts
    mode:   1 post - 24 threads
    s:      7.3 posts
Message size: 1989.6 bytes
    - header:     968.3 bytes (17.0 lines)
    - body:       970.0 bytes (30.3 lines)
    - original:   602.3 bytes (20.4 lines)
    - signature:  50.3 bytes (1.0 lines)

Top 20 Posters by Number of Posts
=================================

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

   57   127.3 ( 50.4/ 69.3/ 50.6)  tadmc@augustmail.com
   52    84.1 ( 52.5/ 31.5/ 25.7)  "daniel kaplan" <nospam@nospam.com>
   38    74.4 ( 34.8/ 39.5/ 21.6)  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
   27    47.8 ( 20.5/ 21.2/ 14.1)  Michele Dondi <bik.mido@tiscalinet.it>
   25    44.6 ( 19.0/ 25.6/  8.6)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   24    54.7 ( 23.9/ 26.7/ 24.7)  abigail@abigail.nl
   22    51.6 ( 30.8/ 18.6/ 13.7)  Sherm Pendley <spamtrap@dot-app.org>
   19    38.5 ( 16.0/ 18.1/  9.9)  Ben Morrow <usenet@morrow.me.uk>
   18    46.4 ( 19.3/ 27.1/ 17.2)  lesley_b_linux@yahoo.co.yuk
   18    26.1 ( 15.6/  9.4/  4.1)  Gunnar Hjalmarsson <noreply@gunnar.cc>
   18    34.7 ( 18.2/ 16.3/  9.3)  "Paul Lalli" <mritty@gmail.com>
   17    38.3 ( 21.2/ 17.1/  8.4)  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
   17    31.5 ( 16.4/ 15.0/  9.6)  "Jürgen Exner" <jurgenex@hotmail.com>
   17    28.8 ( 15.2/ 13.2/  7.4)  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
   16    33.8 ( 18.5/ 15.3/ 11.0)  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
   13    25.0 ( 13.8/ 11.2/  6.7)  "Matt Garrish" <matthew.garrish@sympatico.ca>
   12    31.8 ( 13.0/ 18.8/  7.6)  Brian McCauley <nobull@mail.com>
   12    21.4 ( 10.9/ 10.5/  4.3)  Uri Guttman <uguttman@athenahealth.com>
   11    28.2 ( 10.8/ 14.9/  8.9)  Uri Guttman <uri@stemsystems.com>
   11    21.3 (  7.3/ 14.0/  7.4)  ioneabu@yahoo.com

These posters accounted for 56.3% of all articles.

Top 20 Posters by Number of Followups
=====================================

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

       54   127.3 ( 50.4/ 69.3/ 50.6)  tadmc@augustmail.com
       41    84.1 ( 52.5/ 31.5/ 25.7)  "daniel kaplan" <nospam@nospam.com>
       36    74.4 ( 34.8/ 39.5/ 21.6)  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
       26    47.8 ( 20.5/ 21.2/ 14.1)  Michele Dondi <bik.mido@tiscalinet.it>
       25    44.6 ( 19.0/ 25.6/  8.6)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
       24    54.7 ( 23.9/ 26.7/ 24.7)  abigail@abigail.nl
       22    51.6 ( 30.8/ 18.6/ 13.7)  Sherm Pendley <spamtrap@dot-app.org>
       19    38.5 ( 16.0/ 18.1/  9.9)  Ben Morrow <usenet@morrow.me.uk>
       18    26.1 ( 15.6/  9.4/  4.1)  Gunnar Hjalmarsson <noreply@gunnar.cc>
       17    28.8 ( 15.2/ 13.2/  7.4)  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
       17    31.5 ( 16.4/ 15.0/  9.6)  "Jürgen Exner" <jurgenex@hotmail.com>
       17    38.3 ( 21.2/ 17.1/  8.4)  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
       17    34.7 ( 18.2/ 16.3/  9.3)  "Paul Lalli" <mritty@gmail.com>
       17    46.4 ( 19.3/ 27.1/ 17.2)  lesley_b_linux@yahoo.co.yuk
       16    33.8 ( 18.5/ 15.3/ 11.0)  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
       13    25.0 ( 13.8/ 11.2/  6.7)  "Matt Garrish" <matthew.garrish@sympatico.ca>
       12    31.8 ( 13.0/ 18.8/  7.6)  Brian McCauley <nobull@mail.com>
       12    21.4 ( 10.9/ 10.5/  4.3)  Uri Guttman <uguttman@athenahealth.com>
       11    28.2 ( 10.8/ 14.9/  8.9)  Uri Guttman <uri@stemsystems.com>
       10    21.3 (  7.3/ 14.0/  7.4)  ioneabu@yahoo.com

These posters accounted for 61.1% of all followups.

Top 20 Posters by Volume
========================

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

 127.3 ( 50.4/ 69.3/ 50.6)     57  tadmc@augustmail.com
  84.1 ( 52.5/ 31.5/ 25.7)     52  "daniel kaplan" <nospam@nospam.com>
  74.4 ( 34.8/ 39.5/ 21.6)     38  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
  54.7 ( 23.9/ 26.7/ 24.7)     24  abigail@abigail.nl
  51.6 ( 30.8/ 18.6/ 13.7)     22  Sherm Pendley <spamtrap@dot-app.org>
  47.8 ( 20.5/ 21.2/ 14.1)     27  Michele Dondi <bik.mido@tiscalinet.it>
  46.4 ( 19.3/ 27.1/ 17.2)     18  lesley_b_linux@yahoo.co.yuk
  44.6 ( 19.0/ 25.6/  8.6)     25  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
  38.5 ( 16.0/ 18.1/  9.9)     19  Ben Morrow <usenet@morrow.me.uk>
  38.3 ( 21.2/ 17.1/  8.4)     17  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
  34.7 ( 18.2/ 16.3/  9.3)     18  "Paul Lalli" <mritty@gmail.com>
  33.8 ( 18.5/ 15.3/ 11.0)     16  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
  31.8 ( 13.0/ 18.8/  7.6)     12  Brian McCauley <nobull@mail.com>
  31.5 ( 16.4/ 15.0/  9.6)     17  "Jürgen Exner" <jurgenex@hotmail.com>
  28.8 ( 15.2/ 13.2/  7.4)     17  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
  28.2 ( 10.8/ 14.9/  8.9)     11  Uri Guttman <uri@stemsystems.com>
  26.1 ( 15.6/  9.4/  4.1)     18  Gunnar Hjalmarsson <noreply@gunnar.cc>
  25.4 ( 12.1/ 13.4/  9.4)     10  "nntp" <nntp@rogers.com>
  25.0 ( 13.8/ 11.2/  6.7)     13  "Matt Garrish" <matthew.garrish@sympatico.ca>
  21.4 ( 10.9/ 10.5/  4.3)     12  Uri Guttman <uguttman@athenahealth.com>

These posters accounted for 58.3% of the total volume.

Top 20 Posters by Volume of Original Content (min. ten posts)
=============================================================

        (kb)
Posts   orig  Address
-----  -----  -------

   57   50.6  tadmc@augustmail.com
   52   25.7  "daniel kaplan" <nospam@nospam.com>
   24   24.7  abigail@abigail.nl
   38   21.6  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
   18   17.2  lesley_b_linux@yahoo.co.yuk
   27   14.1  Michele Dondi <bik.mido@tiscalinet.it>
   22   13.7  Sherm Pendley <spamtrap@dot-app.org>
   16   11.0  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
   19    9.9  Ben Morrow <usenet@morrow.me.uk>
   17    9.6  "Jürgen Exner" <jurgenex@hotmail.com>
   10    9.4  "nntp" <nntp@rogers.com>
   18    9.3  "Paul Lalli" <mritty@gmail.com>
   11    8.9  Uri Guttman <uri@stemsystems.com>
   25    8.6  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>
   17    8.4  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
   12    7.6  Brian McCauley <nobull@mail.com>
   17    7.4  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
   11    7.4  ioneabu@yahoo.com
   13    6.7  "Matt Garrish" <matthew.garrish@sympatico.ca>
   12    4.3  Uri Guttman <uguttman@athenahealth.com>

These posters accounted for 59.5% of the original volume.

Top 20 Posters by OCR (minimum of ten posts)
============================================

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

0.926  ( 24.7 / 26.7)     24  abigail@abigail.nl
0.816  ( 25.7 / 31.5)     52  "daniel kaplan" <nospam@nospam.com>
0.740  ( 13.7 / 18.6)     22  Sherm Pendley <spamtrap@dot-app.org>
0.731  ( 50.6 / 69.3)     57  tadmc@augustmail.com
0.718  ( 11.0 / 15.3)     16  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
0.701  (  9.4 / 13.4)     10  "nntp" <nntp@rogers.com>
0.664  ( 14.1 / 21.2)     27  Michele Dondi <bik.mido@tiscalinet.it>
0.643  (  9.6 / 15.0)     17  "Jürgen Exner" <jurgenex@hotmail.com>
0.636  ( 17.2 / 27.1)     18  lesley_b_linux@yahoo.co.yuk
0.600  (  6.7 / 11.2)     13  "Matt Garrish" <matthew.garrish@sympatico.ca>
0.598  (  8.9 / 14.9)     11  Uri Guttman <uri@stemsystems.com>
0.567  (  9.3 / 16.3)     18  "Paul Lalli" <mritty@gmail.com>
0.563  (  7.4 / 13.2)     17  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
0.546  ( 21.6 / 39.5)     38  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
0.544  (  9.9 / 18.1)     19  Ben Morrow <usenet@morrow.me.uk>
0.527  (  7.4 / 14.0)     11  ioneabu@yahoo.com
0.493  (  8.4 / 17.1)     17  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
0.435  (  4.1 /  9.4)     18  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.408  (  4.3 / 10.5)     12  Uri Guttman <uguttman@athenahealth.com>
0.405  (  7.6 / 18.8)     12  Brian McCauley <nobull@mail.com>

Bottom 20 Posters by OCR (minimum of ten posts)
===============================================

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

0.816  ( 25.7 / 31.5)     52  "daniel kaplan" <nospam@nospam.com>
0.740  ( 13.7 / 18.6)     22  Sherm Pendley <spamtrap@dot-app.org>
0.731  ( 50.6 / 69.3)     57  tadmc@augustmail.com
0.718  ( 11.0 / 15.3)     16  "Alan J. Flavell" <flavell@ph.gla.ac.uk>
0.701  (  9.4 / 13.4)     10  "nntp" <nntp@rogers.com>
0.664  ( 14.1 / 21.2)     27  Michele Dondi <bik.mido@tiscalinet.it>
0.643  (  9.6 / 15.0)     17  "Jürgen Exner" <jurgenex@hotmail.com>
0.636  ( 17.2 / 27.1)     18  lesley_b_linux@yahoo.co.yuk
0.600  (  6.7 / 11.2)     13  "Matt Garrish" <matthew.garrish@sympatico.ca>
0.598  (  8.9 / 14.9)     11  Uri Guttman <uri@stemsystems.com>
0.567  (  9.3 / 16.3)     18  "Paul Lalli" <mritty@gmail.com>
0.563  (  7.4 / 13.2)     17  "A. Sinan Unur" <1usa@llenroc.ude.invalid>
0.546  ( 21.6 / 39.5)     38  "A. Sinan Unur" <usa1@llenroc.ude.invalid>
0.544  (  9.9 / 18.1)     19  Ben Morrow <usenet@morrow.me.uk>
0.527  (  7.4 / 14.0)     11  ioneabu@yahoo.com
0.493  (  8.4 / 17.1)     17  Jon Ericson <Jon.Ericson@jpl.nasa.gov>
0.435  (  4.1 /  9.4)     18  Gunnar Hjalmarsson <noreply@gunnar.cc>
0.408  (  4.3 / 10.5)     12  Uri Guttman <uguttman@athenahealth.com>
0.405  (  7.6 / 18.8)     12  Brian McCauley <nobull@mail.com>
0.334  (  8.6 / 25.6)     25  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>

21 posters (12%) had at least ten posts.

Top 20 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   52  list vs array
   27  regex to clean path
   26  How do I print http 404 not found header?
   26  Calling a perl script from an html doc
   25  printing to web browser
   23  perl to english
   23  options to shrink-wrap a perl script
   20  Practical Extraction Recording Language
   17  arrays of arrays question
   16  Net::POP3 Install
   16  copying files
   16  is it possible?
   15  foreach vs. for
   14  Mail::Sender - Attaching output from pipe
   13  HTTP Proxy via HTTP Layer by Perl?
   13  Regular Expression for HTML Tags and Special Characters
   13  FAQ: What's a closure?
   13  How to redefine warnings on recursion level
   13  deciphering emails in PERL
   11  Lowest array value given index

These threads accounted for 49.7% of all articles.

Top 20 Threads by Volume
========================

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

 103.9 ( 60.0/ 42.1/ 29.2)     52  list vs array
  62.0 ( 25.4/ 33.0/ 22.0)     27  regex to clean path
  57.3 ( 30.3/ 26.2/ 13.6)     26  How do I print http 404 not found header?
  49.2 ( 24.7/ 23.5/ 13.9)     26  Calling a perl script from an html doc
  43.2 ( 18.9/ 22.9/ 11.2)     23  perl to english
  42.0 ( 22.9/ 17.9/ 10.1)     23  options to shrink-wrap a perl script
  37.2 ( 18.1/ 17.9/ 12.8)     20  Practical Extraction Recording Language
  36.8 ( 15.2/ 21.1/ 14.0)     13  HTTP Proxy via HTTP Layer by Perl?
  36.0 ( 23.1/ 11.7/  6.6)     25  printing to web browser
  34.9 ( 16.9/ 17.6/ 12.9)     17  arrays of arrays question
  33.8 (  1.5/ 32.3/ 32.3)      2  Posting Guidelines for comp.lang.perl.misc ($Revision: 1.5 $)
  31.6 ( 16.9/ 13.7/  5.6)     16  is it possible?
  29.4 ( 17.2/ 11.8/  8.7)     16  Net::POP3 Install
  27.9 ( 13.9/ 12.8/  7.8)     16  copying files
  27.7 ( 10.0/ 17.3/  9.4)      9  Any suggestions?
  27.2 (  9.1/ 17.4/  7.3)     11  Lowest array value given index
  26.6 ( 13.2/ 12.8/  7.9)     13  Regular Expression for HTML Tags and Special Characters
  26.2 (  6.0/ 19.8/ 12.3)      6  backup utility for remote hosts
  26.1 ( 14.3/ 11.3/  6.6)     13  How to redefine warnings on recursion level
  26.1 ( 15.0/  9.9/  5.7)     15  foreach vs. for

These threads accounted for 51.2% of the total volume.

Top 20 Threads by OCR (minimum of ten posts)
============================================

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

0.787  (  8.1/  10.3)     10  m/(\/\*[.|\n]*\*\/)/ to try and match C-Style multiline comments. No matches found.
0.769  (  7.1/   9.2)     13  deciphering emails in PERL
0.737  (  8.7/  11.8)     16  Net::POP3 Install
0.733  ( 12.9/  17.6)     17  arrays of arrays question
0.717  (  5.5/   7.7)     10  ping net pop3
0.714  ( 12.8/  17.9)     20  Practical Extraction Recording Language
0.692  ( 29.2/  42.1)     52  list vs array
0.666  ( 22.0/  33.0)     27  regex to clean path
0.661  ( 14.0/  21.1)     13  HTTP Proxy via HTTP Layer by Perl?
0.618  (  7.9/  12.8)     13  Regular Expression for HTML Tags and Special Characters
0.606  (  7.8/  12.8)     16  copying files
0.590  ( 13.9/  23.5)     26  Calling a perl script from an html doc
0.586  (  6.6/  11.3)     13  How to redefine warnings on recursion level
0.574  (  2.1/   3.6)     10  How do I use " and \n in @ARGV[1]?
0.570  (  5.7/   9.9)     15  foreach vs. for
0.565  ( 10.1/  17.9)     23  options to shrink-wrap a perl script
0.563  (  6.6/  11.7)     25  printing to web browser
0.548  (  2.5/   4.6)     13  FAQ: What's a closure?
0.518  ( 13.6/  26.2)     26  How do I print http 404 not found header?
0.502  (  4.9/   9.7)     10  using range gives warning

Bottom 20 Threads by OCR (minimum of ten posts)
===============================================

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

0.714  ( 12.8 / 17.9)     20  Practical Extraction Recording Language
0.692  ( 29.2 / 42.1)     52  list vs array
0.666  ( 22.0 / 33.0)     27  regex to clean path
0.661  ( 14.0 / 21.1)     13  HTTP Proxy via HTTP Layer by Perl?
0.618  (  7.9 / 12.8)     13  Regular Expression for HTML Tags and Special Characters
0.606  (  7.8 / 12.8)     16  copying files
0.590  ( 13.9 / 23.5)     26  Calling a perl script from an html doc
0.586  (  6.6 / 11.3)     13  How to redefine warnings on recursion level
0.574  (  2.1 /  3.6)     10  How do I use " and \n in @ARGV[1]?
0.570  (  5.7 /  9.9)     15  foreach vs. for
0.565  ( 10.1 / 17.9)     23  options to shrink-wrap a perl script
0.563  (  6.6 / 11.7)     25  printing to web browser
0.548  (  2.5 /  4.6)     13  FAQ: What's a closure?
0.518  ( 13.6 / 26.2)     26  How do I print http 404 not found header?
0.502  (  4.9 /  9.7)     10  using range gives warning
0.488  (  3.8 /  7.8)     14  Mail::Sender - Attaching output from pipe
0.487  ( 11.2 / 22.9)     23  perl to english
0.432  (  5.2 / 12.1)     10  eval function
0.420  (  7.3 / 17.4)     11  Lowest array value given index
0.408  (  5.6 / 13.7)     16  is it possible?

25 threads (20%) had at least ten posts.

Top 4 Targets for Crossposts
============================

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

       6  microsoft.public.dotnet.framework.aspnet.webcontrols
       5  comp.lang.perl.modules
       3  comp.lang.perl
       2  comp.lang.php

Top 12 Crossposters
===================

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

       2  "Kelvin" <thefatcat28@hotmail.com>
       2  tadmc@augustmail.com
       2  Gerhard M <notruf_1102003@yahoo.de>
       2  Tore Aursand <toreau@gmail.com>
       1  "Jürgen Exner" <jurgenex@hotmail.com>
       1  "John Postlethwait" <john.postlethwait@gmail.com>
       1  abigail@abigail.nl
       1  Gunnar Hjalmarsson <noreply@gunnar.cc>
       1  bruno modulix <onurb@xiludom.gro>
       1  sabinosa <maurof78@aol.com>
       1  ioneabu@yahoo.com
       1  Vijai Kalyan <vijai.kalyan@gmail.com>


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

Date: 25 Oct 2004 08:16:02 GMT
From: Sam Holden <sholden@flexal.cs.usyd.edu.au>
Subject: Re: where download web application source code examples ?
Message-Id: <slrncnpdi2.o26.sholden@flexal.cs.usyd.edu.au>

On Mon, 25 Oct 2004 16:35:16 +1000, Gregory Toomey <nospam@bigpond.com> wrote:
> Sam Holden wrote:
>
>> On Mon, 25 Oct 2004 15:45:45 +1000, Gregory Toomey <nospam@bigpond.com>
>> wrote:
>>> Jasper wrote:
>>>
>>>> Hi building an ecommerce website here, is there anywhere on the web
>>>> one can download the perl source for a basic one ?  Its probably a
>>>> search problem but I cant find any..
>>>> 
>>>> thanks !
>>>> 
>>>> Jasper
>>>
>>> Most are in php but you can try
>>> http://www.google.com/search?ie=UTF8&q=perl%20shopping%20cart
>>>
>>> I'm writing a shopping cart of my own at the moment, & you get lots of
>>> flexibility with Perl. For example, I've got a C program that prints the
>>> html headers/logo/sidebar menu to stdout in about 1 msec (I want a speedy
>>> site like www.eyo.com.au ), and them Perl generates the rest of the html.
>>> While this may be possible with php, its easy & logical in Perl.
>> 
>> And the time taken to fork a process doesn't swamp any speed
>> benefit the C program might bring?
>> 
>
> - The Perl part takes around 160 msec (140 msec for compilation, 20 msec
> writing to stdout) & includes html whitespace removal

So the C program isn't being run from the perl script then? Since
otherwise it'd take 140 msec before it got started anyway.

Whatever is doing "run C program, run perl program" will be
able to do "run C program, run php program" or 
"run C program, run python program". So I can't see how
perl is involved in making it "easy & logical".

-- 
Sam Holden


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

Date: Mon, 25 Oct 2004 20:08:11 +1000
From: Gregory Toomey <nospam@bigpond.com>
Subject: Re: where download web application source code examples ?
Message-Id: <2u41kfF20qhqhU1@uni-berlin.de>

Sam Holden wrote:

> On Mon, 25 Oct 2004 16:35:16 +1000, Gregory Toomey <nospam@bigpond.com>
> wrote:
>> Sam Holden wrote:
>>
>>> On Mon, 25 Oct 2004 15:45:45 +1000, Gregory Toomey <nospam@bigpond.com>
>>> wrote:
>>>> Jasper wrote:
>>>>
>>>>> Hi building an ecommerce website here, is there anywhere on the web
>>>>> one can download the perl source for a basic one ?  Its probably a
>>>>> search problem but I cant find any..
>>>>> 
>>>>> thanks !
>>>>> 
>>>>> Jasper
>>>>
>>>> Most are in php but you can try
>>>> http://www.google.com/search?ie=UTF8&q=perl%20shopping%20cart
>>>>
>>>> I'm writing a shopping cart of my own at the moment, & you get lots of
>>>> flexibility with Perl. For example, I've got a C program that prints
>>>> the html headers/logo/sidebar menu to stdout in about 1 msec (I want a
>>>> speedy site like www.eyo.com.au ), and them Perl generates the rest of
>>>> the html. While this may be possible with php, its easy & logical in
>>>> Perl.
>>> 
>>> And the time taken to fork a process doesn't swamp any speed
>>> benefit the C program might bring?
>>> 
>>
>> - The Perl part takes around 160 msec (140 msec for compilation, 20 msec
>> writing to stdout) & includes html whitespace removal
> 
> So the C program isn't being run from the perl script then? Since
> otherwise it'd take 140 msec before it got started anyway.
> 
> Whatever is doing "run C program, run perl program" will be
> able to do "run C program, run php program" or
> "run C program, run python program". So I can't see how
> perl is involved in making it "easy & logical".
> 

Yes, there is another small wrapper around this, which add a few msec. I may
roll this into the other C program.

The "easy and logical" bit is in comparison to the alternatives - mod Perl,
php, Java servlets (yuk - slow). The easy bit is that it can be run from
the command line, which can't be underestimated. Tweaking/testing is easy
if you can run you cgi from the command line. 

gtoomey


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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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 7301
***************************************


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