[21959] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4181 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 26 14:05:38 2002

Date: Tue, 26 Nov 2002 11:05:10 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 26 Nov 2002     Volume: 10 Number: 4181

Today's topics:
    Re: A little help on a regex expression please <jane.doe@acme.com>
    Re: IP and Host differences <robertbu@hotmail.com>
    Re: mozilla & netscape.  incapable of CSS word-break ? (Helgi Briem)
    Re: mozilla & netscape.  incapable of CSS word-break ? (Tad McClellan)
        pattern matching a file path <nospam@nospam.org>
    Re: pattern matching a file path <Graham.T.Wood@oracle.com>
    Re: pattern matching a file path (Tad McClellan)
    Re: pattern matching a file path (Tad McClellan)
    Re: pattern matching a file path <nospam@nospam.org>
    Re: pattern matching a file path <nospam@nospam.org>
    Re: rounding numbers <BROWNHIK@Syntegra.Bt.Co.Uk>
    Re: rounding numbers (Tad McClellan)
    Re: Sending errors to named file as well as stderr <william.cardwell@ericsson.com>
    Re: Sending errors to named file as well as stderr (Tad McClellan)
        splice() is fast when shrinking and slow when growing a (Patrick Ditchen)
    Re: splitting with positive look-behind <pinyaj@rpi.edu>
    Re: splitting with positive look-behind <pinyaj@rpi.edu>
    Re: Two pppd's one after the other... <bart.lateur@pandora.be>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Tue, 26 Nov 2002 17:44:02 +0100
From: Jane Doe <jane.doe@acme.com>
Subject: Re: A little help on a regex expression please
Message-Id: <1597uu0862g191nenc5vv5nj10tvjmumu6@4ax.com>

On Tue, 26 Nov 2002 02:07:47 GMT, "robertbu" <robertbu@hotmail.com>
wrote:
>If you just want to patch up what you have given the input below:
>
>s/^.*size="4">(<strong>)?([^>]+)(<\/strong>)?<\/font><\/p>/$2/i;

Thx much to you and everyone else in this thread. I got this thing
done, and will look at the packages available to parse pages
automatically.

Thx again
JD.


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

Date: Tue, 26 Nov 2002 17:22:47 GMT
From: "robertbu" <robertbu@hotmail.com>
Subject: Re: IP and Host differences
Message-Id: <H5OE9.1267$Sb.364@nwrddc04.gnilink.net>


<news@roaima.freeserve.co.uk> wrote in message
news:vp40sa.71m.ln@moldev.cmagroup.co.uk...
>
> "Marc Rasell" <mrasell@hotmail.com> wrote in message
news:df4cdf85.0211260400.389d4269@posting.google.com...
> > I'm working on a hit counter. In the logs I record date, IP and Host.
> > Sometimes I can get the same IP and Date with a different Host name.
>
> > Why does the Host change?
>
> robertbu <robertbu@hotmail.com> wrote:
> > The requests are probably from private network, and what you are seeing
is
> > the gateway address.
>
> Yes. For example, AOL has multiple gateways to the Internet, and each of
> any AOL user's request can (and does) emmanate from any of the gateways.
>
> > For example, there are four computers in our
> > household with unique internal IP addresses all sharing a single
external IP
> > address.
>
> No. In this case all four internal IP addresses will appear to the web
> server as the single external IP address.
>

Correct.  My network knowledge is a little thin, but isn't that what the OP
was seeing:   "same IP and Date with a different Host name."

== Rob ==




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

Date: Tue, 26 Nov 2002 16:15:17 GMT
From: helgi@decode.is (Helgi Briem)
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <3de39d10.3589390730@news.cis.dfn.de>

On Tue, 26 Nov 2002 15:24:57 GMT, Andras Malatinszky
<nobody@dev.null> wrote:

>What does TOFU mean here? I hope it's not a disparaging reference 
>to the  OP's East Asian sounding name :-)

top-post
n. v. 

