[10023] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3616 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 2 11:05:08 1998

Date: Wed, 2 Sep 98 08: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           Wed, 2 Sep 1998     Volume: 8 Number: 3616

Today's topics:
    Re: Best way to "reset" $1? <yong@shell.com>
    Re: Cookies? <jdw@dev.tivoli.com>
        eliminate *mostly* duplicate array elements <prl2@lehigh.edu>
    Re: format problem <barnett@houston.Geco-Prakla.slb.com>
    Re: format problem huntersean@hotmail.com
    Re: Freeing variables? (Mike Wescott)
        Help Converting to Lowercase <dexter@coolcounter.com>
    Re: Help Converting to Lowercase <maryesme@localaccess.com>
    Re: Help on a simple regex (Patrick Timmins)
    Re: Help on a simple regex (Patrick Timmins)
        HELP WITH PASSING AN ARRAY TO AN XSUB (David Sternlicht)
    Re: How do I create a directory only if it doesn't exis dave@mag-sol.com
    Re: How do I create a directory only if it doesn't exis (Larry Rosler)
    Re: How do I create a directory only if it doesn't exis <evhendrs@micron.net>
    Re: How do I create a directory only if it doesn't exis <jdw@dev.tivoli.com>
    Re: how to generate random password <jdw@dev.tivoli.com>
        Livingston Radius 2.0 detail file parser <melanie@tig.com.au>
    Re: Perl & Java - differences and uses <yong@shell.com>
        Perl DBI vs. LiveWire (Jay Bartelt)
        Perl gurus opinion needed. <butthead@ruxy.org.ru>
    Re: perl setup help (Mike Stok)
    Re: PerlBots rcaller@elsevier.co.uk
    Re: Tom Phoenix: ANSWERS WANTED! <jdporter@min.net>
    Re: Tom Phoenix: ANSWERS WANTED! <jdporter@min.net>
        UPDATE: Compiling GTK/Perl with Perl 5.004 on Solaris <ehendam@mailexcite.com>
    Re: Using a literal #sign? <barnett@houston.Geco-Prakla.slb.com>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 02 Sep 1998 09:01:57 -0500
From: yong <yong@shell.com>
Subject: Re: Best way to "reset" $1?
Message-Id: <35ED4FD5.C794CED3@shell.com>

I posted the original question. Thanks for everybody's response.

Indeed after I looked at my code again, I could simply re-write it by moving the
#do_something_else to $1 in the following to the inside of the if-block (as Tad
McClellan says):

while(<INFILE>)
 { if (/(string)/)
    { #do_something to $1;    #really just a further manipulation of the string
    }
   #do_something_else to $1;    #there's some database work done here
 }

I didn't see that initially because #do_something_else was a little too long. It
may be a good idea to use a sub in place of it.

Jonathan Feinberg is right that the match has to be successful at the second time
in order to overwrite the $1 set at the first time. But I don't foresee any
pratical use of resetting $1 in the near future. (It would be nice to see some
code that unavoidably uses it).

Yong Huang
Email:yong@shell.com



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

Date: 02 Sep 1998 07:39:25 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: Cookies?
Message-Id: <ob7lzmn0xu.fsf@alder.dev.tivoli.com>


"Felix Tarnarider" <felix@tarnconsulting.com> writes:
> How do you set a cookie in Perl(Win32)? I tried to set an environment
> variable but the next .pl file could not get the value from the variable. Is
> there any way to pass a variable without a post or get with the value in the
> url?
> 

I would start with perldoc CGI, it has example code for cookies.

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: Wed, 2 Sep 1998 09:47:35 -0400
From: "Phil R Lawrence" <prl2@lehigh.edu>
Subject: eliminate *mostly* duplicate array elements
Message-Id: <6sji9o$1j16@fidoii.cc.Lehigh.EDU>

I grabbed the following from the FAQ to eliminate duplicate array elements:

    undef %saw;
    @list = grep(!$saw{$_}++, @raw_list);

