[10335] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3928 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 8 12:07:19 1998

Date: Thu, 8 Oct 98 09:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 8 Oct 1998     Volume: 8 Number: 3928

Today's topics:
        [OT] London.pm (was "Many Jars" Mystery) <work@despam.idea.co.uk>
        A small favor with .dat files. <BOwen@PrioritySearch.Com>
        anyone got a rtf->html converter in perl? <c-denman@dircon.co.uk>
    Re: Are there any "perl.newbie" group or forum? dturley@pobox.com
    Re: Back button in Perl? (Abigail)
    Re: Can't send mail via telnet programmatically <Tony.Curtis+usenet@vcpc.univie.ac.at>
        Compiling Perl 5.005_2 <maen@fs-geomin.rwth-aachen.de>
        Errors while compil. perl5.005_2 <maen@fs-geomin.rwth-aachen.de>
    Re: Extracting muliple values from a hash elund@compuserve.com
    Re: foreach peculiarities <aqumsieh@tigre.matrox.com>
    Re: foreach peculiarities (brian d foy)
        Help needed extracting URLs <sstevens@hshsl.umaryland.edu>
    Re: How do I format a system date? (Joergen W. Lang)
        how to get duplicate variables out of an array? (Bart Van Hemelen)
    Re: how to get duplicate variables out of an array? (Greg Bacon)
    Re: How to match exactly x occurrences of a character (Abigail)
    Re: Perl Robots (Steve Linberg)
    Re: Perl Robots (Steve Linberg)
    Re: Perl Robots <phanely@jps.jammed.net>
    Re: Perl-based script for a metasearch engine droby@copyright.com
        PerlShop shipping question ncrooks@nobelmed.com
    Re: Please HELP!!!! Database search output format dragnovich@my-dejanews.com
    Re: Problems Using a Compare Subroutine with Sort droby@copyright.com
    Re: Sort Hash of Hashes by Inner Element <merlyn@stonehenge.com>
    Re: What does $INPUT{'name'} =~ s/\s+$//; do?? (I'm a n <aspinelli@ismes.it>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 08 Oct 1998 16:22:17 +0100
From: Kiril <work@despam.idea.co.uk>
Subject: [OT] London.pm (was "Many Jars" Mystery)
Message-Id: <361CD8A9.55CBB9D6@despam.idea.co.uk>

dave@mag-sol.com wrote:
> The Cittie of Yorke on High Holborn. Sam Smiths Old Brewery Bitter at #1.50 a
> pint.
> 
> London.pm meetings are on the first Thursday of the month and have so far all
> been held at the same pub. All visiting Perl Mongers will be made very welcome
> (ask Chris Masto).
> 
> Dave...
I knew something good will come out of reading this newsgroup :-))))))
I work across from it..... Every first Thursday did you say ? 
How does one recognise london.pm ? By the badges or by the 
conversation topics ? 

K


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

Date: Thu, 8 Oct 1998 11:18:07 -0400
From: "Brian Owen" <BOwen@PrioritySearch.Com>
Subject: A small favor with .dat files.
Message-Id: <6vil2t$64p$1@news0-alterdial.uu.net>

I want to know why the changes do not take affect...  This is the
information in the original .dat file, but when I add the second line it is
not recognized.  I did not write the original script used to call this data,
but need to know what needs to be done to adjust the data in this file.  I
need to be able to add/remove people from this list at ease.  There is also
 .dir & .pag files in the same directory.  What am I missing here?  I've
looked at documentation and .pag is for security, but nothing specifically
says how to adjust the information.  Any help is appreciated.

Original-
PBD,Patty Davis,PDavis@Here.com,Information Technology,PROD
*END*

New-
PBD,Pat Davis,PDavis@Here.com,Information Technology,PROD
FBO,Bret Oslo,BOslo@Here.Com,ADMIN
*END*




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

Date: Thu, 8 Oct 1998 14:54:40 -0700
From: "Chris Denman" <c-denman@dircon.co.uk>
Subject: anyone got a rtf->html converter in perl?
Message-Id: <361cc9cb.0@norbert.cerbernet.co.uk>

