[9719] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3313 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Aug 2 00:05:00 1998

Date: Sat, 1 Aug 98 21:00:18 -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           Sat, 1 Aug 1998     Volume: 8 Number: 3313

Today's topics:
        ...maybe not <REPLY_TO_damonbrent@earthlink.net>
        file system operations on open files (Mark-Jason Dominus)
    Re: Good Book? <jdporter@min.net>
    Re: hiding user input (Abigail)
    Re: How to read a variable from another Perl program? (-)
    Re: HTML module - would this be useful to you? <rbowen@databeam.com>
        Looking for a PERL programmer to write a web access tra <cchuang@bigfoot.com>
    Re: Newbie: extracting fields (Martien Verbruggen)
    Re: non-perl question about linux (-)
    Re: non-perl question about linux (-)
    Re: number (6 -> 06) conversion question <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Passing Large Numbers of Parameters to Subroutines <mpersico@erols.com>
        Problem using timelocal.pl - possible perl bug? (Stewart Boutcher)
        Problem with variables in simple script... (Loans2001)
        Q:Threaded 5.005 Under hpux? <dereks@fc.hp.com>
    Re: Self-referential regexps in Perl/ Representation of (Ilya Zakharevich)
    Re: Try perl on Ms Dos <alan@find-it.furryferret.uk.com>
    Re: What's the future of Perl? (-)
    Re: What's the future of Perl? (M.J.T. Guy)
        WIN32::ODBC problem jckchan@hkstar.com
    Re: Writing 'date' format with OraPerl on a Oracle DB. <simonf@conduit.co.uk>
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Thu, 30 Jul 1998 11:52:11 -0400
From: "Brent Verner" <REPLY_TO_damonbrent@earthlink.net>
Subject: ...maybe not
Message-Id: <6pq1cv$icv$1@birch.prod.itd.earthlink.net>


>>When/where is the Win32-executable perl.exe of Perl 5.005 available? The
>>site http://www.perl.com/pace/pub/perldocs/latest.html still says
>>"The current version is perl5.00402-bindist04-bc.zip (or .tar.gz if you
>>prefer)." and the contents of the ftp-directory seems to confirm this.

this is correct for now.

>>Or is the binary distribution somewhere else available?
>>
>
>The ActivePerl distribution at http://www.ActiveState.com is based on
>5.005.
>
>Hope this helps,

unlikely. -- the following was cut from activestate's website

8<----------------------------
The ActivePerl package contains all you'll need to get Perl up and
running -- even with a Web server! ActivePerl includes:

Perl for Win32 - binary of core Perl distribution.
Perl for ISAPI - IIS plug-in that makes perl CGI lightning fast.
PerlScript - ActiveX scripting engine, like JavaScript or VBScript with a
Perl brain.
Perl Package Manager - Perl extension installer and manager.


Build information
The latest build of Perl for Win32, Perl for ISAPI and PerlScript is Build
316.
This is based on 5.003_07 Core Perl code.
------------------------------>8


i have been trying to compile the 5.005 for about a week now, with no luck.
i'm on win98, so that's probably the reason i can't compile it.  i've tried
bc5 and vc5.  you'll have to wait until GS builds it, or know someone who
got it to build, or (heaven help you [and your sanity]) build it yourself.

brent
>
>--
>Brian Jepson * (bjepson@ids.net)  * http://users.ids.net/~bjepson
>              Choosy mothers choose to chew Chew-Z



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

Date: 30 Jul 1998 22:49:30 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: file system operations on open files
Message-Id: <6prbbq$50i$1@monet.op.net>


In article <MPG.1029c986f0f22ff798979e@nntp.hpl.hp.com>,
Larry Rosler <lr@hpl.hp.com> wrote:
>Dominus:
>> It is.  Ilya was making a joke.  Larry is just confused.
> 
>Each of those three statements is wrong.
>
>A false statement was made here, that it is 'portable' to unlink or 
>rename a file while it is open.

You have put the word `portable' in quotes, which suggests that you
are quoting me, but you are not.  I did not use the word `portable'
because I was not making an assertion of portability; nor did I intend
to make such an assertion.