However, I need to eliminate duplicate array elements *even* if they have differing whitespace.  (So I guess they would be mostly
duplicate.)

Example:  Keep only one of the following:

"                     hallo"
"      hallo           "

Any ideas?  I'm a little dim on how the FAQ solution actually works, so I'm pretty much in the dark about modifying it.

Thanks,
Phil R Lawrence




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

Date: Wed, 02 Sep 1998 07:59:44 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
To: didier@referencement.net
Subject: Re: format problem
Message-Id: <35ED4140.440B55B0@houston.Geco-Prakla.slb.com>

Didier LADNER wrote:
> 
> Hi,
> 
> I'am using for the first time the format function.
> 
> This snippet goes wrong:
> $a = "one";
> $b = "two";
> $c = "tree";
> 
>         format STDOUT =
>         @<<<<<@||||||@>>>>>
>         $a, $b, $c
>         ====================
>         .
I'm assuming that the above is exactly how you have written your code. 
It is incorrect.

The terminating character, '.' in this case, MUST (100% *MUST*) be at
the beginning of the line.  The 'format STDOUT =' probably should be
also, but that is a matter of style preference.

Since '.' characters are allowed in formats, the '.' must be at the 0'th
position on the line for Perl to recognize it as the end of format
character.

Without it, the following statement is considered part of the format, as
well:
> 
>         write STDOUT;
> 
> with error:Format not terminated at dir2.pl line 15, at end of line
>  Could somebody tell me why?
By removing the whitespace before the '.', it works fine for me.

> Regards
> --
> Didier
Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer	(281) 596-1434

"Do, or do not.  There is no try."
	- Yoda, Jedi Master


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

Date: Wed, 02 Sep 1998 13:40:38 GMT
From: huntersean@hotmail.com
Subject: Re: format problem
Message-Id: <6sjhsm$grb$1@nnrp1.dejanews.com>

The dot (".") terminator has to be in the first column.  In your snippet it is
preceded by whitespace.

Sean H

In article <35EC5A72.1935C77F@referencement.net>,
  didier@referencement.net wrote:
> Hi,
>
> I'am using for the first time the format function.
>
> This snippet goes wrong:
> $a = "one";
> $b = "two";
> $c = "tree";
>
> 	format STDOUT =
> 	@<<<<<@||||||@>>>>>
> 	$a, $b, $c
> 	====================
> 	.
>
> 	write STDOUT;
>
> with error:Format not terminated at dir2.pl line 15, at end of line
>  Could somebody tell me why?
> Regards
> --
> Didier
> --
> ____________________________________________________________
>
> Didier LADNER.
> Merci de votre interet. Nous faisons prosperer vos affaires.
> http://www.referencement.net
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 02 Sep 1998 09:53:50 -0400
From: wescott@cygnus.ColumbiaSC.NCR.COM (Mike Wescott)
To: Rik Blok <blok@physics.ubc.ca>
Subject: Re: Freeing variables?
Message-Id: <x43eaa39kc.fsf@cygnus.ColumbiaSC.NCR.COM>


[email cc sent]

In article <35EB9366.C25F2680@physics.ubc.ca> Rik Blok writes:

> How do I free memory used by variables?

The usual way is to undef these variables or to set them to "small"
values, the null string, the null array, the null hash.

Note, however, that this returns memory only back to the program for
reuse. It will not (on most systems) return it it for use by other
programs or the system.

Usually, this is not really a problem. Should a large amount memory remain
unused it will migrate to swap space and "real" memory will be freed for
general use. If it should be a problem, one could probably rework the
program so that the memory intensive part was a separate process, transient
in execution.

> How can I watch the allocated memory to be sure it is getting freed 
> properly?

On a Unix system, you can use ps or top to monitor memory usage of a
process. The two values of interest are process size and resident set
size. The former is the total memory space allocated to the process,
the latter is the current amount, actively in use (not swapped out).