anyone got a rtf->html converter in perl?

If not I'll code one myselft (not looking forward to it, really!)



C Denman
IA




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

Date: Thu, 08 Oct 1998 13:56:00 GMT
From: dturley@pobox.com
Subject: Re: Are there any "perl.newbie" group or forum?
Message-Id: <6vig9h$m6n$1@nnrp1.dejanews.com>

In article <3619EEA2.87134CE2@forumnett.no>,
  Hauk Langlo <hauk@forumnett.no> wrote:
>I'm not an
> expert myselfe and I would really like to know if there are any
> discussion forums etc where it is actually legal to ask questions that
> might be of a basic nature to some.

It has been my observation that this newsgroup IS open to all, newbies,
'middies,' and experts. What prompts the RTFM replies is people asking
questions that a quick search of www.perl.com or dejanews, or the like would
answer. If you do  alittle work for yourself and miss the answer, you'll get
an answer. (Been on both sides of that.)

Besides, if someone gets a RTFM reply to their question, so what? received a
few myself and it didn't break any bones. :-)

cheers,

david

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 8 Oct 1998 15:35:09 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Back button in Perl?
Message-Id: <6vim3d$nbq$1@client3.news.psi.net>

Marc Bissonnette (dragnet@internalysis.com) wrote on MDCCCLXIV September
MCMXCIII in <URL:news:6vhakm$ntm$1@news.interlog.com>:
++ 
++ 
++ What I don't understand is why, using this method, you are suggesting you can
++ control the back feature? The script itself is controlling the content of the
++ link. (in your page, yes, I did look at it and bookmarked it for all the info


It's not a back button. As explained on my page, it creates a forward link.

I would explain the details, but you insisted on continuing this discussion
in a Perl group, so I won't.

Read my page, specially what it says about browser history. And keep replies
out of this group.




Abigail
-- 
perl -we '$_ = q ?4a75737420616e6f74686572205065726c204861636b65720as?;??;
          for (??;(??)x??;??)
              {??;s;(..)s?;qq ?print chr 0x$1 and \161 ss?;excess;??}'


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

Date: 08 Oct 1998 16:13:39 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Can't send mail via telnet programmatically
Message-Id: <83ww6bta3w.fsf@vcpc.univie.ac.at>

Re: Can't send mail via telnet programmatically, John
<John.Fierke@Avnet.com> said:

John>    I'd like to use 'telnet [mailserver] 25', along
John> with the proper mail syntax, to notify the EDI team
John> with email messages and/or paging them via

telnet is interactive, it's not for programs to use.  It's
the wrong level of attack to find a solution.

John>    Anybody know how to get this done?  I'm writing the
John> script in perl and it's fairly straight-forward :

use Mail::Send;

Solve the problem, let the system do all the underlying
dirty work.

hth
tony
-- 
Tony Curtis, Systems Manager, VCPC,    | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien,  | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds!  | private email:
    Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>


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

Date: Thu, 08 Oct 1998 16:42:31 +0200
From: Lifeartist <maen@fs-geomin.rwth-aachen.de>
Subject: Compiling Perl 5.005_2
Message-Id: <361CCF57.91F9C003@fs-geomin.rwth-aachen.de>

Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------D5FDE99CD2DEFA03F6B02DE7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi again

After solving a library error, I got new difficulties
in the Thread pert of  compilin as follows:

---the directory:

moers:/home/weitz/perl5.005_02/ext/Thread 159> ll
total 89
-rw-r--r--   1 weitz    hiwi        20844 Oct  8 15:53 Makefile
-r--r--r--   1 weitz    hiwi          114 Jul 24 06:00 Makefile.PL
-r--r--r--   1 weitz    hiwi          566 Jul 24 06:00 Notes
-r--r--r--   1 weitz    hiwi          960 Jul 24 06:00 README
drwxr-xr-x   2 weitz    hiwi          512 Aug  8 05:57 Thread/
-rw-r--r--   1 weitz    hiwi        22818 Oct  8 16:11 Thread.c
-r--r--r--   1 weitz    hiwi         5655 Jul 24 06:00 Thread.pm
-rwxr--r--   1 weitz    hiwi        15955 Oct  8 16:26 Thread.xs*
-r--r--r--   1 weitz    hiwi          359 Jul 24 06:00 create.t
-r--r--r--   1 weitz    hiwi          279 Jul 24 06:00 die.t
-r--r--r--   1 weitz    hiwi          315 Jul 24 06:00 die2.t
-r--r--r--   1 weitz    hiwi          672 Jul 24 06:00 io.t
-r--r--r--   1 weitz    hiwi          268 Jul 24 06:00 join.t
-r--r--r--   1 weitz    hiwi          246 Jul 24 06:00 join2.t
-r--r--r--   1 weitz    hiwi          677 Jul 24 06:00 list.t
-r--r--r--   1 weitz    hiwi          535 Jul 24 06:00 lock.t
-rw-r--r--   1 weitz    hiwi            0 Oct  8 15:53 pm_to_blib
-r--r--r--   1 weitz    hiwi          757 Jul 24 06:00 queue.t
-r--r--r--   1 weitz    hiwi          348 Jul 24 06:00 specific.t
-r--r--r--   1 weitz    hiwi         1027 Jul 24 06:00 sync.t
-r--r--r--   1 weitz    hiwi         1322 Jul 24 06:00 sync2.t
-rw-r--r--   1 weitz    hiwi            0 Oct  8 16:09 thread.h

--and the messages:

moers:/home/weitz/perl5.005_02/ext/Thread 160> make
 ../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-typemap ../..
/lib/ExtUtils/typemap -typemap typemap Thread.xs >Thread.tc && mv
Thread.tc Thre
ad.c
gcc -c  -I/usr/local/include -I/opt/local/include -I/opt/gnu/include
-O    -DVER
SION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I../..  Thread.c
Thread.xs: In function `XS_Thread_yield':
Thread.xs:465: `YIELD' undeclared (first use this function)
Thread.xs:465: (Each undeclared identifier is reported only once
Thread.xs:465: for each function it appears in.)
make: *** [Thread.o] Error 1

Who can help ?

Detlef

--------------D5FDE99CD2DEFA03F6B02DE7
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Visitenkarte f|r Detlef Weitz
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Detlef Weitz
n:              Weitz;Detlef
email;internet: maen@fs-geomin.rwth-aachen.de
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------D5FDE99CD2DEFA03F6B02DE7--



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

Date: Thu, 08 Oct 1998 16:49:59 +0200
From: Lifeartist <maen@fs-geomin.rwth-aachen.de>
Subject: Errors while compil. perl5.005_2
Message-Id: <361CD117.42550122@fs-geomin.rwth-aachen.de>

Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------3F530AA0341D88941BAF7A0D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi again !

After solving some library problems, new problems I got in the Thread -
section:

-----------------First a short look at this directory:

moers:/home/weitz/perl5.005_02/ext/Thread 159> ll
total 89
-rw-r--r--   1 weitz    hiwi        20844 Oct  8 15:53 Makefile
-r--r--r--   1 weitz    hiwi          114 Jul 24 06:00 Makefile.PL
-r--r--r--   1 weitz    hiwi          566 Jul 24 06:00 Notes
-r--r--r--   1 weitz    hiwi          960 Jul 24 06:00 README
drwxr-xr-x   2 weitz    hiwi          512 Aug  8 05:57 Thread/
-rw-r--r--   1 weitz    hiwi        22818 Oct  8 16:11 Thread.c
-r--r--r--   1 weitz    hiwi         5655 Jul 24 06:00 Thread.pm
-rwxr--r--   1 weitz    hiwi        15955 Oct  8 16:26 Thread.xs*
-r--r--r--   1 weitz    hiwi          359 Jul 24 06:00 create.t
-r--r--r--   1 weitz    hiwi          279 Jul 24 06:00 die.t
-r--r--r--   1 weitz    hiwi          315 Jul 24 06:00 die2.t
-r--r--r--   1 weitz    hiwi          672 Jul 24 06:00 io.t
-r--r--r--   1 weitz    hiwi          268 Jul 24 06:00 join.t
-r--r--r--   1 weitz    hiwi          246 Jul 24 06:00 join2.t
-r--r--r--   1 weitz    hiwi          677 Jul 24 06:00 list.t
-r--r--r--   1 weitz    hiwi          535 Jul 24 06:00 lock.t
-rw-r--r--   1 weitz    hiwi            0 Oct  8 15:53 pm_to_blib
-r--r--r--   1 weitz    hiwi          757 Jul 24 06:00 queue.t
-r--r--r--   1 weitz    hiwi          348 Jul 24 06:00 specific.t
-r--r--r--   1 weitz    hiwi         1027 Jul 24 06:00 sync.t
-r--r--r--   1 weitz    hiwi         1322 Jul 24 06:00 sync2.t
-rw-r--r--   1 weitz    hiwi            0 Oct  8 16:09 thread.h

-------------Now the messages:

moers:/home/weitz/perl5.005_02/ext/Thread 160> make
 ../../miniperl -I../../lib -I../../lib ../../lib/ExtUtils/xsubpp
-typemap ../..
/lib/ExtUtils/typemap -typemap typemap Thread.xs >Thread.tc && mv
Thread.tc Thre
ad.c
gcc -c  -I/usr/local/include -I/opt/local/include -I/opt/gnu/include
-O    -DVER
SION=\"1.0\" -DXS_VERSION=\"1.0\" -fPIC -I../..  Thread.c
Thread.xs: In function `XS_Thread_yield':
Thread.xs:465: `YIELD' undeclared (first use this function)
Thread.xs:465: (Each undeclared identifier is reported only once
Thread.xs:465: for each function it appears in.)
make: *** [Thread.o] Error 1
--


Who can help ????

Detlef


--------------3F530AA0341D88941BAF7A0D
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Visitenkarte f|r Detlef Weitz
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Detlef Weitz
n:              Weitz;Detlef
email;internet: maen@fs-geomin.rwth-aachen.de
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


--------------3F530AA0341D88941BAF7A0D--



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

Date: Thu, 08 Oct 1998 14:54:15 GMT
From: elund@compuserve.com
Subject: Re: Extracting muliple values from a hash
Message-Id: <6vijmn$qqr$1@nnrp1.dejanews.com>

In article <1dgjy8e.1cfyak4qay04sN@bay1-248.quincy.ziplink.net>,
  rjk@coos.dartmouth.edu (Ronald J Kimball) wrote:
> <elund@compuserve.com> wrote:
>
> > I had:
> >   $hashRef = {a=>1, b=>2, c=>3};
> >
> > And assumed I could do:
> >   @hashRef->{a,c};
>
> That refers to the variable @hashRef, rather than $hashRef.
>
> > Which didn't work.  What I later got to work is:
> >   @$hashRef{a,c};
>
> That's the right way to do it.  You might want to be more explicit,
> however, and write
>
> @{$hashref}{a,c}

It had seemed like a reasonable extrapolation to turn $r->{k0} into @r->{k0}
in order to specify array output, especially considering how easy these
(valid) conversions to slices are:

$a[0] ... @a[0,1]
$h{k0} ... @h{k0,k1}
$$r{k0} ... @$r{k0}

Is there any way to use the -> notation and get a slice from a referenced
hash? I can sort of see why it's illegal.  In each of the three valid cases,
the $ denotes scalar output, but in the invalid case $ refers to a scalar
variable.

Thanks for the clarification,
-- Eric

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 08 Oct 1998 10:15:52 -0400
From: Ala Qumsieh <aqumsieh@tigre.matrox.com>
Subject: Re: foreach peculiarities
Message-Id: <x3yhfxfyw9z.fsf@tigre.matrox.com>


comdog@computerdog.com (brian d foy) writes:

> 
> In article <x3y1zokqhsc.fsf@tigre.matrox.com>, Ala Qumsieh <aqumsieh@tigre.matrox.com> posted:
> 
> 
> >foreach takes a LIST .. not an ARRAY! (be sure you make a distinction
> >between lists and arrays ... sometimes this is crucial!)
> 
> what are you talking about? what do you think happens when an array
> is in an argument list? remember - "this is crucial".

Well, it gets expanded as a list ... what exactly are YOU talking about?

-- 
Ala Qumsieh             |  No .. not Just Another
ASIC Design Engineer    |  Perl Hacker!!!!!
Matrox Graphics Inc.    |
Montreal, Quebec        |  (Not yet!)


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

Date: Thu, 08 Oct 1998 11:10:12 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: foreach peculiarities
Message-Id: <comdog-ya02408000R0810981110120001@news.panix.com>
Keywords: from just another new york perl hacker

In article <x3yhfxfyw9z.fsf@tigre.matrox.com>, Ala Qumsieh <aqumsieh@tigre.matrox.com> posted:

>comdog@computerdog.com (brian d foy) writes:

>> In article <x3y1zokqhsc.fsf@tigre.matrox.com>, Ala Qumsieh <aqumsieh@tigre.matrox.com> posted:

>> >foreach takes a LIST .. not an ARRAY! (be sure you make a distinction
>> >between lists and arrays ... sometimes this is crucial!)
>> 
>> what are you talking about? what do you think happens when an array
>> is in an argument list? remember - "this is crucial".
>
>Well, it gets expanded as a list ... what exactly are YOU talking about?

exactly.  so foreach can take an array.

-- 
brian d foy                                  <comdog@computerdog.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers needs volunteers! <URL:http://www.pm.org/to-do.html>


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

Date: Thu, 8 Oct 1998 10:37:37 -0400
From: "Scott H. Stevens" <sstevens@hshsl.umaryland.edu>
Subject: Help needed extracting URLs
Message-Id: <6viin5$fqh$1@list.umaryland.edu>

Hello everyone,

    I'm trying to learn how to programme in Perl on my own.  Unfortunately,
this is coming along slowly and I have a task that needs to be completed
sooner than I'll learn the language.  So I was hoping someone here could at
least give me some ideas on how to proceed, given that I understand few
commands and little of the structure of the language.

    What I need to do is open a report that contains new and old URLs.  I
need to find OLD URLs only.  The only common way element to finding these
URLs is that a "u" and a space appear before the address and a space and a $
appear after the address.  And the address may be split over 2 lines.  Below
is an example of the report:

Control No: AAE-0119    Type: as
   Old Heading:  856; 41; u
http://link.springer.de/link/service/journals/00412
                             /index.htm $
New Heading: Field Deleted

Control No: AAE-0438    Type: as
   Old Heading:  856; 41; z Citations published 1964-1965 also available
online:
                              $u http://igm.nlm.nih.gov/ $
   New Heading:  856; 41; z Citations published 1964-1965 also available
online:
                              $

Control No: AAE-1073    Type: as
   Old Heading:  856; 41; u http://www.journals.cup.org $
New Heading: Field Deleted

Control No: AAE-1085    Type: as
   Old Heading:  856; 41; u http://www.springer.de/lifesci/journals
                             /phar-tox.html $
New Heading: Field Deleted



So far my programme consists of:

open (urlreport, "856.TXT");
@array=<urlreport>;
close (urlreport);

foreach (@array){
        print (@array,"\n");
}

Not much I realise, but I was hoping someone might be able to clue me in on
the best way to approach this problem.

Thank you kindly,
Scott Stevens





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

Date: Thu, 8 Oct 1998 17:05:45 +0100
From: jwl@_munged_worldmusic.de (Joergen W. Lang)
Subject: Re: How do I format a system date?
Message-Id: <1dgl39f.1ia074t1vvlv7kN@host064-210.seicom.net>

brettr <brettr@centuryinter.net> wrote:

> I would like to have this date "10/06/98 06:41:13 CDT" look like this one
> "Tuesday October 6, 1998." How would I do that?
> 
> brettr

Look at Gareth Rees's posting from 10/07/98 
(Message-ID: <si7lycmi0m.fsf@cre.canon.co.uk>). 
I think it contains what you're looking for.

j.
-- 
  To reply by email please remove _munged_ from address Thanks !
-------------------------------------------------------------------
   "Everything is possible - even sometimes the impossible"
             HOELDERLIN EXPRESS - "Touch the void"


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

Date: Thu, 08 Oct 1998 14:36:55 GMT
From: tenthousand@youknowwhattodelete.geocities.com (Bart Van Hemelen)
Subject: how to get duplicate variables out of an array?
Message-Id: <361ccd6a.27456492@news.innet.be>

The problem is this: as the result of a database query I get an array
with possibly duplicate values. Is there an easy way to do this? Maybe
anybody has a sub for this? Is it part of a perl lib?

Bart Van Hemelen




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

Date: 8 Oct 1998 14:47:39 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: how to get duplicate variables out of an array?
Message-Id: <6vijab$ho9$2@info.uah.edu>

In article <361ccd6a.27456492@news.innet.be>,
	tenthousand@youknowwhattodelete.geocities.com (Bart Van Hemelen) writes:
: The problem is this: as the result of a database query I get an array
: with possibly duplicate values. Is there an easy way to do this? Maybe
: anybody has a sub for this? Is it part of a perl lib?

This is a FAQ.  Please consult Section 4, and look for

    "How can I extract just the unique elements of an array?"

Greg
-- 
Daphne:  Don't tell me that you've never used sex to get what you want 
Frasier: Men can't use sex to get what we want. Sex *IS* what we want.


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

Date: 8 Oct 1998 15:38:48 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How to match exactly x occurrences of a character
Message-Id: <6vima8$nbq$2@client3.news.psi.net>

Leslie Mikesell (les@MCS.COM) wrote on MDCCCLXIV September MCMXCIII in
<URL:news:6vhejr$44p$1@Jupiter.Mcs.Net>:
++ In article <6vdsnm$1dk$1@client3.news.psi.net>,
++ Abigail <abigail@fnx.com> wrote:
++ 
++ >++ You almost had it. You just need to move the parense: [^a](aa)[^a]
++ >
++ >
++ >But that fails to match "aafoo" and "fooaa". It will also set pos off
++ >one position.
++ >
++ >Use:   /(?:^|[^a])a{2}(?!a)/    (5.004)
++ > or:   /(?<!a)a{2}(?!a)/        (5.005)
++ 
++ Would this run faster than adding extra lines for the special cases?

use Benchmark;

++  /^(aa)([^a])/
++  /([^a])(aa)$/
++  /([^a])(aa)([^a])/
++ 

Note that the first and third case set pos() one further than what
you actually want to match. This may, or may not, be an issue.



Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Thu, 08 Oct 1998 11:18:53 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Perl Robots
Message-Id: <linberg-0810981118530001@ltl1.literacy.upenn.edu>

In article <361BC65C.5A983AB5@dataark.demon.co.uk>, adam
<browser@dataark.demon.co.uk> wrote:

> Yeah, I know what you mean about HTML, glass house and stones :)
> 
> but I think the lego was good
> 
> 
> 
> http://validator.w3.org/check?uri=http%3A%2F%2Fwww.literacyonline.org