I said that it was `OK' to do unlink open files, by which I meant that
it would work to solve the specific problem I was addressing, the
problem raised in the article to which I was replying.  It is not my
fault if you and Ilya were confused by this into assuming that I was
speaking of portability when I was not, or that I was making a general
assertion of `OK'ness in a broader context.  I was even careful to
qualify my statement about it being `OK'; I specifically mentioned
Unix in the following sentence.

I will stand by my assessment that you were confused; you apparently
saw the word `portable' where none appeared.  I was mistaken when I
said that Ilya was making a joke; it now appears that he too was
confused.

I feel as if I had advised someone to wear a grounding strap while
replacing their serial card, and then you and Ilya jumped on me
because it is is inappropriate to wear grounding straps to affairs of
state.  Grounding straps certainly are inappropriate garb at state
dinners, but the rest of us were talking about what to wear while
replacing serial cards.




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

Date: Fri, 31 Jul 1998 14:49:33 GMT
From: John Porter <jdporter@min.net>
Subject: Re: Good Book?
Message-Id: <35C1DA18.51EC@min.net>

Tom Christiansen wrote:
> 
> Dave Mckeown <dmckeown@istar.ca> writes:
> :I just bought "Perl 5 Complete"...
> :Is [it] any good?
> :any one read it?
> :any opinions??
> 
> See http://www.perl.com/perl/critiques/

The Camel Critiques page is indispensible for deciding
what books to use.

But it is of little help it determining whether a book
is useful, which does not appear in its list.

-- 
John Porter


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

Date: 31 Jul 1998 06:14:31 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: hiding user input
Message-Id: <6prnc7$61r$1@client3.news.psi.net>

Gary L. Burnore (gburnore@databasix.com) wrote on MDCCXCV September
MCMXCIII in <URL: news:35c134cf.1310295@nntpd.databasix.com>:
++ 
++ WTF can't you either answer the question or let it go?


If you don't think a pointer to the FAQ isn't the answer to a question,
you're in desperate need of professional help.



Abigail
-- 
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT


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

Date: Fri, 31 Jul 1998 00:41:52 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: How to read a variable from another Perl program?
Message-Id: <35c111b9.200508728@news2.cais.com>

linberg@literacy.upenn.edu (Steve Linberg) Said this:

>In article <6pqcru$g50$1@nnrp1.dejanews.com>, guna@my-dejanews.com wrote:
>
>> Hi,
>>    i have two independant perl programs, say "server" and "client".
>> The "server" starts something like,
>> 
>> #!/usr/local/bin/perl
>> 
>> $myname = "John Steamer";
>> .
>> .
>> 
>> Now, is there a way i can read $myname from "client" without actually parsing?
>> something like an "extern" in "C" programs. If i use "require" it actually
>> executes the "server" code which i don't want.
>
>Take your pick:
>
>Put it in a text file/database/etc.
>Set an environment variable.
>Pass it as a parameter.
>Merge your programs.

Yes... having a "common" file to act as a go between is nice... you
could even probably use flock as a "token", the reader could sit there
while looping until flock succeeds with taking control of the file,
and then you know the other program has made a write to it.

But there's also other ways.  It's really going to depend on the
purpose of the two programs.  If you want one process just to act as a
"cache" of a large file or list, then look into IPC::Shareable.  If
you want to interactively run a program, look into IPC::Open2.  

Of course, there's other ways too.  The Waite Group Press book "Perl 5
Interactive Course" has lots of client/server examples.  It's a nice
book to have handy for other tasks too, so it's worth the $30 or so it
costs.




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

Date: Thu, 30 Jul 1998 11:07:46 -0400
From: Rich Bowen <rbowen@databeam.com>
To: brian d foy <comdog@computerdog.com>
Subject: Re: HTML module - would this be useful to you?
Message-Id: <35C08C42.2955@databeam.com>

brian d foy wrote:
> 
> In article <35BF852A.5C3C@databeam.com>, rbowen@databeam.com posted:
> 
> > So, my question is whether anyone else other than me sees the value of
> > this, and, if so, would HTML::Template be a reasonable name for it, or,
> > am I just missing an existing implementation of this same idea?
> 
> is there any reason it has to be limited to HTML?  does it do the
> same thing as Text::Template?