If you are more concerned with the possibility of memory leaks in
your program or in the perl interpreter, I'd check out some of the
debugging options available including using the PERL_DEBUG_MSTATS
environment variable (see perldebug). I've not used it myself so
I can't offer more concrete advice.

-- 
	-Mike Wescott
	 mike.wescott@ColumbiaSC.NCR.COM


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

Date: Wed, 2 Sep 1998 06:42:11 -0700
From: "Dexter Maxwell" <dexter@coolcounter.com>
Subject: Help Converting to Lowercase
Message-Id: <35ed4b11.0@blushng.jps.net>

Can anyone help me???  I need to be able to convert a variable to all lower
case.  It seems simple, but I can't get it to work.  Here's what I've got:

$data = $ENV{'QUERY_STRING'};
while (<>) { tr/A-Z/a-z; }
print "$data\n";
exit;

Thanks for your help!





++++++++++++++++++++++++++++++++
HEY!!!  DO YOU HAVE A WEB SITE???
Then you NEED Cool Counter!
"The World's Coolest Visitor Counter"
http://www.coolcounter.com <= CLICK HERE
Get a FREE, easy-to-install web site
visitor counter that will track
the visits to your ENTIRE web site!
We even give you DETAILED statistics!
"Because you deserve to know..."
++++++++++++++++++++++++++++++++




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

Date: Wed, 02 Sep 1998 06:56:30 -0700
From: Mark Lybrand <maryesme@localaccess.com>
To: Dexter Maxwell <dexter@coolcounter.com>
Subject: Re: Help Converting to Lowercase
Message-Id: <35ED4E8E.20F9@localaccess.com>

Well, I see a couple of problems:



> $data = $ENV{'QUERY_STRING'};
> while (<>) { tr/A-Z/a-z; }

1. What are you reading from STDIN??  I thought you wanted to lowercase
whatever was in $data (i.e. the query string). If, however, you are
passing a filename to the CGI via the query string, you will need to
open it first.

2. If you are using "tr", I do believe you need to have a final "/". 
However, Perl provides a function called "lc()" that will do exactly
what you want.


> print "$data\n";
> exit;
> 



> Thanks for your help!
> 

Hope this helps.

Mark :)

> ++++++++++++++++++++++++++++++++
> HEY!!!  DO YOU HAVE A WEB SITE???
> Then you NEED Cool Counter!
> "The World's Coolest Visitor Counter"
> http://www.coolcounter.com <= CLICK HERE
> Get a FREE, easy-to-install web site
> visitor counter that will track
> the visits to your ENTIRE web site!
> We even give you DETAILED statistics!
> "Because you deserve to know..."
> ++++++++++++++++++++++++++++++++


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

Date: Wed, 02 Sep 1998 13:54:50 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
Subject: Re: Help on a simple regex
Message-Id: <6sjina$hqd$1@nnrp1.dejanews.com>

In article <6sis5q$dtd$1@trader.ipf.de>,
  "Andreas Vierengel" <avierengel@citynet.de> wrote:
> Hi everybody!
> I am reading lines from a file and do a regex on each line.
> I want to match a line if it contains a certain string only ONE time.
> Example:
> string to match: 'ab'
>
> possible lines:
>
> "abdfgab1234abhj"             <-- should not be matched because of three
> occurences of 'ab'!
> "kjhdsbabakkioi"                  <-- should be matched!
>
> Is ist possible to do this in one regex?

$match_once = "ab";   # or whatever you want only once in a line
while (<>) {
    unless (/$match_once.*$match_once/) {print;}
}

Patrick Timmins
U. Nebraska Medical Center

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 02 Sep 1998 14:05:06 GMT
From: ptimmins@netserv.unmc.edu (Patrick Timmins)
To: avierengel@citynet.de
Subject: Re: Help on a simple regex
Message-Id: <6sjjai$im0$1@nnrp1.dejanews.com>

A copy of this posting was sent to avierengel@citynet.de

In article <6sis5q$dtd$1@trader.ipf.de>,
  "Andreas Vierengel" <avierengel@citynet.de> wrote:
> Hi everybody!
> I am reading lines from a file and do a regex on each line.
> I want to match a line if it contains a certain string only ONE time.
> Example:
> string to match: 'ab'
>
> possible lines:
>
> "abdfgab1234abhj"             <-- should not be matched because of three
> occurences of 'ab'!
> "kjhdsbabakkioi"                  <-- should be matched!
>
> Is ist possible to do this in one regex?
>
> --Andy
>

In my previous post I incorrectly suggested:

$match_once = "ab";
while (<>) {
    unless (/$match_once.*$match_once/) {print;}
}

Oops! probably want to match at least once, which my previous post
didn't do (sorry). How about:

$match_once = "ab";
while (<>) {
    if (/$match_once/) {
        unless (/$match_once.*$match_once/) {print;}
    }
}

or

$match_once = "ab";
while (<>) {
    while (/$match_once/g) {$i++;}
    print if ($i == 1);
    $i = 0;
}

Did not benchmark these to see which might me optimal (I would suspect
the second).

Sorry again for misleading you with my first post.

Patrick Timmins
U. Nebraska Medical Center

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: 2 Sep 1998 08:57:05 -0500
From: dms@lynx.cat.syr.edu (David Sternlicht)
Subject: HELP WITH PASSING AN ARRAY TO AN XSUB
Message-Id: <35ed40a1.0@news.syr.edu>


I would appreciate any help on this one.  I want to pass a string,
a scalar (int) and an array to an XSUB c routine as follows:

1)  perl code:
use ExtUtils::testlib;
use Cfunc;
@my_ary = ("a1", "a2", "a3", "a4", "a5", "a6" );
Cfunc::cfunc("my_title", 3, \@my_ary);

2) XSUB code:
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#include <stdio.h>
MODULE = Cfunc          PACKAGE = Cfunc
void
cfunc(title,ncount,table)
 char* title
 int ncount
 char* table
CODE:
        char* t1; int nc1; char* tab1; int i;
        t1 = (char*)SvPV(ST(0),na);
        printf( "%s\n", t1 );
        nc1 = SvIV(ST(1));
        printf( "%d\n", nc1 );
        tab1 = (char*)SvPV(av_shift((AV*)SvRV(ST(2))),na);
        printf( "%s\n", tab1 );

3) output:
my_title
3
a3

Can some kind soul tell me why I did not see a1 printed out instead
of a3 ???, ???!!!:-) What am I missing here?  Ideally I would like
to have a loop that prints out ncount elementes of the array.

Cheers!

Dave Sternlicht




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

Date: Wed, 02 Sep 1998 13:08:09 GMT
From: dave@mag-sol.com
Subject: Re: How do I create a directory only if it doesn't exists
Message-Id: <6sjfvp$dpm$1@nnrp1.dejanews.com>

In article <6sissb$44i$1@claire.desy.de>,
  "Rolf Rettinger" <rolf.rettinger@desy.de> wrote:
>
> is there any function like sysopen for a file to create a directory only if
> it doesn't exists?

Something along the lines of

mkdir $dir, $mode unless -d $dir;

perhaps?

Dave...


--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Wed, 2 Sep 1998 06:36:27 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How do I create a directory only if it doesn't exists
Message-Id: <MPG.1056e9b3785d983798981c@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and copy mailed.]

In article <6sissb$44i$1@claire.desy.de> on Wed, 2 Sep 1998 09:41:56 
+0200, Rolf Rettinger <rolf.rettinger@desy.de> says...
> is there any function like sysopen for a file to create a directory only if
> it doesn't exists?

Why not just test for its existence before trying to make it?

mkdir $dir, 0777 or die "Couldn't mkdir $dir. $!" unless -d $dir;

That will cause a problem if $dir exists but is a file, so you might want 
to elaborate the test to meet your needs.

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


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