Touchi!  Well done.  Of course, I didn't build that site and I've been
screaming at them to get it to validate.  :)

The sites I *do* work on validate just fine, all the way down.  Sadly,
they're at PBS and closed to the public for now.

My personal pages don't validate either.  I just don't claim they're great.  :)
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Thu, 08 Oct 1998 11:20:36 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Perl Robots
Message-Id: <linberg-0810981120360001@ltl1.literacy.upenn.edu>

In article <6vgsj7$3q1$1@news-1.news.gte.net>, "Chris \"HTMLpro\" Alas"
<rcpowerpro@geocities.com> wrote:

> maybe your HTML validator is messed up. All the pages I make a completely
> fine.

Well, I use the w3c validator at http://validator.w3c.org.  If you think
their validator is messed up, you should probably let them know, since
they write the HTML specs and the DTDs.  How do you validate your pages?

Followups set.
_____________________________________________________________________
Steve Linberg                       National Center on Adult Literacy
Systems Programmer &c.                     University of Pennsylvania
linberg@literacy.upenn.edu              http://www.literacyonline.org


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

Date: Thu, 08 Oct 1998 08:25:29 -0700
From: Peter Hanely <phanely@jps.jammed.net>
To: jrrl@lycos.com
Subject: Re: Perl Robots
Message-Id: <361CD968.2009@jps.jammed.net>