Yes, it looks like that might be doing what I need, and then some. The
fact that the author calls it Beta, and it has not been touched since
Jan 96 makes me a little nervous, but I suppose I can contact him
directly for a litte more info.

Thanks for the pointer.

Rich
-- 
###############################################
# Rich Bowen             rbowen@databeam.com  #
# Web Services Engineer  DataBeam Corporation #
###############################################


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

Date: Sat, 01 Aug 1998 22:28:13 -0600
From: "Roger C. Chuang" <cchuang@bigfoot.com>
Subject: Looking for a PERL programmer to write a web access tracking script.
Message-Id: <35C3EADD.DEB069D9@bigfoot.com>

Hi.

I am looking for someone to write a web access tracking for me.
It must be written in perl and be able to track any Website traffic
no matter which platform.

There are two outputs for the CGI program


my email address is cchuang@bigfoot.com
1. graphical interface ( refer to http://www.wildlook.com/cgishop)

Please forget about those chineses characters. In the image show
the daily, weekly, monthly traffics.

2. Generate a web-based report just like any other web tracking program.

If you think you can do that, contact me at cchuang@bigfoot.com
also let me know how much for the script.


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

Date: 31 Jul 1998 02:16:42 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Newbie: extracting fields
Message-Id: <6pr9ea$da0$1@nswpull.telstra.net>

In article <6pmodc$tev$1@nnrp1.dejanews.com>,
	greggman@my-dejanews.com writes:

> I'm reading a file one line at a time.  A typical line looks like this
> 
>  .fdata.s  f'33.011974, f'50.352013, f'-30.042702	; max
> 
> How do I get $1, $2 and $3 to be 33.011974, 50.352013, -30.042702
> respectively?

One way:

#!/usr/local/bin/perl5.00404 -w 
use strict;

while (<DATA>)
{
	my @f = (split /[\s,]+/)[1,2,3];
	foreach my $f (@f)
	{
		$f =~ s/f'//;
	}

	print join(':', @f), "\n";
}

__DATA__
 .fdata.s  f'33.011974, f'50.352013, f'-30.042702        ; max

>   I tried this
> 
>   /\s*fdata\.s\sf\'([\d\.\-]+),\sf\'([\d\.\-]+),\sf\'([\d\.\-]+).*/;

You're missing a few +'s

For legibility i'll use the x modifier. I'll also be negating the
condition, meaning: instead of looking for every valid character that
might be a number, I'll look for every character that is not a , or
whitespace. I also won't be matching the whole string, but just the
number parts. As always, there is more than one way to do it:

	my @f = m|
		f'([^,\s]+)		# match the first number
		[,\s]+			# match the crap
		f'([^,\s]+)		# match the second number
		[,\s]+			# match the crap
		f'([^,\s]+)		# match the third number
	|x;

@f now contains the three numbers. If you'd rather have them in
$1,2,3, then leave off the my @f = part.

>   scanf (" fdata.s f!%f, f'%f, f'%f", &v1, &v2, &v3);

scanf is evil :)

Martien
-- 
Martien Verbruggen                      |
Webmaster www.tradingpost.com.au        | "In a world without fences,
Commercial Dynamics Pty. Ltd.           |  who needs Gates?"
NSW, Australia                          |


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

Date: Fri, 31 Jul 1998 04:03:54 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: non-perl question about linux
Message-Id: <35c14185.212695690@news2.cais.com>

rjk@coos.dartmouth.edu (Ronald J Kimball) Said this:

>I'm sorry, I believe you're looking for the comp.lang.non-perl.misc
>newsgroup.

Blah blah blah.

>
>Moron.
>

nice... you found a very descriptive sig line for your message.  You
obviously only read the part of the message that was "off-topic"
without being able to read the part where he said he KNEW it was off
topic but figured the people who frequent this newsgroup would
probably be a good source for information on linux.  I suppose you are
an NT nut and so you feel intimidated by questions pertaining to a
real, robust operating system that outperforms NT any day?





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