Date: Wed, 02 Sep 1998 07:47:28 -0600
From: Ed Henderson <evhendrs@micron.net>
Subject: Re: How do I create a directory only if it doesn't exists
Message-Id: <35ED4C70.CA289CC3@micron.net>

Rolf Rettinger wrote:

> Hi,
>
> is there any function like sysopen for a file to create a directory only if
> it doesn't exists?
>
> Thanks Rolf

use File::Path;

$path = "c:/foo/bar/bletch";
mkpath($path,1,0777);

mkpath is quite nice, it will create the whole path, not just a single
directory. If the path or any/all components currently exist, it won't
do anything.

This is a bit more than you were asking for, but it will provide what
you need for sure...




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

Date: 02 Sep 1998 07:45:03 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: How do I create a directory only if it doesn't exists
Message-Id: <ob67f6n0og.fsf@alder.dev.tivoli.com>


"Rolf Rettinger" <rolf.rettinger@desy.de> writes:
> is there any function like sysopen for a file to create a directory only if
> it doesn't exists?

you can use the -d test:

mkdir $directory,0755 if ! -d $directory;

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com


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

Date: 02 Sep 1998 07:35:12 -0500
From: "Jim Woodgate" <jdw@dev.tivoli.com>
Subject: Re: how to generate random password
Message-Id: <ob90k2n14v.fsf@alder.dev.tivoli.com>


"Dan Bassett" <dan@bns.com> writes:
> A random password which can contain a combination of uppercase
> letters, lowercase letters and numbers with a length of between
> 8 and 10 digits...

Weird, someone posted the exact same question on clp.modules... :)

Here's the same code I posted as an answer to that post...


@validchars = ( A..Z, a..z, 0..9 );