jrrl@lycos.com wrote:
> 
> I am working up a Perl branch of the {C,C++}Robots family.  For those of you
> unfamiliar with these, they are games in which robots attempt to destroy each
> other.  As a player, you write programs to run robots.  Available to your
> program are functions to move, fire, look around, and check your status.
> 
> Anyway, I figured before I wasted too much of my time on it, I'd check to see
> if there is any interest in such a beast.  Ideally, I want to have a web
> interface so you can submit your robots via a form and watch animations of
> the battle. I'd like to look at different tournament structures and different
> arenas as well (let's add obstacles and mazes!).
> 
> So... are you interested?  If so, please let me know.  Thanks.
> 
> -John.
> 
> ----
>       John R. R. Leavitt | Senior Technology Strategist | Lycos, Inc
>       412 208 1033 | jrrl@lycos.com | http://steam.letters.com/jrrl/

If you include enough of the distinctive features of PERL 
(associative arrays, etc.) I would most definately be interested.
Unlike "Chris \"HTMLpro\", I know PERL, CGI, C/C++, and would be
willing to help some with the project.

I also have a C robot I've been waiting to try against a challenger.
-- 
Peter Hanely   =/\=
phanely@jps.jammed.net  (email has been "jammed")
http://www.jps.net/mhanely
computer software etc. in Sac. Ca


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

Date: Thu, 08 Oct 1998 15:31:50 GMT
From: droby@copyright.com
Subject: Re: Perl-based script for a metasearch engine
Message-Id: <6vilt6$uru$1@nnrp1.dejanews.com>

In article <jmurphy-ya02408000R0710981827270001@news.com2000.net>,
  jmurphy@nospam.com2000.net (Jonathan Murphy) wrote:
> Tom,
>
> Stop being a fucking jerk, OK???
>

He can't.  He hasn't started being one.

He first very politely told you you were asking for something having nothing
to do with this group.	You failed to understand, and he clarified.  You
still fail to understand or you'd be aware of the correct direction to apply
that expletive.

> I found what I've been looking for already.
>

Oh.  You found a place that IS about searching for scripts?  Glad to hear it.
Bookmark that place, please, and direct future requests there.

> So go back to your little hole, you pea brain!
>

We're very happy to have Tom back from his sabbatical, as he's very good with
these polite redirects.  Most people have at least sufficient intelligence to
recognize them as such and not come back and call one of the nicest guys
around a jerk.

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 08 Oct 1998 13:47:59 GMT
From: ncrooks@nobelmed.com
Subject: PerlShop shipping question
Message-Id: <6vifqf$l9l$1@nnrp1.dejanews.com>

Has anyone successfully configured PerlShop to accept shippers other than UPS
and FedEx in the shipping table?  I want to list my shipper as CanPar, but
when I add this to the shipping table I get a "document contains no data"
error back from my browser when I hit the submit button on the order form
page.

Any help is much appreciated.

-Norm

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 08 Oct 1998 15:01:33 GMT
From: dragnovich@my-dejanews.com
Subject: Re: Please HELP!!!! Database search output format
Message-Id: <6vik4d$rqc$1@nnrp1.dejanews.com>

In article <01bdf287$8b953480$2bbe10ac@amipnet>,
  "AMIP" <sroque@man.amis.com> wrote:
> Hi!
> 	I made a perl script that will search a flat file database. My problem
is
> configuring the output. I don't want to use tables. I have four fields as
> result to searching but these are so close together (no space at all). But
> when I select View Source, they are properly justified. What do you think
> shal I do. I used FORMAT statement. Please help!!!
>
>

Try this simple HTML code :
print "<PRE>\n";
your_DB_output_vars;
print "</PRE>\n";

This have to respect all the spaces!
Or if you want try to substitute all the space with ...

$line =~ s/ /&nbsp;/g;

But you need to use a FIXED font (ie: Courrier) to display your answers and
not a variable font (ie: arial, times roman, etc.) That's all



--
------------------------
Juan Carlos Lopez
QDesigns President & CEO
http://www.qdesigns.com

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 08 Oct 1998 14:42:15 GMT
From: droby@copyright.com
Subject: Re: Problems Using a Compare Subroutine with Sort
Message-Id: <6vij07$pvc$1@nnrp1.dejanews.com>

In article <361BB7F3.7B7F7619@min.net>,
  John Porter <jdporter@min.net> wrote:
> droby@copyright.com wrote:
> >
> > Actually, I think the RFCs have usually referred to the address as
> > 4 octets. The Arpanet prior to about 1980 had 3 octet addresses.
> > IP addresses were around back when the use of a 32-bit integer was
> > a rather new idea and many minicomputers were still 16-bit machines.
> > So it wasn't a word.
> >
> > As such, there is a good deal of sense in sorting them as strings in their
> > packed form.
>
> There is a compelling logic to that.
>
> Of course, even that makes two critical assumptions:
> 	1. characters are the same size as octets;

Which of course isn't quite true anymore.

Perhaps we need to look at something bigger than octets in IPv7.  ;-)