Date: Thu, 30 Jul 1998 20:35:37 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: non-perl question about linux
Message-Id: <35c0d7f1.185769362@news2.cais.com>

Dan Nguyen <nguyend7@egr.msu.edu> Said this:

>Brent Verner <REPLY_TO_damonbrent@earthlink.net> wrote:
>Simple.
>Do you want to spend $$.  RedHat
>Do you want it FREE.      Debian
>
>Do you want an easy time installing and managing.  RedHat.
>Do you want a slightly more complicated installation.  Debian.
>
>RedHat has a nice installation program, and configuration.
>Debian is free, but installation and configuration can take a
>while. Especially if you never installed another linux system before.
>
>
>

Everybody seems to like redhat.  I think it's just the "flavor of the
day".  I personally have always liked slackware.  It's still the
easiest, in my opinion, to install.  

Go to http://www.linux.org and spend a great deal of time exploring
that site... dig DEEP.  There's tons of information there, and lots of
"HOWTO" documents for all kinds of things, from basic installation, to
setting up IP-Masquerading (so you could connect more than one machine
to the internet over dialup), setting up PPP, setting up apache, the
list goes on.

But also, there are some good brief descriptions of all the various
distributions of linux, so you can form your own opinion.

I'd suggest printing out the HOWTO about installing linux, and sitting
down for about 2 hours to do a "dry run" installation.  Get a basic
linux box running, play with it a little, try to break it, add users,
get apache running, get email working, that kind of thing.... once you
have a feel for it, blast it and do it over again, with your
knew-found knowledge to help you.






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

Date: 31 Jul 1998 08:44:30 +0200
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: number (6 -> 06) conversion question
Message-Id: <7xaf5qwmcx.fsf@fidelio.vcpc.univie.ac.at>

Re: number (6 -> 06) conversion question, Adam
<amd0978@acf2.nyu.edu> said:

Adam> Let's say I want to convert the output of localtime so
Adam> that anything less than 10 gets a leading zero.  Is
Adam> there a quick and easy way of doing this?  I came up
Adam> with

Adam> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
Adam> = map { if ($_ < 10) {"0" . $_} else {$_} }
Adam> localtime(time);

Adam> but this doesn't seem as elegant as it could be. ;-)
Adam> Any other suggestions?

perldoc POSIX