$rpass = "";
for ( 0..(rand(3)+7) ) {
  substr($rpass,$_,1) = $validchars[rand($#validchars+1)];
}
print "$rpass\n";

-- 
Jim Woodgate 
Tivoli Systems
E-Mail: jdw@dev.tivoli.com



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

Date: Wed, 02 Sep 1998 23:39:22 +1000
From: Melanie <melanie@tig.com.au>
Subject: Livingston Radius 2.0 detail file parser
Message-Id: <35ED4A8A.F834025@tig.com.au>

Hi there - I am in need of   Livingston Radius 2.0 detail file parser.

If you can help, please email me at tablet_g@hotmail.com





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

Date: Wed, 02 Sep 1998 09:12:40 -0500
From: yong <yong@shell.com>
Subject: Re: Perl & Java - differences and uses
Message-Id: <35ED5258.5CC309BE@shell.com>

I have a feeling that the Perl people generally don't like Java very much and
the Java people don't like Perl much either. I personally prefer Perl since I
think it requires less memorizing. If you use Java, almost always you have to
have a language reference (API reference) on your desk, unless you already
learned so many things by heart and possibly got certified by Sun. To program in
Perl, or C (another language that doesn't heavily rely on complicated API's),
you can start right away.

On the other hand, the Java people don't like Perl mainly because Perl looks
"ugly" and "cryptic" at first sight.

Yong Huang
Email:yong@shell.com

Jim wrote:

> As a young(17) and budding internet page designer I have often been told
> "forget the rest, learn Java" when asking about programming for the net,
> this is also the message Internet magazines tend to give. However having
> recently been learning Perl(and loving it) I am curious as to the power Java
> has over Perl, what the main uses are and the main differences are, will
> Perl eventually be replaced by Java?
>
> If anybody has some helpful links I would be grateful.
>
> Jim



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

Date: Wed, 02 Sep 1998 13:37:55 GMT
From: bartelt@enteract.com (Jay Bartelt)
Subject: Perl DBI vs. LiveWire
Message-Id: <35ed48d8.1881485@news.enteract.com>

We are beginning additional development on a Enterprise Server driven
website in which a majority of the code is LiveWire javascript.  Is it
worth attempting a performance comparison between the current LiveWire
setup and perl using DBI to access a rather huge Oracle database?

I read in a FAQ that LiveWire javascript runs 60 times faster on
complex queries than Perl.  Is the fact that this is on a Netscape
Enterprise FAQ show that they are complete liars or are they whistling
the right tune here?

I would prefer to use Perl as I am tired of dealing with these moronic
 .web files compiled by LiveWire.  Has anybody out there done a
comparison or have an opinion?  Thanks!


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

Date: Wed, 02 Sep 1998 17:17:00 +0400
From: Dmitry Dorofeev <butthead@ruxy.org.ru>
Subject: Perl gurus opinion needed.
Message-Id: <35ED454C.7BF1601F@ruxy.org.ru>

Hello, here !

I have possibly{0,1} new word for general purpose use.
it's sounds 'Perlacker'.

Hope it can replace well known 'Perl Hacker' pair 
and save some paper and disk space :-) 
actually only 2 bytes per old pair:-(

Problem: I am not native English speacker. May
be Perlacker has some associations with NOT good things?

If not, I invite you to use this word in any printed or
verbal media.

My friends (at St.-Petersburg, Russia) already use this word.
Your appinion is very welcome to us and me personally.

Good luck,
-Dmitry Dorofeev


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

Date: 2 Sep 1998 13:12:11 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: perl setup help
Message-Id: <6sjg7b$6i@news-central.tiac.net>

In article <35ECF4BE.BF7BCCAE@aloha.net>,
Jeff & Rebecca Jo Isom  <isom@aloha.net> wrote:
>I have just installed Red Hat Linux 5.1 and am trying to get perl up and
>running.  The box set came with perl and the installation put it in
>/usr/bin/perl.  I typed in the following script (copied from O'reilly
>Learning Perl book):
>
>#!/usr/bin/perl -w
>print ("Hello, world!\n);
>
>I get a permission denied message when I try to run the script.  I'm not
>sure if this is the right newsgroup for help with this, but I thought I
>would give it a shot.  I am new to Linux so please be detailed if the
>answer involves changing something there.  Thanks in advance for any
>help.

It the file's called try.pl and in the current directory then does

  perl try.pl

work?  If it does then maybe the execute bits aren't set on try.pl so you
can say

  chmod +x try.pl

and then  try

  ./try.pl

to run it. 

Hope this helps,

Mike

-- 
mike@stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41
stok@colltech.com                  |            Collective Technologies (work)


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

Date: Wed, 02 Sep 1998 13:05:28 GMT
From: rcaller@elsevier.co.uk
Subject: Re: PerlBots
Message-Id: <6sjfqp$dh3$1@nnrp1.dejanews.com>

In article <35E5882D.ED0F3BB@elsevier.nl>,
  Leon Brocard <l.brocard@elsevier.nl> wrote:

> I guess you probably didn't use Chatbot::Eliza then ;-)
>
I'll have to look into that a bit more....

> btw Is there web/irc access to this bot so that we can stress its
> language skills? This is the major way that I tested dabot,
> changing its grammar as people played with it on slashNET.

Not yet fully accessable, I've got a few people playing with it while I work
on it.	It's designed to talk about a rather obscure data set anyway....

>
> Hmmm. Time to code up a Lingua::EN::Parse then. Anyone want to do
> this then? ;-) Parse::RecDescent would be good as we could then
> change the grammar depending on twists in the conversation...
>
  A little beyond my ability at the moment, I've got absolutely no
qualifications in IT at all but have been doing bits and pieces for quite a
while now...

> So, why code bots in Perl? One simple answer: regular expressions.
> They make parsing simple English easy...

Exactly, theres also the fact that its so commonly available.

> btw Rich, got any pointers to info that you've used?
>

Most of the design concepts have come from looking at other bots etc.  Not
much source code seems commonly available so most of it I've made up as I
went along.  As for the data the 'bot is delivering, this is another of the
problems, not being a data storage expert it simply consists of assorted
files full of patterns and responses.  Not that this has anything to do with
a practical application yet, it was something I knocked up in a few hours
while waiting for my real work software to do stuff.

> Oh. And I appear to now be working in the same company as you ;-)

So we do, I see you're over in the main part of the Company though.

> Leon

> Leon Brocard...............................................Perl Hacker
> l.brocard@elsevier.nl...........................http://www.astray.com/

Rich Caller - rcaller@elsevier.co.uk
The Lancet Interactive technical development Bloke....

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum


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

Date: Tue, 01 Sep 1998 10:17:43 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Tom Phoenix: ANSWERS WANTED!
Message-Id: <35EC0207.B9F3F831@min.net>

Elaine -HappyFunBall- Ashton wrote:
> 
> end of thread.

Only Hitler-types think they can end a thread
by simply declaring it ended.

-- 
John Porter


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

Date: Tue, 01 Sep 1998 10:26:53 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Tom Phoenix: ANSWERS WANTED!
Message-Id: <35EC042D.E9DF23BC@min.net>

Jerome O'Neil wrote:
> 
> John Porter wrote:
> >
> > Tom is (almost) always polite, but his answers
> > RARELY provide any real insight or direction.
> 
> I quite strongly disagree.  When a person is asking CGI, web server, and
> other off topic questions, the (I'll try and quote here) "...FAQs,
> documents, and newsgroups for those topics..." are clearly the directon
> one should go if they wish to gain insight into the problem at hand.

O.k.  When the answer is "RTFM", rootbeer gives it, and courteously too.

When the answer is "you're not likely to find the answer here", rootbeer
(courteously) says as much and little more.

When the answer involves explanations, examples, philosophizing or
chastising, rootbeer is (or seems to be) out of his depth.

JMHO, and nothing agains Tom P, who is a great guy and a fine,
upstanding citizen in our increasingly fractious community.

-- 
John Porter


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

Date: Wed, 02 Sep 1998 13:48:39 GMT
From: "Mohamed Hendawi" <ehendam@mailexcite.com>
Subject: UPDATE: Compiling GTK/Perl with Perl 5.004 on Solaris
Message-Id: <X0cH1.92302$Xy6.15464728@news.rdc1.ct.home.com>

FYI:

Thanks to everyone who responded to this (Kenneth Albanowski, David
Monniaux, Greg Onufer).  I did successfully compile GTK/Perl 0.3 actually on
Solaris 2.51 with perl 5.004_04.  I had to recompile Perl with the
-fPIC option.  Once I did that, the Makefile generated for GTK/Perl
automatically contained -fPIC (without any hacking) and everything
worked fine.

-Moe

> I cannot compile GTK/Perl 0.2.04 on Solaris 2.51 with perl
5.004_04.  I get
> the following
> error:
>
> ld: fatal: too many symbols require "small" PIC references:
>     have 4543, maximum 2048 -- recompile some modules -K PIC.
>
> Any idea what this could mean?  I have tried this with all permutations of
> GTK/Perl 0.2.04 and 0.3 and GTK 1.0.5 and 1.1.1.
>
> One additional note:  I tried hacking the CCFLAGS in the Makefile
to include
> "-fpic".  I still get the same problem though.






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

Date: Wed, 02 Sep 1998 07:44:03 -0500
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: Using a literal #sign?
Message-Id: <35ED3D92.808F46D6@houston.Geco-Prakla.slb.com>

Robert Duggan wrote:
> 
> How can I imbed a literal #sign in Perl?  I tried preceding it
> with a backslash, but it still gets treated as a comment flag.
> 
> Thanks
> Robert Duggan
> rduggan3@compuserve.com
> 
> --
> Robert Duggan
Robert:

In what way do you wish to 'imbed' a # sign?
$variable = 'This is some text with a # in it';

works fine.  What exactly did you have in mind?  Code snippet
demonstrating what you are trying to actually accomplish would be
helpful.

Cheers,
Dave

-- 
Dave Barnett	Software Support Engineer	(281) 596-1434


Why is it called tourist season, if you can't shoot at them?


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

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

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