> 	2. characters are unsigned.
>

I think that one's reasonably safe.  What would we mean by a signed character?

--
Don Roby

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 08 Oct 1998 14:59:06 GMT
From: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Sort Hash of Hashes by Inner Element
Message-Id: <8c67dvumko.fsf@gadget.cscaper.com>

>>>>> "Joel" == Joel Burton <pup@pobox.com> writes:

Joel> How can I iterate through the list using an *inner element* for my sort,
Joel> such as sorting by lead?

Joel> I'm trying something like:

Joel> foreach $show (sort { %{$HoH{$b}{lead}} <=> %{$HoH{$a}{lead}} } keys %HoH) {
Joel>     print "\n$show: $HoH{$show}{lead}";
Joel> };

Excessive punctuation detected!  Use %{...} only when you're referring
to the hash as a whole.  You don't want to do that here.  You want
to compare elements, so say it that way:

	for (sort { $HoH{$a}{lead} cmp $HoH{$b}{lead} } keys %HoH) {
		print "$_ => $HoH{$_}{lead}\n";
	}

print "Just another Perl hacker,"
-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me


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

Date: Thu, 08 Oct 1998 16:36:07 +0200
From: Andrea Spinelli <aspinelli@ismes.it>
Subject: Re: What does $INPUT{'name'} =~ s/\s+$//; do?? (I'm a newbie)
Message-Id: <361CCDD6.AFB23D65@ismes.it>

Nancy wrote:

> Hello,
>
> I'm making some changes to a script. In the script a came across the
> following line:
>
> $INPUT{'name'} =~ s/\s+$//;
>
> The only problem is that I don't know what this line do! I don't want
> to delete it without knowing what it does!!

Answer to the poster: it deletes any number of whitespace (blank,tab,...)

from the end of the line contained in $INPUT{'name'}.

Comment to the group:  this is a case for crypting the content of a
script!
What is our friend Nancy doing, given that, evidently, she does not know
what
she is doing???

:-)




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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 3928
**************************************

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