[18717] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 885 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 12 21:05:32 2001

Date: Sat, 12 May 2001 18:05:09 -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: <989715909-v10-i885@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 12 May 2001     Volume: 10 Number: 885

Today's topics:
        AND-connected search <Tim.Lauterborn@gmx.de>
    Re: AND-connected search (Logan Shaw)
    Re: AND-connected search <Tim.Lauterborn@gmx.de>
    Re: AND-connected search nobull@mail.com
    Re: AND-connected search nobull@mail.com
    Re: AND-connected search (Craig Berry)
    Re: array loses place if variable is null <godzilla@stomp.stomp.tokyo>
        Array on Win32 Perl <bigfatnoemail@noemail.net>
    Re: Array on Win32 Perl (Jay Tilton)
    Re: Array on Win32 Perl <bigfatnoemail@noemail.net>
    Re: Cabal Guidelines for comp.lang.perl.misc ($Revision <godzilla@stomp.stomp.tokyo>
    Re: Good editor for perl Use Scite ! <simon@super-simon.com>
    Re: if ($x in @a) equivalent in perl? <juex@my-deja.com>
    Re: If statement question (Tad McClellan)
    Re: Javascript or Perl ? <AgitatorsBand@yahoo.com>
    Re: Javascript or Perl ? <straith@modusvarious.org>
        Monitring LOG files on Unix <reachus@nslnet.net>
    Re: Monitring LOG files on Unix <uri@sysarch.com>
    Re: Monitring LOG files on Unix <somewhere@paradise.net>
    Re: Posting Guidelines for comp.lang.perl.misc ($Revisi <juex@my-deja.com>
    Re: Posting Guidelines for comp.lang.perl.misc ($Revisi (Logan Shaw)
    Re: problem with perlapp (PDK 2.1) <nutcracker@no-spam.org>
    Re: R: Price for work? <no@spam.net>
        Reading DBF files remotely <www@nospam.com>
        regex for html links (Moriarty)
    Re: regex for html links <keesh@users.pleaseremovethisbit.sourceforge.net>
    Re: regex for html links <keesh@users.pleaseremovethisbit.sourceforge.net>
    Re: regex for html links nobull@mail.com
    Re: regex or s/// optimization? <aqumsieh@hyperchip.com>
    Re: regex or s/// optimization? <xris@dont.send.spam>
    Re: Removing blank lines at beginng/end of a file (Craig Berry)
    Re: Removing blank lines at beginng/end of a file (Charles DeRykus)
        testing offline <stu00ac@rdg.ac.uk>
    Re: testing offline <tony_curtis32@yahoo.com>
    Re: testing offline (Monte)
    Re: testing offline <dan@nospam_dtbakerprojects.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 12 May 2001 22:09:31 +0200
From: "Tim Lauterborn" <Tim.Lauterborn@gmx.de>
Subject: AND-connected search
Message-Id: <9dk5em$gs5$1@nets3.rz.RWTH-Aachen.DE>

Hi,

I have the following problem:

I am looking for a regular expression which allows a sort of
AND-connected-search like in the following code example which unfortunately
does not work.

$line="acd";
print ($line=~/a&&c/);

The expression should be true if $line contains a AND c and wrong if $line
contains for example only a.

Does someone know the right expression?

Thanks!

Greetings,
Tim




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

Date: 12 May 2001 15:47:53 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: AND-connected search
Message-Id: <9dk7hp$aqu$1@ahab.cs.utexas.edu>

In article <9dk5em$gs5$1@nets3.rz.RWTH-Aachen.DE>,
Tim Lauterborn <Tim.Lauterborn@gmx.de> wrote:
>I am looking for a regular expression which allows a sort of
>AND-connected-search like in the following code example which unfortunately
>does not work.
>
>$line="acd";
>print ($line=~/a&&c/);
>
>The expression should be true if $line contains a AND c and wrong if $line
>contains for example only a.

	/a.*c|c.*a/

Unfortunately, this does not work too well if you want to match more
more than two strings.  To match a and b and c, you have to do this:

	/a.*(b.*c|c.*b)|b.*(a.*c|c.*a)|c.*(a.*b|b.*a)/

As you can tell, the size of this regular expression will grow
exponentially.

So, instead, it's usually best to do something like this:

	/a/ and /b/ and /c/

That grows linearly, which makes for much shorter code and faster
execution too.

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: Sat, 12 May 2001 22:58:35 +0200
From: "Tim Lauterborn" <Tim.Lauterborn@gmx.de>
Subject: Re: AND-connected search
Message-Id: <9dk87e$hur$1@nets3.rz.RWTH-Aachen.DE>

Hi,

Thanks for the quick answer!

> /a/ and /b/ and /c/

The problem is that I have to generate the expression dynamically: The user
can choose if he wants to search with an AND- or OR-connection. Is there any
known way to solve this problem non-recursively?

Greetings,
Tim




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

Date: 12 May 2001 22:01:03 +0100
From: nobull@mail.com
Subject: Re: AND-connected search
Message-Id: <u9snianuy8.fsf@wcl-l.bham.ac.uk>

"Tim Lauterborn" <Tim.Lauterborn@gmx.de> writes:

> I am looking for a regular expression

Why?  Surely you should be looking for a good solution to your underlying
problem rather than explicitly looking for a solution that must be a
single RE.

> The expression should be true if $line contains a AND c and wrong if $line
> contains for example only a.

$line =~ /^(?=.*a)(?=.*c)/

Unless there is an overwhelming reson why you must do this as a single
RE you would be much better saying:

$line =~ /a/ && $line =~ /c/

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 12 May 2001 22:09:55 +0100
From: nobull@mail.com
Subject: Re: AND-connected search
Message-Id: <u9n18inujg.fsf@wcl-l.bham.ac.uk>

"Tim Lauterborn" <Tim.Lauterborn@gmx.de> writes:

> The problem is that I have to generate the expression dynamically: The user
> can choose if he wants to search with an AND- or OR-connection.

But is there any (non-artificial) reason it needs to be limited to a
Regular expression, rather than an arbitrary Perl expression?

> Is there any known way to solve this problem non-recursively?

Why do you have a problem with recusion?

Or do I meain "Why?  Do you have a problem with recusion?"?

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Sat, 12 May 2001 22:48:37 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: AND-connected search
Message-Id: <tfrfe5qsfqf436@corp.supernews.com>

Tim Lauterborn (Tim.Lauterborn@gmx.de) wrote:
: Hi,
: 
: Thanks for the quick answer!
: 
: > /a/ and /b/ and /c/
: 
: The problem is that I have to generate the expression dynamically: The user
: can choose if he wants to search with an AND- or OR-connection. Is there any
: known way to solve this problem non-recursively?

  And: /(?=.*a)(?=.*b)(?=.*c)/
  Or:  /a|b|c/

Be sure to think about how regex metacharacters in the a, b, and c
patterns will effect things.  You may wish to wrap each in \Q..\E for
safety.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "God becomes as we are that we may be as he is."
   |               - William Blake


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

Date: Sat, 12 May 2001 11:35:44 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: array loses place if variable is null
Message-Id: <3AFD8280.DF2F2DE5@stomp.stomp.tokyo>

nobull@mail.com wrote:
 
> Godzilla! wrote:
> > Marshall Dudley wrote:

(snipped)

(snippage not noted by nobull, context deliberately changed)


Added quote, not in temporal sequence, from the orignal article
to establish correct overall theme context:

"Does perl automatically parse arrays down if the last value is null?"


> > Read about and research both arrays and the push function.

> Your attempt at misdirection will fail, the OP has already
> successfully been directed to read the relevant manual entry, namely
> that for the "split" function.
 
> If you want to start handing out you own special variety of poisoned
> advice again you'll have to get in quicker, before someone posts the
> right answer.
 
> I still think this sport of yours of sending people who  fail to RTFM
> off on wild goose chases is rather cruel.
 

(snipped)


> Time to adjust your medication again.  There was nothing in the OP's
> post to indicate that a null entry in the field was not perfectly valid.


 "...where a person may leave a field blank, and
  one expects certain entrires to be in specific spots."



Your constant lies are most impotent.

Godzilla!
--


"Does perl automatically parse arrays down if the last value is null?"

> > Read about and research both arrays and the push function.


TEST SCRIPT:
____________

#!perl

print "Content-type: text/plain\n\n";

print "
    Each Array Contains Four Elements
    And Each Has A Null Fourth Element.
    \"4\" Is Pushed Into Each Array.\n\n\n";


print "Comma Delimited Array:\n\n";

@Array = (1, 2, 3, ,,);

print "Number of elements before push: ", $#Array + 1, "\n";

push (@Array, "4");

print "Array after push: ", @Array;



print "\n\nQuoted Comma Delimited Array:\n\n";

@Array = ("1", "2", "3", "");

print "Number of elements before push: ", $#Array + 1, "\n";

push (@Array, "4");

print "Array after push: ", @Array;



print "\n\nQuote Word Array:\n\n";

@Array = qw (1 2 3  );

print "Number of elements before push: ", $#Array + 1, "\n";

push (@Array, "4");

print "Array after push: ", @Array;

exit;



PRINTED RESULTS:
________________

    Each Array Contains Four Elements
    And Each Has A Null Fourth Element.
    "4" Is Pushed Into Each Array.


Comma Delimited Array:

Number of elements before push: 3
Array after push: 1234

Quoted Comma Delimited Array:

Number of elements before push: 4
Array after push: 1234

Quote Word Array:

Number of elements before push: 3
Array after push: 1234


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

Date: Sat, 12 May 2001 15:16:41 -0400
From: "Muad'Dib" <bigfatnoemail@noemail.net>
Subject: Array on Win32 Perl
Message-Id: <tfr2s3ij0m3868@corp.supernews.com>

Having a bit of a problem here, I'm trying to input data into an array on
Win32 machine to then modify. When I run the program, my input doesn't take
the array, I just keep typing in strings and hitting enter, what gives? Code
snippet below:

print "Enter three strings:\n";
@foo = <STDIN>;
@reversefoo = reverse(@foo);
print @reversefoo;





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

Date: Sat, 12 May 2001 19:53:51 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Array on Win32 Perl
Message-Id: <3afd92c6.49339856@news.erols.com>

On Sat, 12 May 2001 15:16:41 -0400, "Muad'Dib"
<bigfatnoemail@noemail.net> wrote:

>Having a bit of a problem here, I'm trying to input data into an array on
>Win32 machine to then modify. When I run the program, my input doesn't take
>the array, I just keep typing in strings and hitting enter, what gives? Code
>snippet below:
>
>print "Enter three strings:\n";
>@foo = <STDIN>;

You're slurping STDIN, so it will keep lines reading lines until it
encounters an EOF marker.  Feed it one by pressing ctrl-z.

If three lines is all the input you want, you'll need to code it so
three lines is all it will accept.

  for (1..3) {
    <STDIN>;
    push @foo, $_;
  }


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

Date: Sat, 12 May 2001 16:16:10 -0400
From: "Muad'Dib" <bigfatnoemail@noemail.net>
Subject: Re: Array on Win32 Perl
Message-Id: <tfr6bkt8fnnaf7@corp.supernews.com>

Thanks much, it worked great.

Cheers.

"Jay Tilton" <tiltonj@erols.com> wrote in message
news:3afd92c6.49339856@news.erols.com...
> On Sat, 12 May 2001 15:16:41 -0400, "Muad'Dib"
> <bigfatnoemail@noemail.net> wrote:
>
> >Having a bit of a problem here, I'm trying to input data into an array on
> >Win32 machine to then modify. When I run the program, my input doesn't
take
> >the array, I just keep typing in strings and hitting enter, what gives?
Code
> >snippet below:
> >
> >print "Enter three strings:\n";
> >@foo = <STDIN>;
>
> You're slurping STDIN, so it will keep lines reading lines until it
> encounters an EOF marker.  Feed it one by pressing ctrl-z.
>
> If three lines is all the input you want, you'll need to code it so
> three lines is all it will accept.
>
>   for (1..3) {
>     <STDIN>;
>     push @foo, $_;
>   }




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

Date: Sat, 12 May 2001 17:01:36 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Cabal Guidelines for comp.lang.perl.misc ($Revision: 1.1 $)
Message-Id: <3AFDCEE0.AF591F48@stomp.stomp.tokyo>

Tad McClellan wrote:
 
> tadmc wrote:
 
> >Posting Guidelines for comp.lang.perl.misc ($Revision: 1.1 $)
 
(snipped)

When will you be announcing a request for comments
and announcing a call for vote to sanction this
FAQ per long standing USENET guidelines? My
presumption is you will call for committee
formation to handle voting issues and balloting
before any other actions are taken.

You do intend to honor USENET guidelines, right?
It is very clear all of you attempt to make others
follow USENET guidelines regarding use of this
newsgroup. My expectations are you will do the same
lest you brand yourselves hardcore hypocrites and,
put yourself in a position of both warranted and
deserved ridicule with each posting here, of an 
unsanctioned FAQ.

Godzilla!


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

Date: Sun, 13 May 2001 00:57:53 +0200
From: "Super-Simon" <simon@super-simon.com>
Subject: Re: Good editor for perl Use Scite !
Message-Id: <9dkevs$hdj$1@news1.xs4all.nl>

WOW, Scite is really the best I've ever seen!!!!!!!!!!


"Prévost Christophe" <hayden@club-internet.fr> wrote in message
news:9d7kup$41s$1@front1m.grolier.fr...
> "Super-Simon"
>
> > I'm searching for a good, fast editor with syntax highlighting for perl
> > (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> > editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> > poor student ;-)
>
> I'm quite surprise that scite isn't better known...
>
> Scite use Scintilla control like komodo but scite it reallly small. Komodo
> use a lot of memory. Scite is cross platform (Linux / Win32) and really
> customisable. In fact to be really easy to use you may have to customize
it
> (for example to change the position of the output bar, to enable line
> numbers on gutter, enable multiple buffers, customise syntax highligthing
> etc...)
>
> Scite is updated oftently, free... opensource... marvellous... paramount
>
> I use it for php, python and perl...
>
> URL: http://www.scintilla.org
>
>




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

Date: Sat, 12 May 2001 15:34:42 -0700
From: "Jürgen Exner" <juex@my-deja.com>
Subject: Re: if ($x in @a) equivalent in perl?
Message-Id: <3afdba85@news.microsoft.com>

"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3AFD5FE9.79ECECFC@stomp.stomp.tokyo...
> Jürgen Exner wrote:
> > Wait a second, are you saying your method actually gains time?
> > For the sake of argument lets assume 'the other method' takes 2 minutes.
> > Now, your method being 700% faster would mean your method needs minus 12
> > minutes (computed as 2min - 700/100*2min = -12min).
>
> You have created false parameters.

Not exactly. I simply choose the number 2, because it is easier to
demonstrate with a simple number like 2 instead of some lengthy, complex,
real value. You may substitute whatever value you prefer, it doesn't change
the argumentation.

> Relative elapse times
> for code comparisons are not linear in nature and clearly
> cannot be calculated by linear extrapolation. This is
> clearly exemplified by my methodologies which show
> grep becomes less efficient with increasing array size
> where another method remains relatively linear, but
> not perfectly linear.

Quite right, but what does that have to do with my argument?

> Using your false parameters, code which runs seven times
> faster than another which takes two minutes,
> this faster code would complete in,
>
> 0.285714285 minutes or 17.14285714 seconds

I wonder how you got this number.
As you said:
- Code A runs in 2 minutes.
- 7 times 2 minutes is 14 minutes (at least by the usual rules of
arithmetic)
- code B runs 7 times faster than code A, in other words it runs 14 minutes
faster than code A: that is 2 minutes minus 14 minutes which equals minus12
minutes.

Please let me know where I made the mistake

> If I were as stupid as you, I wouldn't give a damn.
Just asking for clarification

> Give it a rest, Frank.
You badly miss-spelled my name.

jue




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

Date: Sat, 12 May 2001 13:03:45 -0400
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: If statement question
Message-Id: <slrn9fqr7h.2ff.tadmc@tadmc26.august.net>

Rudolf Polzer <eins@durchnull.de> wrote:

>Just a style issue. In C I use for(;/*ever*;) to make it look like 'forever'.


Doesn't this look like that?

   while ( 'forever' ) {  }


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


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

Date: Sat, 12 May 2001 21:42:28 GMT
From: Scratchie <AgitatorsBand@yahoo.com>
Subject: Re: Javascript or Perl ?
Message-Id: <87iL6.472$du2.44654@news.shore.net>

Randal L. Schwartz <merlyn@stonehenge.com> wrote:
: As one of my friends says, there are *more* people with Javascript
: turned off today than ever before, and on each new CERT alert, even
: more get the clue and disable it.

I'd like to see some hard figures on this (if any reliable ones exist). It
seems to me that more commercial websites assume that you're running JS
than at any time in the past. Even places like Yahoo, who presumably have
the programming staff who could write something that worked both ways. 

--Art


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

Date: 12 May 2001 22:26:48 GMT
From: SJ Straith<straith@modusvarious.org>
Subject: Re: Javascript or Perl ?
Message-Id: <9dkdb8$89c$1@samba.rahul.net>

Godzilla! (reaching for the coffee) wrote:
: Zlach wrote:
:  
:> I'd like to learn Javascript and Perl.
:> And the question is which one to learn first ?
:  
: Although my personal opinion is Java sucks, learn
: both Perl and Java languages, together.

*sigh*  Javascript != Java

<snip>

Personally I see little use for Javascript.  There 
ARE however a few things you can do with Java that
I have, as yet at least, been able to do with Perl.
All of these things are, I admit, graphical in 
nature.

Anyway, it depends on why you want to learn the 
languages.  If it's to get a job as a low-level
web designer, start with Javascript and then learn
Perl.  If it's to get a job as a sysadmin or 
webadmin, start with Perl and then decide if you
really need the Javascript.

Me?  I've chosen the second route and am trying
to get a solid grasp of Perl before I bother with
any of the others.

You makes your choice, and you take the consequences.

	SJ Straith

-- 
**************************
St Vidicon of Cathode, 
protect me from Murphy.
**************************
Life's to short to suffer
fools gladly.
**************************


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

Date: Sat, 12 May 2001 22:50:11 GMT
From: "Gary" <reachus@nslnet.net>
Subject: Monitring LOG files on Unix
Message-Id: <D6jL6.5834$a6.1443330@news1.rdc1.md.home.com>

I need a way for perl to open a unix file which is a log file and beng
written to all the time.

If certain text is seen in the log file it should be mailed out

Help
thx
Gary




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

Date: Sat, 12 May 2001 23:01:59 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Monitring LOG files on Unix
Message-Id: <x7vgn69nna.fsf@home.sysarch.com>

>>>>> "G" == Gary  <reachus@nslnet.net> writes:

  G> I need a way for perl to open a unix file which is a log file and
  G> beng written to all the time.

  G> If certain text is seen in the log file it should be mailed out

check out StemLog at stemsystems.com. this has builtin log tailing and
filtering. i need to add the email stuff but that is trivial. let me
know if you are going to use it and i will do that ASAP.

uri


-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html


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

Date: Sun, 13 May 2001 10:14:08 +1000
From: "Tintin" <somewhere@paradise.net>
Subject: Re: Monitring LOG files on Unix
Message-Id: <3lkL6.4$A82.31776@news.interact.net.au>


"Gary" <reachus@nslnet.net> wrote in message
news:D6jL6.5834$a6.1443330@news1.rdc1.md.home.com...
> I need a way for perl to open a unix file which is a log file and beng
> written to all the time.
>
> If certain text is seen in the log file it should be mailed out

Why reinvent the wheel?  http://www.stanford.edu/~atkins/swatch/




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

Date: Sat, 12 May 2001 15:47:24 -0700
From: "Jürgen Exner" <juex@my-deja.com>
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.1 $)
Message-Id: <3afdbd7f@news.microsoft.com>

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrn9fql42.26h.tadmc@tadmc26.august.net...
> Eric Bohlman <ebohlman@omsdev.com> wrote:
> >Andras Malatinszky <andras@mortgagestats.com> wrote:
> >> tadmc@augustmail.com wrote:
> >>>    Before posting to comp.lang.perl.misc
> >>>       Must
> >> Should.
> >> You are talking to adults. If you start off on a bossy tone you are
going to
> >> alienate your audience. That's not what we want.
> >I think Tad is using "must," "should," etc. in the very particular (some
> >would say "peculiar") sense that they have in specs like RFCs.
> Yes, I was.

Please also consider that this is a world-wide NG.
People from outside the USA are likely to misunderstand "soft" advise as
mere suggestions. Don't use weak words like "may" or "should" or "shall"
unless you really mean the action/item is optional.
E.g. "You may not walk on the lawn" is nothing but a friendly suggestion for
many non-native English speakers. You may do so or you may not do so. It's
up to you.
If you want people not to walk on the lawn then say so: "You must not walk
on the lawn".

Live American English has many subtleties and can be quite misleading if you
didn't grow up in this culture. In a world-wide NG if you want to say
something, then say it, but don't try to hide the real meaning in
politeness. This politeness will be taken literally by many people outside
of the USA.

jue




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

Date: 12 May 2001 18:18:38 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Posting Guidelines for comp.lang.perl.misc ($Revision: 1.1 $)
Message-Id: <9dkgce$brm$1@ahab.cs.utexas.edu>

In article <3afdbd7f@news.microsoft.com>,
Jürgen Exner <juex@my-deja.com> wrote:
>Please also consider that this is a world-wide NG.
>People from outside the USA are likely to misunderstand "soft" advise as
>mere suggestions. Don't use weak words like "may" or "should" or "shall"
>unless you really mean the action/item is optional.
>E.g. "You may not walk on the lawn" is nothing but a friendly suggestion for
>many non-native English speakers. You may do so or you may not do so. It's
>up to you.
>If you want people not to walk on the lawn then say so: "You must not walk
>on the lawn".
>
>Live American English has many subtleties and can be quite misleading if you
>didn't grow up in this culture. In a world-wide NG if you want to say
>something, then say it, but don't try to hide the real meaning in
>politeness. This politeness will be taken literally by many people outside
>of the USA.

While I understand it might not be clear, it's not really politeness.
It's an idiom.  I had to read "you may not walk on the lawn" several
times before I could understand what alternate meaning you were talking
about.

I think you are saying that native English speakers mean "you may
choose not to walk on the lawn" when they say "you may not walk on the
lawn".  This would be a way to say that, while one has the freedom to
make either choice, a certain choice is suggested.

However, I have said "may not" thousands of times in my life, and I
have never intended that meaning.  In fact, as I said, I wasn't even
aware of that possible interpretation until I read your post.

In reality, the meaning a native English speaker has in mind is closer
to "it is not the case that you may walk on the lawn".  That is, the
"not" applies to "may" not to "walk on the lawn".

Thanks for this example, by the way -- it is a very good example of a
phrase that is subtlely idiomatic.  (Other phrases, like "hit the
trail" are obviously idiomatic, but some, like this example, are much
tougher to spot.)

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


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

Date: 13 May 2001 00:10:32 GMT
From: "nutcracker" <nutcracker@no-spam.org>
Subject: Re: problem with perlapp (PDK 2.1)
Message-Id: <9dkjdo$cfc@dispatch.concentric.net>

It turns out that format templates wont compile when using perlapp.

FYI...

"nutcracker" <nutcracker@no-spam.org> wrote in message
news:9de0va$cfo@dispatch.concentric.net...
> I will have to post that here later....unless you want to take this to
email
> (which would be better at the moment, as I cannot access this news server
> from work)
>
> thayward at dnsplus dot net
>
> thanks
>
> "Wyzelli" <wyzelli@yahoo.com> wrote in message
> news:FBvK6.7$vu.1912@vic.nntp.telstra.net...
> > "nutcracker" <nutcracker@no-spam.org> wrote in message
> > news:9ddtsl$42a@dispatch.concentric.net...
> > > windows 2000 Professional.
> > >
> > > > > When running the command:
> > > > >
> > > > > perlapp -v script.pl -f
> >
> > Looks Ok... How about the script?
> >
> > Wyzelli
> > --
> > #Modified from the original by Jim Menard
> > for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
> > wall,\n";
> > print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
> > $_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
> > wall\n\n";}print'*burp*';
> >
> >
> >
>
>




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

Date: Sat, 12 May 2001 19:11:25 GMT
From: "Misanthrope" <no@spam.net>
Subject: Re: R: Price for work?
Message-Id: <xVfL6.773$ox5.53047@newsread2.prod.itd.earthlink.net>


I charge between $75 and $150 us per hour depending on the job.


"BUCK NAKED1" <dennis100@webtv.net> wrote in message
news:28090-3AF84B11-10@storefull-243.iap.bryant.webtv.net...
> I had someone ask me to do some HTML pages for them and told them $25/hr
> and never heard from them again... though I think that $20-$25/hr is a
> fair price for HTML. On the contrary, If I knew perl well, I think
> $50-$60/hr would a fair price. For an "expert" perler, maybe
> $75-$100/hr.
>
> Just my 2cents.
> --Dennis
>
>




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

Date: Sat, 12 May 2001 20:39:18 GMT
From: "Perlzagame" <www@nospam.com>
Subject: Reading DBF files remotely
Message-Id: <WbhL6.7745$la.111994@news1.sttls1.wa.home.com>

I have a need to read the contents of a .DBF file across
the internet for real-time data.....  is this possible with perl?

Both systems are webservers

Thanks,

Ron





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

Date: 12 May 2001 19:18:41 GMT
From: phocjop@hotmail.com (Moriarty)
Subject: regex for html links
Message-Id: <9dk2ah$kst$1@slb6.atl.mindspring.net>

I'm trying to make a regex to find web links in a text file and ad <a href 
stuff around it to link it up.

I tried: s/http:\/\/{.*?}{[\s|\n]}/<a href=http:\/\/$1>http:\/\/$1$2<\/a>/g
but that didn't replace anything

Any ideas?



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

Date: Sat, 12 May 2001 21:06:02 +0100
From: "Ciaran McCreesh" <keesh@users.pleaseremovethisbit.sourceforge.net>
Subject: Re: regex for html links
Message-Id: <9dk4v9$fhi$1@newsg3.svr.pol.co.uk>

In article <9dk2ah$kst$1@slb6.atl.mindspring.net>, "Moriarty"
<phocjop@hotmail.com> wrote:
> I'm trying to make a regex to find web links in a text file and ad <a
> href stuff around it to link it up.
> 
> I tried: s/http:\/\/{.*?}{[\s|\n]}/<a
> href=http:\/\/$1>http:\/\/$1$2<\/a>/g but that didn't replace anything
> 
> Any ideas?

Try using () instead of {} and [\s|\n] with [\s\n] . You might also want
to use /i as well...

-- 
Ciaran McCreesh
mail:    keesh@users.sourceforge.net
web:     http://www.opensourcepan.com/


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

Date: Sat, 12 May 2001 21:08:23 +0100
From: "Ciaran McCreesh" <keesh@users.pleaseremovethisbit.sourceforge.net>
Subject: Re: regex for html links
Message-Id: <9dk53m$gs8$1@newsg4.svr.pol.co.uk>

In article <9dk4v9$fhi$1@newsg3.svr.pol.co.uk>, "Ciaran McCreesh"
<keesh@users.pleaseremovethisbit.sourceforge.net> wrote:
> Try using () instead of {} and [\s|\n] with [\s\n] . You might also want
> to use /i as well...

Erm, s/with/instead of/ ...

-- 
Ciaran McCreesh
mail:    keesh@users.sourceforge.net
web:     http://www.opensourcepan.com/


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

Date: 12 May 2001 22:04:22 +0100
From: nobull@mail.com
Subject: Re: regex for html links
Message-Id: <u9pudenusp.fsf@wcl-l.bham.ac.uk>

phocjop@hotmail.com (Moriarty) writes:

> I'm trying to make a regex to find web links in a text file and ad <a href 
> stuff around it to link it up.

You are not the first.  RE is not powerful enough to parse HTML
reliably.  Give up. Use the standard modules.

If you are determined to use an RE then please use a search engine
on this newsgroup to find lots of imperfect solutions (this Q apears
about every 2 weeks).

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 12 May 2001 17:33:58 -0400
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: regex or s/// optimization?
Message-Id: <7a3daatfp5.fsf@merlin.rene.hyperchip.com>


xris <xris@dont.send.spam> writes:

> $params =~ s/"(.+?(?!\\"))"/
>       my $x=$1;$x =~ s#\\?,#%%comma%%#g;"\"$x\""/sge;
> 
> Does anyone know of a better way to do this particular routine?  

Why don't you ask perldoc? Check perlfaq4:

	How can I split a [character] delimited string except when
	inside [character]? (Comma-separated files)

--Ala


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

Date: Sat, 12 May 2001 18:17:34 -0500
From: xris <xris@dont.send.spam>
Subject: Re: regex or s/// optimization?
Message-Id: <xris-AFCBBF.18173412052001@news.evergo.net>

In article <7a3daatfp5.fsf@merlin.rene.hyperchip.com>,
 Ala Qumsieh <aqumsieh@hyperchip.com> wrote:

> Why don't you ask perldoc? Check perlfaq4:

ah, cool..   I think that'll do the trick, thanks.



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

Date: Sat, 12 May 2001 22:35:40 -0000
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Removing blank lines at beginng/end of a file
Message-Id: <tfrelssoovsd53@corp.supernews.com>

Philip Newton (pne-news-20010512@newton.digitalspace.net) wrote:
: On Fri, 11 May 2001 22:35:57 -0000, cberry@cinenet.net (Craig Berry) wrote:
: 
: > $text =~ s/\n{2,}\Z/\n/;
: 
: Shouldn't that be a \z in there rather than \Z?

Should be for clarity, yes.  But it happens to work equivalently the way I
wrote it, since the \n greedy multiple match will consume all the way to
end-of-string, causing the \Z to always match that rather than before a
terminal \n.

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "God becomes as we are that we may be as he is."
   |               - William Blake


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

Date: Sat, 12 May 2001 23:08:37 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: Removing blank lines at beginng/end of a file
Message-Id: <GD8wAD.M3C@news.boeing.com>

In article <m3d79ffl4h.fsf@mumonkan.sunstarsys.com>,
Joe Schaefer  <joe+usenet@sunstarsys.com> wrote:
>>...
>
>Anyway, here's what I came up with-
>
>  % perl -pi.bak -we 'for($_=<> until /\S/..0 or eof; !/\S/; $_.=<>) { 
>                      if (eof) { $_=""; last } }' filename 
>
>This treats lines without non-space characters as blank.

neat. 

here's one inspired by above:
 
perl -ni.bak -we 'if(/\S/ or $s){$s .= $_;$l=length $s if //}; 
                       print substr $s,0,$l if eof' filename 


--
Charles DeRykus


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

Date: Sat, 12 May 2001 19:16:36 +0100
From: Amelia Clarke <stu00ac@rdg.ac.uk>
Subject: testing offline
Message-Id: <3AFD7E04.F4408DC9@rdg.ac.uk>

I'm fairly new to perl and have been using it to make cgi scripts - the
only thing is, I'd like to be able to test them fully offline.  Is there
a (free) program I can download to allow me to do this?

Thanks,

amelia

ps my latest script is http://www.arcs-studio.com/cgi-bin/airplan.htm -
I have been programming for 4 days!


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

Date: 12 May 2001 14:08:49 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: testing offline
Message-Id: <87vgn6wfjy.fsf@limey.hpcc.uh.edu>

>> On Sat, 12 May 2001 19:16:36 +0100,
>> Amelia Clarke <stu00ac@rdg.ac.uk> said:

> I'm fairly new to perl and have been using it to make
> cgi scripts - the only thing is, I'd like to be able to
> test them fully offline.  Is there a (free) program I
> can download to allow me to do this?

You can test quite a lot of things by using CGI.pm
interactively, so you can pass the parameters on the
command-line.  "perldoc CGI" for details.

You can fake the necessary environment variables too.

comp.infosystems.www.authoring.cgi is more likely to be
on-topic if you want to continue asking questions about
this.

hth
t
-- 
Just reach into these holes.  I use a carrot.


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

Date: Sat, 12 May 2001 18:55:30 GMT
From: montep@about.com (Monte)
Subject: Re: testing offline
Message-Id: <3afd8525.8076673@news.hal-pc.org>

On Sat, 12 May 2001 19:16:36 +0100, Amelia Clarke <stu00ac@rdg.ac.uk>
wrote:

>I'm fairly new to perl and have been using it to make cgi scripts - the
>only thing is, I'd like to be able to test them fully offline.  Is there
>a (free) program I can download to allow me to do this?
>Thanks,
>amelia

Not a problem(well nearly) ;)
I built a second bottom-end machine and loaded Linux.  Then loaded
Apache http server.  Networked my work station to it.  Then I write
the script, place it on the Apache server and call it from the
workstation.  Example http://192.168.1.1/~user/index.htm(if that is
what you set up as the IP address for the server). Oh yeah and make
sure Perl is loaded on the server. ;)

This is particularly handy since I can call the ISP for which the
script is meant and then set up my server to emulate theirs. ALL FOR
FREE!

However!  If they are running a NT/IIs/SQL  the free goes out the
window, but the setup remains the same.

g'Luk
if your gonna spam.....
admin@loopback, $LOGIN@localhost, $LOGNAME@localhost, $USER@localhost, $USER@$HOST, -h1024@localhost, root@mailloop.com root@localhost, postmaster@localhost, admin@localhost


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

Date: Sat, 12 May 2001 20:31:42 GMT
From: Dan Baker <dan@nospam_dtbakerprojects.com>
Subject: Re: testing offline
Message-Id: <3AFD9C3F.2A81A74A@nospam_dtbakerprojects.com>



Amelia Clarke wrote:
> 
> I'm fairly new to perl and have been using it to make cgi scripts - the
> only thing is, I'd like to be able to test them fully offline.  Is there
> a (free) program I can download to allow me to do this?
----------------

I use a simple free webserver that runs great on win98 from
www.xitami.com


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 885
**************************************


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