look for `strftime', e.g.

   %d      day of month [1,31]; single digits are preceded by 0

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


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

Date: Thu, 30 Jul 1998 22:37:18 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
To: George Kuetemeyer <george.kuetemeyer@mail.tju.edu>
Subject: Re: Passing Large Numbers of Parameters to Subroutines
Message-Id: <35C12DDE.AB801623@erols.com>

George Kuetemeyer wrote:
> 
> Is passing around that hash
> reference really much different from using global variables?.

Absolutely! It's less typing in your subroutine calls. You are not
polluting the name space. You are doing the right thing.

> If I
> misspell a key value, for example, that's the same as misspelling a
> variable name. I'm wondering if anyone can suggest ways to safeguard
> this approach (check for undefined values, etc.) or another approach
> altogether?

Yep. Make the hash an OBJECT. Access it's members through FUNCTIONS, not
by directly manipulating the hash.

Now, if you are thinking, "Jeez, every time I add a new member 'foo', I
have to sit and right getFoo and setFoo", stop thinkng that. Get to CPAN
and download Class::MethodMaker. Make an object of your hash values
using the "get_set" functionality )just read the manpage) and you get
spelling mistake safeguarding and ease of use.


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

Date: Fri, 31 Jul 1998 07:52:08 GMT
From: stew@webworlds.net (Stewart Boutcher)
Subject: Problem using timelocal.pl - possible perl bug?
Message-Id: <35c2772f.592031@ispc-news.cableinet.net>

Hi,

# Perl 5.001 running on Solaris 2.5.1  (UK based machine)

I have seen a wierd problem using timelocal.pl to convert a time and
date to a unix time (seconds since epoch).  This problem only arises
on the boundarys between months.

The results show that timelocal.pl returns either the same value for
the last day of one month as for the first day of the next month
(31st Aug, 98 & 1st Sep, 98 are the same value) or it returns a
value for the first day of the next month 172800 seconds different
from the last day of the previous month (i.e 2 days apart!) (this
applies to 30th Sep, 98 & 1st Oct, 98)

For example :
==========

August 31st, 98 Midnight & September 1st, 98 Midnight :

&timelocal(0,0,0,31,8,98,0,0,1)   -> 907200061
&timelocal(0,0,0,1,9,98,0,0,1)     -> 907200061

September 30th, 98 Midnight & Octobe 1st, 98 Midnight :

&timelocal(0,0,0,30,9,98,0,0,1)    -> 909702061
&timelocal(0,0,0,1,10,98,0,0,1)    -> 909874861

(172800 seconds difference = 2 days)

***
Note that I have assumed that wday and yday can be set to
0 with no problems as when I set them to true values it made
no difference.  I have also assumed that isdst can be 1 as that
is what it always is from localtime.  I assume this is something
to do with daylight savings time?
***

Anyway, you can see the problem.  This is not a problem within
months, it is consistently 86400 seconds from one day to the
next.

So the question is...Is this a problem with the way perl implements
times & dates, a problem with timelocal (in which case is there
another package you'd recommend?) or a problem with Solaris
or indeed, the Solaris/Perl interface?


If I get no satisfactory reply I'm going to report this as a bug to
the perl gurus, so any advice would be very well received!

Thank in advance.

Stewart Boutcher
stew@webworlds.net
http://webworlds.net/
Internet solutions for business




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

Date: 2 Aug 1998 03:23:53 GMT
From: loans2001@aol.com (Loans2001)
Subject: Problem with variables in simple script...
Message-Id: <1998080203235300.XAA08991@ladder01.news.aol.com>

I don't what the problem is, I typed in a script straight out of a book.  The
60 minute guide to CGI programming. It is a simple program permitting comments
on a website. You enter your email address, and your comments in a TEXTAREA,
and the two variables go to the script. 

The url is packed, and uncoded via a library routine, using the split operator
to break everything into key, value pairs.  The sendmail routine sends the data
via email to me at my email address and the script prints out a confirmation
message on the screen to the person writing the message. 

The email I get has no message, nor does the confirmation message printed on
the persons browser get the message he just typed in.  It's supposed to print
it right back out.

Any suggestions as to why this could be? Here is the script:

#!/usr/bin/perl
# comments.cgi
# Sends comments via Internet e-mail.

require('../cgi-bin/cgilibs/form-lib.cgi');

# Read input from the form.
%input = &GetFormInput();

#set the recipient, message, and sender
$recipient = $input{'address'} || "webmaster@\www.coastalmortgage.org";
$message = $input{'comments'};
$sender = $ENV{'HTTP_FROM'} || "webmaster@\www.coastalmortgage.org";

# Specify the mailer
$MAILER = "/usr/sbin/sendmail";

#Compose and send the mail message.
open(MAIL,"|$MAILER -f$sender $recipient");
print MAIL "To: $recipient\n";
print MAIL "Subject: Comments on your Web Site\n";
print MAIL "\n";
print MAIL $message;
close(MAIL);

# Print out a confirmation message.
print "Content-type: text/html\n\n";
print <<"EndOfMessage";
<HTML>
<head>
<TITLE>
Comments Sent
</TITLE>
</HEAD>
<BODY>
<h1>Your Comments Were Sent</h1>
The following mail message was sent:
<PRE>
To: $recipient
Subject: Comments on your Web Site
$message
</PRE>
EndOfMessage

Here is the library file: 

#!/usr/bin/perl
# forms-lib.cgi
# Decodes URL's and unpacks form input

# Reads the form contents into $input, decodes it,
# unpacks it, and returns it as an associative array

sub GetFormInput {
  local(%input);
  $input = &ReadInput();
  %input = &ParseInput($input) if $input;
return(%input);
}
# Reads in the form contents and returns it as a string.
sub ReadInput {
   local($method, $input, $length);
   $method = $ENV{'REQUEST_METHOD'};
# 1-If the request method is GET, read the searchpart of the URL from
# the QUERY_STRING CGI environment variable
if ($method eq 'GET') {
   $input = $ENV{'QUERY_STRING'};
}

# 2-If the method is POST, read CONTENT-LENGTH characters
# from standard input
elsif ($method eq 'POST') {
$length = $ENV{'CONTENT_LENGTH'};
read(STDIN, $input,$length);
 }

# 3-Return the string.
return($input);
}
# Takes a URL-encoded string and returns an associative array.
sub ParseInput {
   local($input) = @_;
   local(@pairs);
# 1 split into key=value pairs
@pairs = split('&',$input);
foreach $pair (@pairs) {
 #2 convert all plus signs to spaces
 $pair =~ s/\+/ /g;
#3 split into a key and a value
 ($key,$value) = split('=',$pair,2);
#4 convert hex numbers to alphanumeric.
   $key =~ s/%(..)/pack("c",hex($1))/ge;
 $value =~ s/%(..)/pack("c",hex($1))/ge; 
#5 To handle multiple lines, separate by newlines.
  $input{$key} .= "\n" if defined($input{key});
#6 Associative keys and values
  $input{key} .= $value;
  }
#7 return the associative array
return(%input);
}

return 1;  #always return true at end of a library

And the form: 

<html>
<title>Comments Form</title>
<head>
<center>
<h1>Comments Form</h1>
</center>
</head>

<body>
<FORM METHOD=POST ACTION="http://www.coastalmortgage.org/cgi-bin/comments.cgi"
>
Please enter an e-mail address: <BR>
<strong>E-Mail</strong>
<INPUT TYPE="text" NAME="address" SIZE=30 Maxlength=50><br>
Your comments: <BR>
<TEXTAREA Name="comments" ROWS=8 COLS=50>
</TEXTAREA>
<br><br>
<Input Type ="submit" VALUE="Send Comments">
</FORM>
</body>

</html>

Thanks for your help.

Scot King
Coastal Mortgage
http://www.coastalmortgage.org



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

Date: Sun, 02 Aug 1998 03:28:01 +0000
From: Derek <dereks@fc.hp.com>
Subject: Q:Threaded 5.005 Under hpux?
Message-Id: <35C3DCC0.5D05E66C@fc.hp.com>

Folks,

Just wondering whether anybody has yet tried a thread-enabled build of
5.005_01 under hpux?  (Either under HPUX 10.20 with DCE threads, or
under 11.0 with POSIX threads?)

I had a try under 10.20+DCE, no luck.  Compile fails with messages
quoted below.   Haven't yet been able to set up an 11.0 box, so I don't
know about that.

Any folks with advice that may save me time?

Thanks,
Derek.

cc: "miniperlmain.c", line 31: error 1718: Types are not
assignment-compatible.
cc: "miniperlmain.c", line 31: warning 563: Argument #2 is not the
correct type.




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

Date: 31 Jul 1998 08:58:43 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Self-referential regexps in Perl/ Representation of C++ templates as a regexp
Message-Id: <6ps103$8b$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Craig Berry
<cberry@cinenet.net>],
who wrote in article <6prnp3$9gp$1@marina.cinenet.net>:
> Vernon Mendanha (vernon@pobox.com) wrote:
> : I was wondering if it is possible to represent self-referential
> : regexps in Perl.
> : In particular, I'd like to be able to match a C++ template.
> : The template could look like T1 < T2 < T3 < int > > >
> : The regexp [a-zA-Z_]+\s*\<.+\>  matches the above template.
> : However, it also matches the string T1 < T2 < T3 < int >
> : which is an incorrect declaration.
> 
> You can't match arbitrary-depth nested pairs with (just) a regex.  You
> need a full-up lexer/parser to do that. 

Yes you can.  But the current (5.005) solution is not ready for
unwashed masses.  You do not want to show it to your kids :-9.

Ilya

P.S. There are promises to make it much easier, and the syntax is
     agreed upon already.  The only problem is to implement call-cc
     for a given C function ;-).


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

Date: Fri, 31 Jul 1998 09:56:54 +0100
From: Alan Silver <alan@find-it.furryferret.uk.com>
Subject: Re: Try perl on Ms Dos
Message-Id: <irwMFFAWbYw1EwLk@find-it.uk.com>

>Is this a perl question? No, it's not.

No it's not. But did it justify such an unpleasant attack ? No it
didn't.

>Now go and get some lessons. Don't bother coming back here until you
>have done that.

Why don't you get some lessons in manners. Don't bother coming back here
until you have done that.

-- 
Alan Silver
Please remove the furryferret when replying by e-mail


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

Date: Fri, 31 Jul 1998 04:22:43 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: What's the future of Perl?
Message-Id: <35c1447b.213453673@news2.cais.com>

cberry@cinenet.net (Craig Berry) Said this:

>Tom Christiansen (tchrist@mox.perl.com) wrote:
>[wrt the Perl compiler]
>: Sure, it's there, but it's not what you think it is.  The compiler does
>: not, except in a few very rare cases, do any of these things:
>: 
>:     increase security
>:     increase portability
>:     decrease size
>:     decrease runtime
>
>OK, so what *does* it do (better than the usual run-time interpreter, that
>is)?  Is shrouding for release to untrustworthy clients the only win?
>

Well... the theory goes that a compiled binary has a much faster
"execution" (or is that "initilization"?) because it doesn't have to
be parsed through an interpretor (which also has to execute).  

You definately lose a few bytes of disk space, I compiled an 18K perl
script and it took up 486K when it was done.  No big deal by itself.
I really don't know if it's something as simple as any compiled perl
is 468K + source file size, or what.  Not that big of a deal either
way though.

I never notice any significant speed up, but what I do notice is my
machine's uptime and other stats seem to show less load if I'm using
compiled scripts instead of perl scripts on heavily used CGI
programs.... especially my database querying scripts, which get about
700 - 1000 queries an hour.  That's the real benefit, squeezing some
extra resources back from "high usage" scripts.




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

Date: 31 Jul 1998 07:29:04 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: What's the future of Perl?
Message-Id: <6prro0$s7u$1@pegasus.csx.cam.ac.uk>

Jon Hamilton <hamilton@pobox.com> wrote:
>On 30 Jul 1998 16:12:21 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
>} 
>} As for a switch statement, we spell that "for", 
>} 
>}     for ($variable) {
>} 	if (/foo/) { ...... }
>} 	if (/bar/) { ...... }
>} 	# etc
>}     } 
>
>We may spell it "for", but we had better work in the letters in
>"anchor" in there as well:
>
>  $variable = 'booger';
>
>  for ($variable){
>    if(/boo/) { print "Oops, caught picking nose!\n"; }
>  }
>
>Changing the if to /^boo$/ of course does what was probably intended.  

And of course, whenever we see an anchored constant regular expression
like that, we immediately think "Regexes aren't the best solution to
all problems.   That's why Perl has an `eq' operator."

    if ($_ eq 'boo') { ... }

But presumably Tom was just using /boo/ as a place holder for something
much more complex.


Mike Guy


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

Date: Fri, 31 Jul 1998 07:54:49 GMT
From: jckchan@hkstar.com
Subject: WIN32::ODBC problem
Message-Id: <6prt89$kov$1@nnrp1.dejanews.com>

Dear all

Is http://www.roth.net down or closed???

I've a problem to pass a variable in a Sql call such as:

$db->Sql("select FirstName, LastName from Addresses where FirstName='$name'");

It cannot get the value of $name, but it works in "insert". What is wrong???

Please help!!!!
Thanks

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


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

Date: Fri, 31 Jul 1998 09:17:28 +0100
From: "Simon Fairey" <simonf@conduit.co.uk>
Subject: Re: Writing 'date' format with OraPerl on a Oracle DB.
Message-Id: <35c17cb3.0@nnrp1.news.uk.psi.net>

Just a quick thought off the top of my head but is it possible to configure
it to accept dates in an alternative format ( i.e. mmddyy) if so you might
want to check that is not how things are set up.

Simon

Alessandro Feltrin wrote in message <35C17346.7AA7@nospam.c-m.it>...
>Hi, all.
<SNIP>




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

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

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