[9563] in Perl-Users-Digest
Perl-Users Digest, Issue: 3157 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jul 14 18:07:15 1998
Date: Tue, 14 Jul 98 15:00:31 -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 Tue, 14 Jul 1998 Volume: 8 Number: 3157
Today's topics:
anyone working on CDO or CDONTS module? <tim@hcirisc.cs.binghamton.edu>
cgi module confusion Juli@my-dejanews.com
Re: Choosing DBMS: friendly to Linux, Apache, Perl, Jav <marius@ace.funcom.com>
Re: compare arrays (Charles DeRykus)
create NCSA combined log from separate agent/referer fi <devon@d2r.com>
Re: Deutsche Boerse sucht 100 neue Mitarbeiter im IT-Be (John Klassa)
efficiency: print<<"xxx" vs. print (Rachel J King)
Re: Forcing DOS window to stay open <coreyp@rc.gc.ca>
forms and sub routines <braind@udel.edu>
Re: forms and sub routines (brian d foy)
hash syntax error <romank@graphnet.com>
Re: hash syntax error <dfan@harmonixmusic.com>
Re: hash syntax error <bowlin@sirius.com>
Re: how to tell execution vs require <tchrist@mox.perl.com>
Re: HTTP POST format Please Help me! (brian d foy)
Re: Is it possible to create a STAND ALONE EXECUTABLE? <mark$$$stang@ncgroup.com>
newbie question on pattern match <xuchu@iscs.nus.edu.sg>
Re: newbie question on pattern match <dfan@harmonixmusic.com>
Re: newbie question on pattern match (Larry Rosler)
Re: newbie question on pattern match (Abigail)
Re: Out-Smarting CGI.pm (brian d foy)
Re: Out-Smarting CGI.pm <jdf@pobox.com>
Perl / CGI scripting help needed. <tomh@ncfweb.net>
Re: Perl Beautifier Home Page <tchrist@mox.perl.com>
Re: RegExps: Check if string consists of EXACTLY 3 digi (Larry Rosler)
Seeking on closed files??? Why does it work??? merzky@physik.hu-berlin.de
Sticking in NULL after split (Benjamin Dixon)
Re: Sticking in NULL after split (Douglas Wilson)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 14 Jul 1998 17:40:25 -0400
From: Tim Gray <tim@hcirisc.cs.binghamton.edu>
Subject: anyone working on CDO or CDONTS module?
Message-Id: <t0ww9gjely.fsf@hcirisc.cs.binghamton.edu>
At work we use MS Exchange and I would really like to get some more
functionality out of it. But the way most people do that is with
Outlook forms and other unfriedly or highly proprietary and costly
solutions. So I was wondering if anyone is working on a module to use
Microsoft's Collaborative Data Objects.
------------------------------
Date: Tue, 14 Jul 1998 21:37:26 GMT
From: Juli@my-dejanews.com
Subject: cgi module confusion
Message-Id: <6ogj2m$ud2$1@nnrp1.dejanews.com>
I'm new to "cgi" perl programming.
What is the difference between these two lines?
I know one uses the cgi perl library and the other uses
the cgi perl module.
What's the difference between the two,
and which one is better to use with cgi scripting?
require "cgi-lib.pl";
use CGI;
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 14 Jul 1998 09:08:41 +0200
From: Marius Kjeldahl <marius@ace.funcom.com>
Subject: Re: Choosing DBMS: friendly to Linux, Apache, Perl, Java
Message-Id: <52zpec3o5i.fsf@ace.funcom.com>
>>>>> "Tauren" == Tauren Mills <tauren@groovee.com> writes:
Tauren> Although I've never used it, you might want to check out
Tauren> SOLID. Their product sounds great. They have great JDBC
Tauren> support (which is what I use), but I'm not sure about Perl.
Tauren> http://www.solidtech.com/
Works great with perl as well - it has it's own DBD module.
Marius
------------------------------
Date: Tue, 14 Jul 1998 18:59:44 GMT
From: ced@bcstec.ca.boeing.com (Charles DeRykus)
Subject: Re: compare arrays
Message-Id: <Ew3M3K.D6I@news.boeing.com>
In article <6oe6dj$qpp$1@pegasus.csx.cam.ac.uk>,
M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
>Craig Berry <cberry@cinenet.net> wrote:
>>Alberto Brosich (brosich@univ.trieste.it) wrote:
>>
>>: How can i compare two arrays other then with a loop?
>>
>>Short answer: You can't do it without looping.
>
>Not strictly true. (Or rather, you can get Perl to do the looping
>for you.) Using the techniques from the FAQ that Craig refers to
>(untested code):
>
> @a_b{@a} = @b_a{@b} = ();
> delete @a_b{@b}, @b_a{@a};
> print "Same" unless keys %a_b + keys %b_a;
>
>
Nice but slightly different because this one's a hashy
comparison, i.e, order oblivious.
--
Charles DeRykus
------------------------------
Date: Tue, 14 Jul 1998 16:24:00 -0400
From: Devon Copley <devon@d2r.com>
Subject: create NCSA combined log from separate agent/referer files?
Message-Id: <35ABBE60.E7263803@d2r.com>
Hi -
Has anyone already written a Perl script to combine separate request,
agent, and referer log files into a single NCSA combined format
logfile? If so, could you send me the code? Thanks for any help in
advance -
Devon
------------------------------
Date: 14 Jul 1998 20:17:56 GMT
From: klassa@aursgh.aur.alcatel.com (John Klassa)
Subject: Re: Deutsche Boerse sucht 100 neue Mitarbeiter im IT-Bereich
Message-Id: <6ogedk$pvh$1@aurwww.aur.alcatel.com>
[ followups set ]
On 10 Jul 1998 08:22:41 GMT, Stephan Roder <roder@odars.de> wrote:
> Und warum kann ich mich dann - als Nicht-Akademiker -
> nicht Informatiker nennen?
>
> Und warum sind einige Informatiker bei uns mit den
> Aufgaben des Programmierens beschaeftigt?
>
> Und was sind dann Softweareentwickler - so darf ich mich
> wenigstens nennen?
...macht mir nichts aus. :-) Bleib aber bitte irgendwo anders als
comp.lang.perl.misc; das was ihr diskutieren hat naemlich nights damit zu
tun.
[ forgive my German; it's been a while... ]
--
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><
------------------------------
Date: 14 Jul 1998 21:34:23 GMT
From: rjking@blue.seas.upenn.edu (Rachel J King)
Subject: efficiency: print<<"xxx" vs. print
Message-Id: <6ogisv$je0$1@netnews.upenn.edu>
I'm wondering about the efficiency of using print<<"xxx" versus that of
just writing a whole bunch of print statements. Is there any huge
difference in terms of the lower-level machine code that actually gets
executed? I'm asking b/c I wrote a bunch of code just using a lot of print
statements before I learned the other way and I'm wondering how worth my
time it is to go and change it all or if I could leave it the way it is
without wasting a huge amount of time each time the scripts are run.
Thanks,
Rachel
--
Rachel Jamie King * University of Pennsylvania
rjking@eniac.seas.upenn.edu * Engineering and Applied Science
http://www.seas.upenn.edu/~rjking * Computer Science and Engineering
------------------------------
Date: Wed, 15 Jul 1998 06:16:39 GMT
From: "Corey Parsons" <coreyp@rc.gc.ca>
Subject: Re: Forcing DOS window to stay open
Message-Id: <Ew3K43.4J9@rc.gc.ca>
Although this is not a Perl related question I'll field it anyways...this
question belongs in comp.os.ms-windows.win95.misc
In the properties box for the DOS window turn off the check box that says
"Close window on program exit" or something like that...
Please think about the nature of your question before you post...you might
get a more meaningful answer.
Corey Parsons
coreyp@plato.ucs.mun.ca
willwebber@my-dejanews.com wrote in message
<6odpn0$lmb$1@nnrp1.dejanews.com>...
>Hello all. I just recently put PERL on my home system(Win95) to work on
some
>things locally before uploading to the server. And, I seem to have a
problem
>keeping the DOS window open that the PERL runs in. I tried throwing a line
of
>code in that waits for you to hit a key before it quits the program (waits
>for a STDIN entry). But, this method only seems to work if the code runs
okay
>without breaking. If the code breaks, the window shows the errors (for a
>split second) then closes. Any suggestions on how to force it to stay open
>regardless of the events of compile and run? Any suggestions would be
>great--
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Tue, 14 Jul 1998 20:44:16 GMT
From: Dave Paules <braind@udel.edu>
Subject: forms and sub routines
Message-Id: <35ABC320.B7D1C50@udel.edu>
I needed to know if there was a way to link an HTML form submit
button to
a subroutine written in PERL. Usually there is a <form> tag with
action=some script name. But what I want is not another script to be
executed. I want the button to execute a sub routine of the current perl
script that created the HTML where the <form> is. I would like to stick
these little subroutines in a library later so that the main script
would simply be some calls to subroutines that are linked to form
buttons. Is this possible?
Dave Paules, senior, University of Delaware
Summer intern, ARL
------------------------------
Date: Tue, 14 Jul 1998 17:37:50 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: forms and sub routines
Message-Id: <comdog-ya02408000R1407981737500001@news.panix.com>
Keywords: from just another new york perl hacker
In article <35ABC320.B7D1C50@udel.edu>, Dave Paules <braind@udel.edu> posted:
> I needed to know if there was a way to link an HTML form submit
>button to
>a subroutine written in PERL. Usually there is a <form> tag with
>action=some script name. But what I want is not another script to be
>executed. I want the button to execute a sub routine of the current perl
>script that created the HTML where the <form> is. I would like to stick
>these little subroutines in a library later so that the main script
>would simply be some calls to subroutines that are linked to form
>buttons. Is this possible?
#how you find $submitted_form is up to you (there are several
#ways to do it.
if( $submitted_form )
{
&my_sub;
exit;
}
good luck :)
--
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 Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Tue, 14 Jul 1998 17:15:06 -0400
From: Roman Katsnelson <romank@graphnet.com>
Subject: hash syntax error
Message-Id: <35ABCA5A.5A5ECB36@graphnet.com>
Hello,
I have to admit I am relatively intimidated by this group and even a
little scared to ask this, a newbie, question.
I am assuring you, though that I have RTFM and the problem still
persists, i.e:
<code snippet>
%groups = qw(
dude group
dude2 group2
dude3 group3
);
<end code snippet>
When I run it I get:
syntax error in file checkin.cgi at line 46, next 2 tokens "qw("
I understand that this can be avoided altogether by just using quotes
inside %groups, but when it gets to be 100 entries, i think i'd rather
not. ;)
Any advice?
Much TIA.
--
| Roman Katsnelson |
_ | Internet Engineer | _
/ )| |( \
/ / | Graphnet World Headquarters | \ \
_( (_ | Teaneck, New Jersey | _) )_
(((\ \>|_/-) http://www.graphnet.com (-\_|</ /)))
(\\\\ \_/ /___________________________________\ \_/ ////)
\ / Email: romank@graphnet.com \ /
\ _/ \_ /
////// ==================================== \\\\\\
------------------------------
Date: 14 Jul 1998 17:46:46 -0400
From: Dan Schmidt <dfan@harmonixmusic.com>
Subject: Re: hash syntax error
Message-Id: <wkww9gp0l5.fsf@turangalila.harmonixmusic.com>
Roman Katsnelson <romank@graphnet.com> writes:
| Hello,
|
| I have to admit I am relatively intimidated by this group and even a
| little scared to ask this, a newbie, question.
|
| I am assuring you, though that I have RTFM and the problem still
| persists, i.e:
|
| <code snippet>
|
| %groups = qw(
|
| dude group
| dude2 group2
| dude3 group3
|
| );
|
| <end code snippet>
|
| When I run it I get:
|
| syntax error in file checkin.cgi at line 46, next 2 tokens "qw("
I bet your problem is on line 45.
What happened when you just tried to run that code snippet by itself?
It worked for me.
I would guess that something is wrong before your code snippet, like a
missing trailing semicolon or something, but that the perl parser
doesn't realize that your script is broken until it gets to the qw.
Whenever you get a syntax error and you don't understand it, always
look at the line before (this goes for any language, not just perl).
--
Dan Schmidt -> dfan@harmonixmusic.com, dfan@alum.mit.edu
Honest Bob & the http://www2.thecia.net/users/dfan/
Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/
Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/
------------------------------
Date: Tue, 14 Jul 1998 14:54:35 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: Roman Katsnelson <romank@graphnet.com>
Subject: Re: hash syntax error
Message-Id: <35ABD39B.B052A786@sirius.com>
Roman Katsnelson wrote:
>
> I am assuring you, though that I have RTFM and the problem still
> persists, i.e:
>
> %groups = qw(
>
> dude group
> dude2 group2
> dude3 group3
> );
>
> When I run it I get:
>
> syntax error in file checkin.cgi at line 46, next 2 tokens "qw("
Looks like this is a problem with an older version of Perl.
What is your "perl -v" ?
-- Jim Bowlin
------------------------------
Date: 14 Jul 1998 21:41:00 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: how to tell execution vs require
Message-Id: <6ogj9c$nvt$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
mjtg@cus.cam.ac.uk (M.J.T. Guy) writes:
:Oh, and they are actually written by Tom Christiansen, who clearly
:doesn't always follow his own advice. :-)
Sometimes the seasoned magician gives the novice different advice
than he himself follows, since the novice doesn't have the
same background. :-)
--tom
--
Build a system that even a fool can use, and only a fool will want to use it.
------------------------------
Date: Tue, 14 Jul 1998 17:15:39 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: HTTP POST format Please Help me!
Message-Id: <comdog-ya02408000R1407981715390001@news.panix.com>
Keywords: from just another new york perl hacker
In article <C6Mq1.1673$yt4.821042@news2.mia.bellsouth.net>, "John" <jrenna@bellsouth.net> posted:
> Does anyone know how to do an HTTP Post to a search engine using the HTTP
>protocol. I know the format is something like this but I am missing
LWP will do it relatively painlessly, although using telnet and typing
it in by hand is often faster.
for the latter, see the CGI Meta FAQ.
good luck :)
--
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 Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: Tue, 14 Jul 1998 16:08:42 -0400
From: "Mark Stang" <mark$$$stang@ncgroup.com>
Subject: Re: Is it possible to create a STAND ALONE EXECUTABLE?
Message-Id: <6oge65$8v6$1@usenet1.interramp.com>
for win32 search the web for perl2exe
mad_ahmad@my-dejanews.com wrote in message
<6ofqi6$d73$1@nnrp1.dejanews.com>...
>Hi,
>I've written this perl program and It's all set.
>i now want to turn it into an executable that's stand alone.
>is that in any way concievable?
>
>Ahmad Saeed
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 14 Jul 1998 18:08:15 GMT
From: wings <xuchu@iscs.nus.edu.sg>
Subject: newbie question on pattern match
Message-Id: <6og6qf$bvu7@id4.nus.edu.sg>
i am reading "Programming Perl" 2nd edition and when trying to "put commas
in the right places in an integer", the book told me to do this:
1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; #P74
it does work but i wonder why my way doesnt work:
1 while s/(\d)(\d\d\d)([^\d]*)/;
anybody mind telling me the reason?
--
wings
------
World is a book, those dont travel read only one page.
Email: xwings@usa.net, xuchu@iscs.nus.edu.sg
ICQ UIN: 1440319
http://gump.iscs.nus.edu.sg
------------------------------
Date: 14 Jul 1998 16:10:36 -0400
From: Dan Schmidt <dfan@harmonixmusic.com>
Subject: Re: newbie question on pattern match
Message-Id: <wklnpwqjlv.fsf@turangalila.harmonixmusic.com>
wings <xuchu@iscs.nus.edu.sg> writes:
| i am reading "Programming Perl" 2nd edition and when trying to "put commas
| in the right places in an integer", the book told me to do this:
|
| 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; #P74
|
| it does work but i wonder why my way doesnt work:
|
| 1 while s/(\d)(\d\d\d)([^\d]*)/;
|
| anybody mind telling me the reason?
Did you try it out?
I have a feeling that you didn't, since your way isn't valid Perl
syntax. You're missing the second half of the s///.
Maybe you meant this:
| 1 while s/(\d)(\d\d\d)([^\d]*)/$1,$2/;
That will just put commas everywhere except for the last three digits,
since [^\d]* trivially matches the null string.
Or maybe you really meant this:
| 1 while s/(\d)(\d\d\d)([^\d])/$1,$2/;
But now you're throwing away the end of your string, the part that
matched ([^\d]).
So maybe you really meant this:
| 1 while s/(\d)(\d\d\d)([^\d])/$1,$2$3/;
But that won't work if there's nothing in your string after the
digits, since there won't be anything to match ([^\d]).
So it's possible that you really meant this:
| 1 while s/(\d)(\d\d\d)([^\d]|$)/$1,$2$3/;
Which indeed seems to work.
By the way, the way I found out all of this is that I tried it out.
I recommend the technique.
--
Dan Schmidt -> dfan@harmonixmusic.com, dfan@alum.mit.edu
Honest Bob & the http://www2.thecia.net/users/dfan/
Factory-to-Dealer Incentives -> http://www2.thecia.net/users/dfan/hbob/
Gamelan Galak Tika -> http://web.mit.edu/galak-tika/www/
------------------------------
Date: Tue, 14 Jul 1998 13:18:48 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: newbie question on pattern match
Message-Id: <MPG.10155d06663d8a1f989710@nntp.hpl.hp.com>
[This followup was posted to comp.lang.perl.misc and a copy was sent to
the cited author.]
In article <6og7a7$d4k5@id4.nus.edu.sg> on 14 Jul 1998 18:16:39 GMT,
wings <xuchu@iscs.nus.edu.sg> says...
>
> i am reading "Programming Perl" 2nd edition and when trying to "put commas
> in the right places in an integer", the book told me to do this:
>
> 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; #P74
>
> it does work but i wonder why my way doesnt work:
>
> 1 while s/(\d)(\d\d\d)([^\d]*)/;
>
> anybody mind telling me the reason?
Assuming you meant this:
1 while s/(\d)(\d\d\d)([^\d]*)/$1,$2$3/;
or, more compactly,
1 while s/(\d)(\d\d\d)(\D*)/$1,$2$3/;
Your matches occur from the *left*. Assuming your input it
$_ = '12345678';
the first match is (1)(234), because you didn't *reguire* that there be a
non-digit or nothing at the end of the match. So you get '1,'. The
second match yields (2)(345), etc.
The text example works from the *right*, because is *requires* that there
be no digit character after the match. So it peels off groups of three
digits from the right, until there are no more.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 14 Jul 1998 21:05:21 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: newbie question on pattern match
Message-Id: <6ogh6h$d0f$1@client3.news.psi.net>
wings (xuchu@iscs.nus.edu.sg) wrote on MDCCLXXVIII September MCMXCIII in
<URL: news:6og6qf$bvu7@id4.nus.edu.sg>:
++ i am reading "Programming Perl" 2nd edition and when trying to "put commas
++ in the right places in an integer", the book told me to do this:
++
++ 1 while s/(\d)(\d\d\d)(?!\d)/$1,$2/; #P74
++
++ it does work but i wonder why my way doesnt work:
++
++ 1 while s/(\d)(\d\d\d)([^\d]*)/;
++
++ anybody mind telling me the reason?
Because it doesn't compile?
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: Tue, 14 Jul 1998 16:22:47 -0400
From: comdog@computerdog.com (brian d foy)
Subject: Re: Out-Smarting CGI.pm
Message-Id: <comdog-ya02408000R1407981622470001@news.panix.com>
Keywords: from just another new york perl hacker
In article <6ogblc$i3k$1@nnrp1.dejanews.com>, chapman50@hotmail.com posted:
>However STDIN can only be read once before it becomes empyt. So if I read
>from it first, CGI.pm isn't able to find any data in STDIN and if CGI.pm
>reads it first then the uploaded file is lost. What I need to know is how to
>extract a copy of the data inside STDIN after CGI.pm reads it itself. I've
>looked inside CGI.pm but have been uncessful as my knowledge of humongous
>object oriented programs is limited. Of course if you know anything about
>this I'd love to hear from you.
once STDIN is read, the data are no longer there.
perhaps if you provided a snippet of your file upload program someone
could spot where you are going wrong. you might also re-check the
CGI.pm docs to make sure you are doing it the way that it is documented.
good luck :)
--
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 Travel Deals! <URL:http://www.pm.org/travel.html>
------------------------------
Date: 14 Jul 1998 16:20:50 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: chapman50@hotmail.com
Subject: Re: Out-Smarting CGI.pm
Message-Id: <emvoxh71.fsf@mailhost.panix.com>
chapman50@hotmail.com writes:
If you read the documentation that accompanies CGI.pm you'll find some
sample code that deals with uploaded files. Search for "CREATING A
FILE UPLOAD FIELD". If you follow those instructions exactly, and
still have trouble, then please post to comp.lang.perl.modules.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf/
------------------------------
Date: 14 Jul 1998 21:42:05 GMT
From: "Tom Hicks" <tomh@ncfweb.net>
Subject: Perl / CGI scripting help needed.
Message-Id: <01bdaf71$45304b00$b87895cf@sparky2>
Keywords: help wanted, perl, cgi
Hi,
I have and or find perl / cgi scripts online. Some of them I can get to run. Some I can not get
to run. The people that write the scripts are clueless about support. Any consultants out there
that would be interested in helping this bozo out. How much $$$?
Currently I have a need to get the following to work here.
Links
A YAHOO like directory.
http://www.gossamer-threads.com/
Links is installed and used to work but currently will not add a post.
MailMan
Web based Email setup
http://www.endymion.com/
It is more or less installed here. The OS layout and I don't get along and need someone to show me
how to effectively work with http://amber.he.net/cgi-bin/suid/~myaccount
And others now possibly and or in the future if I am not drained alive $$$ wise :)
Thanks for your time.
Tom Hicks
tomh@ncfweb.net
InternetTemps.com
Cyber Skills Exchange Free Listings
http://www.internettemps.com
Idowebs.com
------------------------------
Date: 14 Jul 1998 20:00:24 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl Beautifier Home Page
Message-Id: <6ogdco$h0g$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
ilya@math.ohio-state.edu (Ilya Zakharevich) writes:
:It is documented indeed, but is documented as deprecated. Thus not
:Perl5.
Your grasp of English is not as good as your grasp of Russian.
That's not a valid interpretation of what's happening here.
The old package delimiter was a single quote, but double colon is
now the preferred delimiter, in part because it's more readable to
humans, and in part because it's more readable to B<emacs> macros.
It also makes C++ programmers feel like they know what's going
on--as opposed to using the single quote as separator, which was
there to make Ada programmers feel like they knew what's going on.
Because the old-fashioned syntax is still supported for backwards
compatibility, if you try to use a string like C<"This is $owner's
house">, you'll be accessing C<$owner::s>; that is, the $s variable
in package C<owner>, which is probably not what you meant. Use braces
to disambiguate, as in C<"This is ${owner}'s house">.
There's nothing "wrong" with foo'bar() from the compiler or the
documentation's point of view. You just don't like it because you
can't figure out how to parse it.
--tom
--
"OSI: Same day service in a nanosecond world" Van Jacobsen.
T-shirt he produced for an Interop, a few years ago.
------------------------------
Date: Tue, 14 Jul 1998 13:00:26 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: RegExps: Check if string consists of EXACTLY 3 digits ??
Message-Id: <MPG.101558b4f95ebb9298970f@nntp.hpl.hp.com>
In article <r83ec4o8x3.fsf@asc.sps.mot.com> on 14 Jul 1998 23:02:08
+0930, Martin Gregory <mgregory@asc.sps.mot.com> says...
> lr@hpl.hp.com (Larry Rosler) writes:
> > > >I am writing a CGI script which accepts input via QUERY_STRING.
> > > >However, the input is only valid if it consists of EXACTLY 3 DIGITS! No
> > > >more , no less, no other characters in front, after or in between the
> > > try
> > >
> > > $string =~ m/^\d{3}(?!\n)$/
> >
> > Yes. The *four* others of us who responded so far are wrong, wrong,
> > wrong, wrong! The key is here, from perlre:
> >
> > $ Match the end of the line (or before newline at the end)
>
> Yeah - this is a real curly isn't it. It doesn't even tell you what
> it will choose to match (the end of the line, or the newline: which?).
But we do know -- matches always occur from the left. So it matches
before the newline at the end.
> It can catch you in all sorts of wierd ways.
>
> What do you think that this will print (guess before running!)?
2
> perl -w -e '$a = "zaped\n"; $a =~ s/[a-z]*?(.)$/$1/; print
> length($a);'
>
> Can you explain the result?
Yes.
OK, I will, even though you didn't ask. :-) From the left: Throw away
as few lower-case letters as needed in order to make the rest match. The
rest is a single non-newline character ('d') followed by the zero-width
match *before* the "\n" at the end of the string (see above). Replace
all that by the 'd'. So what remains is the 'd' followed by the "\n",
which has never been seen by the regex. One plus one equals two.
> I've been caught by it (in a similar situation to the example above),
> and wonder why this quirk was put in, and whether those that put it in
> regret it now? Don't we all chomp our strings when we want them to be
> \n free?
>
> Martin.
We ought to.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 14 Jul 1998 20:00:39 GMT
From: merzky@physik.hu-berlin.de
To: merzky@physik.hu-berlin.de
Subject: Seeking on closed files??? Why does it work???
Message-Id: <6ogdd7$kg8$1@nnrp1.dejanews.com>
Hallo Folx,
Hmm, I guess I have to explain why I try this:
Today, to one of our servers a quite good hacker got access.
He installed some sniffer stuff, cleaned all logfiles and disappered.
I'm shure he will come back to get the sniffer output (which is, meanwhile,
quite harmless...:-), and of course I want to know where he came in.
Thats why I wanted to double log some logfiles, and, alas, I thaought of
a little perl daemon for this task.
Since the code is not a 5 liner, the question before:
Why does the seek not fail, when the original logfile is moved/removed?
Is there any other way to detect this? Of course, I could keep the
numerical value of the seek, close the Handle, open the file again
(and test hereby), and seek to the old point again. Hmm, but if the file just
got shorter? *scratch*
Any hints welcome! :-)
With regards,
Andre.
----------------schnipp-schnapp-------------------
#!/usr/bin/perl -w
use strict;
######
# main
{
my ($infile) = ($ARGV[0]);
my ($outdir) = ($ARGV[1]);
my ($outfile) = ("");
my ($logfile) = ("./logging");
my (@temp);
if ($infile eq "") {
die "\n\n Usage: auch_log logfile auch_log_dir\n\n";
}
# generate nice filename
@temp = split ("/", $infile);
$outfile = $outdir . $temp[$#temp];
# become daemon (fork twice):
# open (LOG, ">>$logfile") || die "cannot open logfile '$logfile': $!\n";
open (OUT, ">>$outfile") || die "cannot open outfile '$outfile': $!\n";
open (IN , "<$infile" ) || die "cannot open infile '$infile': $!\n";
print "start logging $infile' to '$outfile'...\n";
# for debugging purposes: do not fork, and copy LOG output to STDERR...
# unless (fork) {
# unless (fork) {
{
{
# close all channels....
close (STDIN);
close (STDOUT);
# close (STDERR);
*LOG = *STDERR;
# autoflush...
$| = 1;
# forever...
while (1) {
# 'til EOF
while (<IN>) {
# found one line...
printf (LOG ".");
# log line...
chomp;
printf (OUT "from $temp[$#temp]: $_\n");
}
# EOF: wait 5 secs if something comes...
printf (LOG "-EOF");
sleep (5);
printf (LOG "-SEEK");
# get rid of EOF
if (!seek (IN, 0, 1)) {
my ($ok) = (0);
# could not seek.. - file moved??? - close/reopen
# ----------------
# THATS THE POINT!
# Seek succeeds, even IF file is moved/removed!!! why???
# ----------------
printf (LOG "-SEEKERROR");
close (IN);
until (!$ok) {
eval {
printf (LOG "-OPEN");
open (IN , "<infile" )
|| die "could not open $temp[$#temp]: $!";
};
if ($@) {
# did not work - keep trying!
printf (LOG "-OPENERROR");
sleep (1);
$ok = 0;
} else {
# here we go again!
printf (LOG "-OPENSUCCESS\n\n");
$ok = 1;
}
}
}
printf (OUT "\n", time (),
"\n======================================\n\n");
}
exit 0;
}
exit 0;
}
}
--
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 14 Jul 1998 20:35:22 GMT
From: beatle@arches.uga.edu (Benjamin Dixon)
Subject: Sticking in NULL after split
Message-Id: <6ogfea$4ug$1@cronkite.cc.uga.edu>
I am trying to write a perl script that will generate a create statement
for an SQL server. Its pretty much just parsing an ascii file exported
from a different server... anyways, I split the thing into separate
variables like so:
($var1, $var2, $var3) = split(/:/);
then I want to print the results, separated by commas like so:
print "$var1, $var2, $var3";
But say $var2 is an empty string... so that the output is:
var1,,var3
In this case I see that I could just use s// and get the output to look
like this var1,NULL,var3. but if I have more than two commas, say
var1,,,var3, or even 100, how can I place the word 'NULL' inbetween each?
Probably a simple answer but I'm pretty new to perl. Thanks.
--
******************************************************************************
Benjamin R. Dixon, jr. "It was an age of Empires.
UCNS Student Consultant So is this one, not all
http://www.arches.uga.edu/~beatle that well disguised."
beatle@arches.uga.edu -Vonnegut
------------------------------------------------------------------------------
------------------------------
Date: Tue, 14 Jul 1998 20:49:48 GMT
From: dgwilson@gte.net (Douglas Wilson)
Subject: Re: Sticking in NULL after split
Message-Id: <6ogg99$hkt$1@news-1.news.gte.net>
On 14 Jul 1998 20:35:22 GMT, beatle@arches.uga.edu (Benjamin Dixon)
wrote:
>($var1, $var2, $var3) = split(/:/);
>But say $var2 is an empty string... so that the output is:
>
>var1,,var3
> how can I place the word 'NULL' inbetween each?
$str='a:b::c';
@arr=map {($_ eq "")?"NULL":$_} split(/:/,$str);
print join(",",@arr),"\n";
Does that help?
Douglas Wilson
------------------------------
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 3157
**************************************