[common] To put the original portion of an email or Usenet
response before the quoted part, as opposed to the more
logical sequence of quoted portion first with original
following. This term is generally used pejoratively with the
implication that the offending person is a newbie, a
Microsoft addict (Microsoft mail tools produce a similar
format by default), or a garden-variety idiot. One major
problem with top-posting is that people who do it all too
frequently quote the entire parent message rather than
trimming it down to those portions relevent to their reply -
this makes threads bulky and unnecessarily difficult to read
and arouses the righteous ire of experienced Internet
residents (this style is called "TOFU" for "text over,
fullquote under, or sometimes "jeopardy-style quotting").
Another problem is that top-posters often word their replies
on the assumption that you just read the previous message,
even though their perversity has put it further down the
page than you have yet read. Oppose bottom-post. 

-- 
Regards, Helgi Briem
helgi AT decode DOT is

                           A: Top posting
                           Q: What is the most irritating thing on Usenet?
                                           - "Gordon" on apihna


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

Date: Tue, 26 Nov 2002 11:06:59 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: mozilla & netscape.  incapable of CSS word-break ?
Message-Id: <slrnau7ahj.47d.tadmc@magna.augustmail.com>

Andras Malatinszky <nobody@dev.null> wrote:
> Tad McClellan wrote:
>> Hyungjin Ahn <ahj6@hotmail.com> wrote TOFU:
> 
> 
> What does TOFU mean here? 


   http://www.tuxedo.org/~esr/jargon/html/entry/TOFU.html


> I hope it's not a disparaging reference to the 


It was a disparaging reference to the OP's (lack of) quoting style.


> OP's East Asian sounding name :-)


Heavens no!

My home life would take a serious turn for the worse if I
engaged is such bigotry.

My wife is Asian.  :-)


[My guess is that the OP and my wife are the same Asian nationality.
 I eat kimchee.
]


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 26 Nov 2002 11:41:26 -0500
From: "Christian Caron" <nospam@nospam.org>
Subject: pattern matching a file path
Message-Id: <as087n$hen2@nrn2.NRCan.gc.ca>

Hi,

I'm trying to pattern match members of an array to make sure it contains
always the same kind of information. Here are the three different "legal"
type of information it should contain:

403,1,URL,/my_errors/http_errors.pl
402,*,URL,/your_errors/http_errors.pl
401,14,URL,/his_errors/http_errors.pl

#!/usr/local/bin/perl -w
use strict;

my @error_types = ("403,1,URL,/my_errors/http_errors.pl",
"402,*,URL,/your_errors/http_errors.pl",
"401,14,URL,/his_errors/http_errors.pl",
"400,14,URL,/erro=rs/http_errors.pl"); # this one is not legal, it should
trigger $bad_data because of the "="

my $bad_data = "NO";

foreach (@error_types) {
 if (! m#\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+#) {          # the last part can
only contain ( a-zA-Z | 0-9 | _ | . | / )
  $bad_data = "YES";
 }
}

if ($bad_data eq "YES") {
 print "Ahhhhhhh! Wrong data!\n";
}
else {
 print "Everything is good.\n";
}

__END__

I thought it would work, but it doesn't catch the "=" in
"400,14,URL,/erro=rs/http_errors.pl"...

Someone see what's wrong?

Christian




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

Date: Tue, 26 Nov 2002 17:31:13 +0000
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: pattern matching a file path
Message-Id: <3DE3AFE0.11519B14@oracle.com>

Christian Caron wrote:
<snip>

> my @error_types = ("403,1,URL,/my_errors/http_errors.pl",
> "402,*,URL,/your_errors/http_errors.pl",
> "401,14,URL,/his_errors/http_errors.pl",
> "400,14,URL,/erro=rs/http_errors.pl"); # this one is not legal, it should
> trigger $bad_data because of the "="
>

<snip>

>
>  if (! m#\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+#) {          # the last part can
> only contain ( a-zA-Z | 0-9 | _ | . | / )
>

<snip again>

> I thought it would work, but it doesn't catch the "=" in
> "400,14,URL,/erro=rs/http_errors.pl"...
>
> Someone see what's wrong?

Your final part:      [\w_./]+
will match any number of any word character or _ or any character or a / .  You
forgot to escape the "." to make it literal so it is matching any character
instead hence the match for "=".

Graham



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

Date: Tue, 26 Nov 2002 11:32:37 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: pattern matching a file path
Message-Id: <slrnau7c1l.47d.tadmc@magna.augustmail.com>

Christian Caron <nospam@nospam.org> wrote:

> I'm trying to pattern match members of an array to make sure it contains
> always the same kind of information. 

> #!/usr/local/bin/perl -w
> use strict;


A good start. A very good start.


> "400,14,URL,/erro=rs/http_errors.pl"); # this one is not legal, it should
   ^^^^^^^^^^^^^^^^

Your pattern match succeeds on that much of the string.


>  if (! m#\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+#) {          # the last part can


> I thought it would work, but it doesn't catch the "=" in
> "400,14,URL,/erro=rs/http_errors.pl"...
> 
> Someone see what's wrong?


You need some anchors.

The usual idiom for validating data is:

   anchor the beginning
   anchor the end
   write a pattern in between that accounts for everything that
      you want to allow


    if (! m#^\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+$#) {
            ^                                  ^
            ^                                  ^

but I would probably write it this way instead:

    unless (m#^\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+$#) {


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 26 Nov 2002 12:01:45 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: pattern matching a file path
Message-Id: <slrnau7do9.4iv.tadmc@magna.augustmail.com>

Graham Wood <Graham.T.Wood@oracle.com> wrote:
> Christian Caron wrote:

>>  if (! m#\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+#) {          # the last part can


> Your final part:      [\w_./]+
> will match any number of any word character or _ or any character or a / .  


No it won't.

(and the underscore is redundant, it is already included in \w)


> You
> forgot to escape the "." to make it literal so it is matching any character


dot is not meta in a character class, there is no need to escape it.


> instead hence the match for "=".


His pattern does NOT match the equals character.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 26 Nov 2002 13:38:46 -0500
From: "Christian Caron" <nospam@nospam.org>
Subject: Re: pattern matching a file path
Message-Id: <as0f4h$rcp4@nrn2.NRCan.gc.ca>


"Graham Wood" <Graham.T.Wood@oracle.com> wrote in message
news:3DE3AFE0.11519B14@oracle.com...
> Christian Caron wrote:
> <snip>
>
> Your final part:      [\w_./]+
> will match any number of any word character or _ or any character or a / .
You
> forgot to escape the "." to make it literal so it is matching any
character
> instead hence the match for "=".
>
> Graham
>

Just so you know, a "." inside [] is seen as a dot, not as a "any
characters".

Thanks!

Christian




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

Date: Tue, 26 Nov 2002 13:46:16 -0500
From: "Christian Caron" <nospam@nospam.org>
Subject: Re: pattern matching a file path
Message-Id: <as0fhp$rcn4@nrn2.NRCan.gc.ca>


"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrnau7c1l.47d.tadmc@magna.augustmail.com...
> Christian Caron <nospam@nospam.org> wrote:
>
> > I'm trying to pattern match members of an array to make sure it contains
> > always the same kind of information.
>
> The usual idiom for validating data is:
>
>    anchor the beginning
>    anchor the end
>    write a pattern in between that accounts for everything that
>       you want to allow
>
>
>     if (! m#^\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+$#) {
>             ^                                  ^
>             ^                                  ^
>
> but I would probably write it this way instead:
>
>     unless (m#^\d{3},(\d{1,2}|\*{1}),URL,[\w_./]+$#) {
>

English is not my first language and it shows. I read something about that
while trying to figure out what was wrong.

From O'Reilly's Programming Perl:

"Rule 1. The Engine tries to match as far left in the string as it can, such
that the entire regular expression matches under Rule 2.

In order to do this, its first choice is to start just before the first
character (it could have started anywhere), and to try to match the entire
regular expression at that point. The regular expression matches if and only
if Engine reaches the end of the regular expression before it runs off the
end of the string. If it matches, it quits immediately - it doesn't keep
looking for a "better" match, even though the regular expression could match
in many different ways."

Very good to make mistakes, as it's easier to remember afterwards! ;-)

Thanks!

Christian




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

Date: Tue, 26 Nov 2002 17:05:39 -0000
From: "Kevin Brownhill" <BROWNHIK@Syntegra.Bt.Co.Uk>
Subject: Re: rounding numbers
Message-Id: <as0a14$s5u$1@pheidippides.axion.bt.co.uk>


"Andras Malatinszky" <nobody@dev.null> wrote in message
news:3DE399EB.3070408@dev.null...
>
>
> Kevin Brownhill wrote:
>
> > "Andras Malatinszky" <nobody@dev.null> wrote in message
> > news:3DE389F8.5070805@dev.null...
> >
> >>
> >>RC wrote:
> >>
> >>
> >>>does anyone know how to round numbers with lots of decimal places to a
> >>>certain amount. eg 2 decimal places or 0 decimal places
> >>>
> >>
> >>
> >>Use the printf() function. I'd explain how, but it is so much more
> >>eloquently done in the perlfaq4 manpage. (You probably missed it when
> >>you typed
> >>
> >>perldoc -q round
> >>
> >>to check the FAQ, didn't you?)
> >>
> >>
> >>
> >
> > Surely printf() just prints the number in a certain format.
> >
> > To round the number to 2 places, use the following:
> >     $rounded = int($number * 100 + 0.5) / 100;
>
>
> I don't know about that, Kevin:
>
> for $number (42.213, 42.21, 42.2, 42, -17.231, -17.23, -17.2, -17) {
> my $rounded = int($number * 100 + 0.5) / 100;
> print "$number rounded to two decimals is $rounded\n";
> };
>
> 42.213 rounded to two decimals is 42.21
> 42.21 rounded to two decimals is 42.21
> 42.2 rounded to two decimals is 42.2
> 42 rounded to two decimals is 42
> -17.231 rounded to two decimals is -17.22
> -17.23 rounded to two decimals is -17.22
> -17.2 rounded to two decimals is -17.19
> -17 rounded to two decimals is -16.99
>
> You are doing well with the first two numbers, the next two answers are
> kinda borderline, then it's all downhill from there.
>
> I think you are better off with printf(), and if you want to do more
> than printing, you can always use sprintf():
>
> for $number (42.213, 42.21, 42.2, 42, -17.231, -17.23, -17.2, -17) {
> my $rounded = sprintf("%.2f", $number);
> print "$number rounded to two decimals is $rounded\n";
> };
>
> 42.213 rounded to two decimals is 42.21
> 42.21 rounded to two decimals is 42.21
> 42.2 rounded to two decimals is 42.20
> 42 rounded to two decimals is 42.00
> -17.231 rounded to two decimals is -17.23
> -17.23 rounded to two decimals is -17.23
> -17.2 rounded to two decimals is -17.20
> -17 rounded to two decimals is -17.00
>
>

I agree that it doesn't work for negative numbers, so sprintf() might be
better, although you are then converting the number into a string.

Don't agree that "42 rounded to two decimals is 42" is kinda borderline,
because that is the correct answer. You seem to be confusing the rounding of
the number with the displaying of the number.





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

Date: Tue, 26 Nov 2002 11:38:15 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: rounding numbers
Message-Id: <slrnau7cc7.47d.tadmc@magna.augustmail.com>

Kevin Brownhill <BROWNHIK@Syntegra.Bt.Co.Uk> wrote:
> "Andras Malatinszky" <nobody@dev.null> wrote in message
> news:3DE389F8.5070805@dev.null...
>> RC wrote:
>>
>> > does anyone know how to round numbers with lots of decimal places to a
>> > certain amount. eg 2 decimal places or 0 decimal places
>>
>>
>>
>> Use the printf() function. I'd explain how, but it is so much more
>> eloquently done in the perlfaq4 manpage.


> Surely printf() just prints the number in a certain format.
  ^^^^^^


You are surely wrong.

If you want to know what a function does, you read the docs
for that function.

   perldoc -f printf

says:

    Equivalent to "print FILEHANDLE sprintf(FORMAT, LIST)"

so you see what sprintf() does:

   perldoc -f sprintf

it clearly says the sprintf can round floating point numbers.


> To round the number to 2 places, use the following:
>     $rounded = int($number * 100 + 0.5) / 100;


Do not use that to round to 2 places.

It only works for "some" numbers.

sprintf() works for all numbers.


Please do not try to reanswer a FAQ, you are likely to get it
wrong, as you did here.

That increases confusion rather than decreasing it.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Tue, 26 Nov 2002 11:43:54 -0500
From: Will Cardwell <william.cardwell@ericsson.com>
Subject: Re: Sending errors to named file as well as stderr
Message-Id: <3DE3A4CA.4E776225@ericsson.com>



Steven May wrote:

>
> Placed at start of script or program, will catch errors
> that occur after it....
>
> $SIG{'__DIE__'} = $SIG{'__WARN__'} = sub {
>    my $error = shift;
>    chomp $error;
>    &print_to_file( $error ); # does what you'd think
>    print $error;
>    exit 0;
> };
>

Any idea why this didn't print my error?

I created this as a file "sigtest":

#!/usr/local/bin/perl
$SIG{'__DIE__'} = $SIG{'__WARN__'} = sub {
   my $error = shift;
   #  chomp $error;
   #  &print_to_file( $error ); # does what you'd think
   print "Error msg: $error";
   exit 0;
};
$x=1./0.;
print "The End\n";

 ...and executed it here:

bash$ $HOME/sigtest
Illegal division by zero at /usr2/home/euswmcl/sigtest line 9.
bash$

Regards,
Will




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

Date: Tue, 26 Nov 2002 11:47:45 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Sending errors to named file as well as stderr
Message-Id: <slrnau7cu1.47d.tadmc@magna.augustmail.com>

Will Cardwell <william.cardwell@ericsson.com> wrote:
> Steven May wrote:

>> Placed at start of script or program, will catch errors
>> that occur after it....


> Any idea why this didn't print my error?


Because the error did not occur "after it".


> I created this as a file "sigtest":
> 
> #!/usr/local/bin/perl
> $SIG{'__DIE__'} = $SIG{'__WARN__'} = sub {
>    my $error = shift;
>    #  chomp $error;
>    #  &print_to_file( $error ); # does what you'd think
        ^                           ^^^^^^^^^^^^^^^^^^^^^


or perhaps not what you think.

Do you know what the difference between that call and this one is?

   print_to_file( $error ); 

If not, see perlsub.pod to see what that ampersand does.

I doubt that you want the ampersand.


>    print "Error msg: $error";
>    exit 0;
> };


That happens at runtime.


> $x=1./0.;
> print "The End\n";
> 
> ...and executed it here:
> 
> bash$ $HOME/sigtest
> Illegal division by zero at /usr2/home/euswmcl/sigtest line 9.


The error was detected at compile time.[1]

Compile time occurs before runtime.

Put your signal handling code in a BEGIN block so that it
happens before you get to the error:

------------------
BEGIN {
$SIG{'__DIE__'} = $SIG{'__WARN__'} = sub {
   my $error = shift;
   #  chomp $error;
   #  &print_to_file( $error ); # does what you'd think
   print "Error msg: $error";
   exit 0;
};
}
------------------



[1] because the denominator is a constant. It would have worked
    as-is if you used a variable instead, because then the
    error could not be detected until runtime:

    my $denom = 0;
    my $x=1./$denom;

-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 26 Nov 2002 10:58:40 -0800
From: ditchen@web.de (Patrick Ditchen)
Subject: splice() is fast when shrinking and slow when growing an array. Why?
Message-Id: <8943921e.0211261058.7ba1f4@posting.google.com>

What exactly does splice() do with an array? I thougt, an array is a
list of pointers to skalar-values. After a splice()-command, Perl
should have to rebuild the whole list, no matter if shrinking or
growing. But when I test its behaviour, splice() with shrinking size
is done at once while splice() with growing size takes a lot of time.
Why doesn't Perl have to copy the array in the first case?


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

Date: Tue, 26 Nov 2002 11:13:35 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
To: joeri <jvandervloet@hotmail.com>
Subject: Re: splitting with positive look-behind
Message-Id: <Pine.A41.3.96.1021126110501.43982A-100000@vcmr-104.server.rpi.edu>

[posted & mailed]

On Tue, 26 Nov 2002, joeri wrote:

>$text = "HISTORY OF PRESENT ILLNESS: Mr. x, M.D. is an 83-year-old man with
>past medical history inc. hypertension, congestive heart failure. Atrial
>fibrillation, hypercholesterolemia, history of CVA who presented to Stanford
>Emergency Room on April 25 with chief complaint of right-sided chest pain
>since April 24.";
>
>I only want to split on sentence boundaries like \., \? and \!. But I don't
>want to split when an abbreviation is encountered. Also, I need to keep the
>sentence boundary symbol. So I came up with the following:
>
>@sents = split(/(?<=[^Mr|Ms|M\.D|inc][.?!])\s+/, $text);
>
>This works fine and gives me:

It does NOT work fine.  You are using [^...] (a negated charater class) to
try saying "NOT one of these strings...".  A character class is for
CHARACTERS.  [^Mr|Ms|M\.D] is the same as [^mrsd.|].

One problem you will encounter is that look-behinds must be a single
width.  This means your regex will look like this:

  my $rx = qr{
    (?<=
      (?:
        (?<! Mr | Ms )
        (?<! M\.D | inc | e\.g )
      )
      [.?!]
    )
    \s+
  }x

I have grouped those sub-patterns of the same length into the (?<!)
assertions, if you noticed.

  @sentences = split $rx, $text;

That will work as far as you've described.  Further clarifications to your
sentence structure will probably break it.

-- 
Jeff "japhy" Pinyan      RPI Acacia Brother #734      2002 Acacia Senior Dean
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: Tue, 26 Nov 2002 11:18:09 -0500
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: splitting with positive look-behind
Message-Id: <Pine.A41.3.96.1021126111714.43984A-100000@vcmr-104.server.rpi.edu>

On Tue, 26 Nov 2002, Jeff 'japhy' Pinyan wrote:

>  my $rx = qr{
>    (?<=
>      (?:
>        (?<! Mr | Ms )
>        (?<! M\.D | inc | e\.g )
>      )
>      [.?!]
>    )
>    \s+
>  }x

THat (?: ... ) was useless.

  my $rx = qr{
    (?<=
      (?<! M[rs] )
      (?<! M\.D | inc | e\.g )
      [.!?]
    )
    \s+
  }x;

-- 
Jeff "japhy" Pinyan      RPI Acacia Brother #734      2002 Acacia Senior Dean
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: Tue, 26 Nov 2002 19:01:19 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Two pppd's one after the other...
Message-Id: <b7h7uu03k0b5g7opqom42bknttv32apok3@4ax.com>

Vittorio wrote:

>To connect my linux laptop to my office network via modem and a win nt 
>RAS CALLBACK server, I manually run two pppd processes one at the end of 
>the other by means of:
>
>pppd call firstcall
>pppd call secondwait
>
>where firstcall calls the win nt server giving it the phone number to be 
>called back; as soon as firstcall exit I manually run secondwait which 
>starts waiting for the incoming call from the NT RAS server.
>
>Could you please help me to setup a perl procedure to make the same 
>automagically?

system()? That will wait until the launched program exits.

-- 
	Bart.


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

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


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