[10647] in Perl-Users-Digest
Perl-Users Digest, Issue: 4239 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 17 12:07:21 1998
Date: Tue, 17 Nov 98 09:00:21 -0800
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, 17 Nov 1998 Volume: 8 Number: 4239
Today's topics:
a problem (_cim_)
Re: Automatically identifying the website user in HTML, dbrowne@sarcom.com
Re: Beginner Book? <nospamaardvark@ibm.net>
Check out my PERL based site... dharrison@pinncorp.com
Re: file type? <r28629@email.sps.mot.com>
Help !!! I Need to delete icon from program manager in dingfelder@my-dejanews.com
Help !!! I Need to delete icon from program manager in dingfelder@my-dejanews.com
Re: How do i trim a string in Perl?? <sasho@staff.mgu.bg>
Re: How do i trim a string in Perl?? (Larry Rosler)
Re: iis 4 problem with perl .... <adam@2kmedia.co.uk>
Intermediate Perl questions <m.kaiser@sz-sb.de>
Re: Intermediate Perl questions <ours@casema.net>
Linux: Help reading from serial port (Jere Julian - Personal Account)
Re: NT4 - SP4 affects perl and desktop menu? <jwarner@texas.net>
Passing value to shell script (Sebastiaan van Dijk)
Re: Perl script wanted dave@mag-sol.com
Re: Perl script wanted <rootbeer@teleport.com>
Re: Perl Usage Survey - interpretations, anyone? droby@copyright.com
Re: Perl Usage Survey - interpretations, anyone? (Adam Turoff)
Re: Perl Usage Survey - interpretations, anyone? <eashton@bbnplanet.com>
Re: Perl Weirdness with <<END_TEXT and REDO_THIS: tag (M.J.T. Guy)
Re: Perl_for_Win32_FAQ <rootbeer@teleport.com>
qq|, " and ' <ours@casema.net>
Script hangs won't close $rs why ?? (John Hardy)
Re: Shell or shell - Can't locate shell.pm in @INC at k <r28629@email.sps.mot.com>
using "format" instruction. <klootch@wanadoo.fr>
Re: Wanted: Development Partner (Adam Turoff)
Re: Weird error. Can anyone help? (M.J.T. Guy)
Re: Write to an htm field from perl <smoreno@mundoclasico.com>
Zombie process <marcel.schmidt@bluewin.ch>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 17 Nov 1998 16:43:58 GMT
From: cim@online.ee (_cim_)
Subject: a problem
Message-Id: <3651a77d.4816695@news.online.ee>
how can i see if all elements in an array match a certain criteria
(eg. < 0) and if they do print something.
help!
_cim_
------------------------------
Date: Tue, 17 Nov 1998 15:48:14 GMT
From: dbrowne@sarcom.com
To: bchapman@best.com
Subject: Re: Automatically identifying the website user in HTML, Javascript, Java, or Perl?
Message-Id: <72s5ru$soh$1@nnrp1.dejanews.com>
Bill Chapman <bchapman@best.com> wrote:
> Can one get the user's reply e-mail address using HTML, Javascript,
> Java, or Perl? Anyone know of any way? Is there other information we
> are privy to (to
> check against people changing their reply-to to prentend to be someone
> else).
You are privy to: (1) IP Number.
(2) cookie information.
(3) return email address if this has been entered in the
user's browser (this is an environmental variable).
How best to use these is left as an exercise :-).
Doug Browne
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 17 Nov 1998 09:42:49 -0500
From: David Barnes <nospamaardvark@ibm.net>
To: Jeff Kennedy <jeff.kennedy@natdecsys.com>
Subject: Re: Beginner Book?
Message-Id: <36518B69.AFF3498A@ibm.net>
The book you want is Perl by Example by Ellie Quigley, ISBN
0-13-122839-0.
I was in your boat, and this book did an excellent job of getting me
started.
David Barnes
aardvark@ibm.net
Jeff Kennedy wrote:
> I need a book geared to an ABSOLUTE BEGINNER! No perl experience, no
> programming experience, no real shell scripting experience.
>
> What would I be looking for? Not something that assumes I know
> anything!
>
> Thanks
>
> Jeff Kennedy
------------------------------
Date: Tue, 17 Nov 1998 15:49:41 GMT
From: dharrison@pinncorp.com
Subject: Check out my PERL based site...
Message-Id: <72s5um$spk$1@nnrp1.dejanews.com>
I have been programming CGI/Perl for the past couple years, and I want to
invite everybody to come and look at my latest project... it is a web-based
BBS written by me completely in PERL... Come check it out and let me know
what you think about it...
http://www.theEMPIREnet.com
HTMLGoD.!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 17 Nov 1998 08:35:10 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: ycliang@hidomain.hinet.net
Subject: Re: file type?
Message-Id: <3651899E.3D46A00D@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
ycliang@hidomain.hinet.net wrote:
>
> Hi,
> Under UNIX, we can get a file's type by using "file" command.
> How can I get file's type in a Perl script? Need special modules?
> Thanks a lot!
>
> Yu-Ching Liang
> machlian@ms1.hinet.net
not that I have heard of. But if you really want to, you can use the
backticks (or qx//) to run the Unix 'file' command and capture its
output.
-TK
------------------------------
Date: Tue, 17 Nov 1998 15:55:52 GMT
From: dingfelder@my-dejanews.com
Subject: Help !!! I Need to delete icon from program manager in NT 351
Message-Id: <72s6a9$t9j$1@nnrp1.dejanews.com>
I Need to delete icon from program manager in NT 351.
How do I get Perl to interact with the program manager to delete an icon ?
(I know I can delete the folder itself via the registry)
Andy help would be greatly appreciated
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 17 Nov 1998 15:58:51 GMT
From: dingfelder@my-dejanews.com
Subject: Help !!! I Need to delete icon from program manager in NT 351
Message-Id: <72s6fs$tbt$1@nnrp1.dejanews.com>
I Need to delete icon from program manager in NT 351.
How do I get Perl to interact with the program manager to delete an icon ?
(I know I can delete the folder itself via the registry)
Andy help would be greatly appreciated
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 17 Nov 1998 17:12:26 +0200
From: Alexander Avtanski <sasho@staff.mgu.bg>
Subject: Re: How do i trim a string in Perl??
Message-Id: <36519259.FAE138F4@staff.mgu.bg>
--------------C31B5FCE0BDCDE0919190C6A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
xxx wrote:
> Hi,
> How do i trim a string in Perl??
>
> I need to get rid of leading and trailing spaces in a string!
>
> Thanks in advance !
a) s/^\b+//; s/\b+$//;
b) s/^\b*(.*)\b*/$1/;
--
Alexander Avtanski
sasho@staff.mgu.bg
--------------C31B5FCE0BDCDE0919190C6A
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
xxx wrote:
<blockquote TYPE=CITE>Hi,
<br>How do i trim a string in Perl??
<p>I need to get rid of leading and trailing spaces in a string!
<p>Thanks in advance !</blockquote>
a) s/^\b+//; s/\b+$//;
<br>b) s/^\b*(.*)\b*/$1/;
<pre>--
Alexander Avtanski
sasho@staff.mgu.bg</pre>
</html>
--------------C31B5FCE0BDCDE0919190C6A--
------------------------------
Date: Tue, 17 Nov 1998 08:20:31 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: How do i trim a string in Perl??
Message-Id: <MPG.10bb42268de08846989912@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <36519259.FAE138F4@staff.mgu.bg> on Tue, 17 Nov 1998 17:12:26
+0200, Alexander Avtanski <sasho@staff.mgu.bg> says...
> xxx wrote:
...
> > I need to get rid of leading and trailing spaces in a string!
>
> a) s/^\b+//; s/\b+$//;
> b) s/^\b*(.*)\b*/$1/;
That gets rid of backspaces only, not what was requested. Other posts
have discussed why the 'a' approach is preferable.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Tue, 17 Nov 1998 16:45:21 -0000
From: "Adam Carden" <adam@2kmedia.co.uk>
Subject: Re: iis 4 problem with perl ....
Message-Id: <911321417.26316.0.nnrp-05.c2de97e4@news.demon.co.uk>
George, Please ignore all the replys apart from ethans, the rest do not seem
to have a clue!
Best Wishes
Adam Carden
George Statis wrote in message <72kor1$6ig$1@ns1.otenet.gr>...
>I installed ActiveWare's perl on an NT server machine runing options pack 4
>.....
>
>I have tryed to test perl by puting the script bellow on the cgi-bin
>directory of the server ...
>
>---------------------------------------------------------------------------
-
>------------
>#! c:\perl\bin\perl
>
>print "<meta http-equiv='Content-Type' content='text/html;
>charset=windows-1253'>\n";
>print "<HTML>\n";
>print "<BODY>\n";
>print "hello\n";
>print "</BODY>\n";
>print "</HTML>\n";
>---------------------------------------------------------------------------
-
>---------
>
>the script works fine if i run it from the command prompt
>but if I try to run it from the server I get the following msg ...
>
>---------------------------------------------------------------------------
-
>---------
>CGI Error
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
>
>hello
>---------------------------------------------------------------------------
-
>---------
>
>what could be wrong ????????
>can anybody help me with that ???
>thanx in advance
>statis george
>
>
>
------------------------------
Date: Tue, 17 Nov 1998 16:48:20 +0100
From: "Markus Kaiser" <m.kaiser@sz-sb.de>
Subject: Intermediate Perl questions
Message-Id: <72s5sg$rab$1@hades.rz.uni-sb.de>
Hi there,
looking 4 a efficient way to look at each char of a string.
At the moment I'm using substr( $_, -1, 1 ) in a while loop
and of course regexp would be possible too.
But I'm curious: Is there a better (means faster) way ?
Another issue occured some days ago: How do I break out of
a "do { ... } while( ... );" construction. Could'nt find a solution using
'next' or 'last'.
Thanks in advance for you help.
Markus
--
Markus Kaiser (m.kaiser@sz-sb.de)
Malstatter Str. 4, 66117 Saarbruecken, Germany
Phone +49 681 92630-0, Facsimile +49 681 92630-15
------------------------------
Date: Tue, 17 Nov 1998 17:10:29 +0100
From: "Casema" <ours@casema.net>
Subject: Re: Intermediate Perl questions
Message-Id: <72s78b$cej$1@sun4000.casema.net>
you could break out of the do-while simply by setting your scalar to it's
end-value.....
The other one I do not know. I use thesame as you, except if I am looking
for a specific character.
Markus Kaiser wrote in message <72s5sg$rab$1@hades.rz.uni-sb.de>...
>Hi there,
>
>looking 4 a efficient way to look at each char of a string.
>At the moment I'm using substr( $_, -1, 1 ) in a while loop
>and of course regexp would be possible too.
>But I'm curious: Is there a better (means faster) way ?
>
>Another issue occured some days ago: How do I break out of
>a "do { ... } while( ... );" construction. Could'nt find a solution using
>'next' or 'last'.
>
>Thanks in advance for you help.
>Markus
>
>--
>Markus Kaiser (m.kaiser@sz-sb.de)
>
>Malstatter Str. 4, 66117 Saarbruecken, Germany
>Phone +49 681 92630-0, Facsimile +49 681 92630-15
>
>
>
------------------------------
Date: 17 Nov 1998 15:05:50 GMT
From: julianje@mercury.interpath.com (Jere Julian - Personal Account)
Subject: Linux: Help reading from serial port
Message-Id: <72s3ce$efu$1@gaddy.interpath.net>
I am trying to read input from a telephone PBX giving me call detail records.
The data shows fine on Procomm or Minicom (9600 8N1).
I initially just need to log this data to a file. Then later I'll process it.
Basically what I've tried is using stty to set the port to 9600 cs8 -parenb
-cstopb then running the following type of script:
#/usr/local/bin/perl
###########################################################################
# getphonedata.pl
# 11/1998 Jere Julian for LADD Upholstery
# Read CDR records from Nortel Meridian Option 22.11 PBX
###########################################################################
$logfile = "cdrlog";
$logpath = "/usr/local/src/phone";
$port = "/dev/ttyR4";
$count = 0;
open(CDR, "<$port") or die "Cannot open CDR port: $!\n";
open(LOG, ">$logpath/$logfile")
or die "Cannot open Logfile: $!\n";
while (<CDR> && $count < 100) { # Only get 100 records for debugging.
next if /AUD000/;
print LOG "$count :$_\n" if $_;
print STDOUT "$count :$_\n" if $_;
$count++ if $_;
}
close(CDR) or die "Cannot close CDR port: $!\n";
close(LOG) or die "Cannot close Logfile: $!\n";
print STDOUT "Done.\n";
Please help,
-Jere
------------------------------
Date: Tue, 17 Nov 1998 10:59:11 -0600
From: John Warner <jwarner@texas.net>
Subject: Re: NT4 - SP4 affects perl and desktop menu?
Message-Id: <3651AB5F.CB85865F@texas.net>
Beware SP4. At my previous job, my manager tried running some of our software
on an SP4 box and wound up blowing away the NT install and trying again. A
friend (and former coworker) is a network administrator for company that has MS
reps on-site on a near daily basis tells me that the MS reps do not recommend
usage of SP4. Apparently, it caused a great deal of trouble for MS SQL server
(both 6.5 sp4 and 7). Based on all the experiences that others I have known
have had with SP4, I would recommend uninstalling it and going back to SP3.
John Warner
Craig Horton wrote:
> Just wondering if anyone has experienced 2 things, we have and if anyone
> knows why they have happened and maybe how to solve the problems they cause.
> Thanks, Craig
>
> Everything had been working fine under SP3 for a long time, the perl script
> used for our backup had been implemented 2 months before going to SP4 and
> never had a problem.
>
> 1) After installing SP4 on a NT 4 Server, Win32 Perl did not work in the
> same way and resulted in us being unable to set the enviroment value of
> ORACLE_SID to allow us to shutdown and startup our ORACLE databases for
> backup.
>
> Also for some reason to get \\computername, normally in Perl you need
> \\\\computername, however, for some reason, this is now doubled to \\\\\\\\
> just to get two back slashes.
>
> eg: winmsd \\\\\\\\computername
>
> while before \\\\computername worked fine under SP3.
>
> Both perl scripts run from the server.
>
> 2) After installing SP4 on a workstation and The IE SR, that is requested to
> be installed as part of the installation of SP4 (the 30MB+ version). for
> yk2, the user cannot access, the NEW command when right mouse clicking on
> the desktop, stopping him from creating new folders or shortcuts or files.
> It isn't even on the rick click menu anymore.
>
> Just incase anyone wants to know the machine specs:
>
> Server: Windows NT 4 Server, SP3 (before SP4), running on dual Pentium Pro
> 200's, with Win32-perl5 build 110
>
> Workstations: Both Windows NT Workstation with SP3 (before SP4), one is
> Pentium2 266, other is Pentium 133, Win32-perl5 build 316
------------------------------
Date: Tue, 17 Nov 1998 14:52:08 GMT
From: s.a.j.m.vandijk@kpn-telecom.nl (Sebastiaan van Dijk)
Subject: Passing value to shell script
Message-Id: <36518d0f.28553547@newsXgn.telecom.ptt.nl>
Hi,
Perhaps a stupid question, but is it possible to pass a value from a
perl script to a shell script
ksh:
value=`perl script.pl`
Does anybody know how this can be done? The 'exit' does not do the
job.
Thanx in advance,
Sebastiaan van Dijk
------------------------------
Date: Tue, 17 Nov 1998 16:14:25 GMT
From: dave@mag-sol.com
Subject: Re: Perl script wanted
Message-Id: <72s7d2$uca$1@nnrp1.dejanews.com>
In article <36515E22.7B4260FF@hotmail.com>,
Kati Gaebler <katigaebler@hotmail.com> wrote:
> Hello,
>
> I'm looking looking for a good guestbook in Perl for my web-page, does
> anyone know where I can find CUT-N-PASTE free script which includes the
> following functions:
>
> - Possibility of messages deleting themselfs automatically after a given
> period of time, i.e. two weeks.
>
> - A admin page so the administrator can remove unwanted messages.
>
> Thats just about all I can think about. I would really appreciate your
> advice.
Kati,
I've got a guestbook for download on my site at
<http://www.mag-sol.com/Download.html>, the current tarball doesn't include
the admin program that I wrote for it last week, but I could mail that to you
if you're interested. Currently it doesn't age messages, but this would be a
very simple thing for me to add.
hth,
Dave...
--
Magnum Solutions Ltd: <http://www.mag-sol.com/>
London Perl M[ou]ngers: <http://london.pm.org/>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 17 Nov 1998 16:44:05 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl script wanted
Message-Id: <Pine.GSO.4.02A.9811170843490.27321-100000@user2.teleport.com>
On Tue, 17 Nov 1998, Kati Gaebler wrote:
> I'm looking looking for a good guestbook in Perl for my web-page,
If you're wishing merely to _find_ (as opposed to write) programs,
this newsgroup may not be the best resource for you. There are many
freeware and shareware archives which you can find by searching Yahoo
or a similar service. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 17 Nov 1998 15:13:25 GMT
From: droby@copyright.com
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <72s3qm$qst$1@nnrp1.dejanews.com>
In article <3650C13C.59A8703F@bbnplanet.com>,
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>
> > I don't think folks are using Linux (or Solaris) as a way to avoid using
> > Windows. If they need to run Windows, they do. Rather, Linus is used
> > by folks who want to use Linux, when they arte able to do so.
>
> What else would I run on the PC if I didn't have a freeware Unix?
> Windows. I use Linux and x86 to avoid using windows.
>
I run Linux and Windows. I certainly prefer Linux, but I'm not using it to
avoid Windows. I'm using it to avoid paying for another Unix.
There is still plenty of software I want to run that requires Windows, so
I'll keep it around for the forseeable future. If I get adventurous, I might
even start playing with Perl on Windows.
I came to Linux via Perl. I was working on some Perl scripts for SunOS (circa
1993) and wanted to do some of it at home without connecting into work.
Installing Linux on the 486/33 I already owned was alot cheaper (i.e., free)
than buying something from Sun.
--
Don Roby
droby@copyright.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 17 Nov 1998 10:56:55 -0500
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <72s6c7$75o@panix.com>
I R A Aggie <fl_aggie@thepentagon.com> wrote:
>Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
>
>+ growing even when NT is supposedly eating the Unix market share. Linux
>
>I haven't seen anyone predicting the death of unix in a while...
Oh, it's there alright, just different. I quit my last job because I was
tired of "no one is using UNIX anymore, and if it's so good, why is
everyone using/migrating to NT?" FUD.
NT was designed to sell servers to people who didn't know what a server
was supposed to do or why the need servers. That market is still pretty
big and growing, but it's also realizing that BSOD is a feature you want
to avoid on a server, or servers are so complex that you want someone who
knows the magic incantations to maintain 24x7, not NT's 23x6.
Z.
------------------------------
Date: Tue, 17 Nov 1998 16:20:30 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: Perl Usage Survey - interpretations, anyone?
Message-Id: <36519FAA.D7639677@bbnplanet.com>
Adam Turoff wrote:
>
> I R A Aggie <fl_aggie@thepentagon.com> wrote:
> >Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> >
> >+ growing even when NT is supposedly eating the Unix market share. Linux
> >
> >I haven't seen anyone predicting the death of unix in a while...
Note the word 'supposedly'. Unix isn't going anywhere, especially when
we have 85% of our customers using Solaris.
> Oh, it's there alright, just different. I quit my last job because I was
> tired of "no one is using UNIX anymore, and if it's so good, why is
> everyone using/migrating to NT?" FUD.
Adam, darling, you are a saint and martyr. :)
> NT was designed to sell servers to people who didn't know what a server
> was supposed to do or why the need servers. That market is still pretty
> big and growing, but it's also realizing that BSOD is a feature you want
> to avoid on a server, or servers are so complex that you want someone who
> knows the magic incantations to maintain 24x7, not NT's 23x6.
Well, NT is accessible and easily maintained by neanderthals and teenage
boys. It is attractive to have a server on cheap hardware and be able to
find someone to manage it without having to pay for the expertise. Unix
hardware, software and administration can be prohibitively expensive for
mom & pop shops as well as inappropriate. This is the gap where linux
can win and is winning. Though the rub here is when you get an
inexperienced admin running a linux box and do a disservice to the
perception of linux as a robust secure alternative.
e.
<njt> "Is that a socket() ready to accept(), or are you just glad to see
me?"
------------------------------
Date: 17 Nov 1998 16:17:58 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Perl Weirdness with <<END_TEXT and REDO_THIS: tag
Message-Id: <72s7jm$aq5$1@pegasus.csx.cam.ac.uk>
Excession <dac@NO.S.P.A.M.pcug.org.au> wrote:
>I then had a password checking routine which used (shock horror)
>a GOTO and a REDO_THIS: tag. The tag was immediately after the
>END_TEXT marker.
>
>When I ran the program, the REDO_THIS: tag was not found.
This has worked OK since at least perl5.002.
Mike Guy
------------------------------
Date: Tue, 17 Nov 1998 16:50:48 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Perl_for_Win32_FAQ
Message-Id: <Pine.GSO.4.02A.9811170845491.27321-100000@user2.teleport.com>
On Tue, 17 Nov 1998, Brent Michalski wrote:
> > http://www.perl.com/CPAN-local/doc/FAQs/nt/perlwin32faq.html
> This link is returning:
>
> <ERROR MESSSAGE>
> File Not Found
Not for me, when I use either of two different browsers. I'm not sure why
you should be seeing that, but I'd guess that it's a problem with a
server, a browser, a proxy, or something like that. But maybe you'll have
better luck with this:
http://www.cpan.org/doc/FAQs/nt/perlwin32faq.html
"This web page best viewed with telnet-80." Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 17 Nov 1998 16:36:05 +0100
From: "Casema" <ours@casema.net>
Subject: qq|, " and '
Message-Id: <72s57v$fhk$1@sun4000.casema.net>
I know this question is way offtopic here and I am sorry, but I do not know
the english word for thos things ( " and ' )
Would anyone know how to place something like this:
<A HREF="javascript:action('home')"
onmouseover="glow('home','on');window.status='Home';"
onmouseout="glow('home','of');window.status='';"><IMG
SRC="../images/home3.gif" NAME="home" NOSAVE BORDER=0 ></A>
in a variable??? Like I want DW$ to contain this sentence, then
document.write(DW$) using javascript.....
Again sorry for 'bothering' you, but thanks for providing answers,
Michel
------------------------------
Date: Tue, 17 Nov 1998 15:28:59 GMT
From: jhardy@cins.com (John Hardy)
Subject: Script hangs won't close $rs why ??
Message-Id: <%Cg42.1201$OT5.780875@198.235.216.4>
When I run this script it works fine, until it reaches $RS->Close()
then it hangs ??
use diagnostics; ## Use
Diagnostics module for debugging
use OLE; ## Call OLE
module
use Win32::ADO; ## Call ADO
module
$Conn = CreateObject OLE "ADODB.Connection"; ## Create connection
Object
$CMD = CreateObject OLE "ADODB.Command";
$Conn->Open("DSN=iHRS;UID=sa;PWD="); ## Use the connection
Object to Connect to the Database
$Conn or die "Cannot Connect";
my ($LOCK_EX);
$LOCK_EX = 2;
$file = 'VVarin'; # Name
the file
open(INFO, $file) or die "Couldn't open INFO file"; # Open
the file
flock (INFO, $LOCK_EX) || bail ("cannot flock $file: $!");
while ( <INFO> ) {
chomp;
( $key, $value ) = split /:/;
$linesin{$key}=$value;
};
close(INFO);
foreach $key (sort keys %linesin ) {
$value=$linesin{$key};
#$value=join('','@',$value); ##add the table
name to the field name
#print "$value\n"; ## here
for debugging purposes
}
$CMD->{CommandType} = adCmdStoredProc;
$CMD->{CommandText} = "CandidateINS
('$linesin{fname}','$linesin{lname}','$linesin{address}','$linesin{po_box}','$l
inesin{province}','$linesin{postal_code}','$linesin{city}',
'$linesin{country}','$linesin{telephone}','$linesin{email}','$linesin{ext}','$l
inesin{fax}','$linesin{citizen_ship}','$linesin{citizen_status}','$linesin{comm
ent}')";
$CMD->{ActiveConnection} = $Conn;
$RS=$CMD->Execute;
if(!$RS) {
$Errors = $Conn->Errors();
print "Errors:\n";
foreach $error (keys %$Errors) {
print $error->{Description}, "\n";
}
die;
}
$cid=($RS->Fields('lastkey')->value );
chomp ($cid);
print "$cid \n";
$RS->Close();
$Conn->Close();
exit;
------------------------------
Date: Tue, 17 Nov 1998 08:31:08 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: hamlinm@boat.bt.com
Subject: Re: Shell or shell - Can't locate shell.pm in @INC at k line 3.
Message-Id: <365188AC.DE788AC6@email.sps.mot.com>
[posted to c.l.p.m and copy emailed]
Mark Hamlin wrote:
>
> Sorry about previous html posts.
>
> I couln't believe I had left out the semi colon and the shell name from
> the use, so I immediently
> rushed back to my scripts. It seems as though these errors were only
> made
> in my haste to get an answer to the prob. but the real problem was just
> as
> stupid (please forgive newbie). I had taken the function name direcly
> (case
> inculded) from the Camel which unfortunately presented the word 'Shell'.
>
> Took a guess and took out the capital and WOW.... Oh well - got to the
> bottom of it in the end... almost
>
> Now on running the script
>
> #!/usr/local/bin/perl
> use shell qw(rcp ls cat);
> print ls;
>
> I get the message ' Can't locate shell.pm in @INC at k line 3. BEGIN
> failed--compilation aborted at k line 2'.
>
> Previously I was using use Shell qw(xxx xxx) which reulted in the
> message
> Segmentation Fault (Coredump) at line 3. What is the correct case?
I am not sure what's causing the Segmentation Fault on you system, but
the correct one is Shell (perl is case sensitive), that's why you are
getting the "can't locate.." message.
-TK
------------------------------
Date: Tue, 17 Nov 1998 17:06:52 +0100
From: Serge <klootch@wanadoo.fr>
Subject: using "format" instruction.
Message-Id: <36519F0B.5D99@wanadoo.fr>
hi !
J'ai besoin de faire une petite modif dans une boucle de programme.
I need to modify the folowing loop ( This is part of Formmail program)
foreach $value (keys %FORM) {
# Print the name and value pairs in FORM array to html.
print MAIL "$value: $FORM{$value}\n\n";
}
The output of this give a very bad looking (format is text).
Because the size of name and size of value are very diffirent.
I've tried to introduce some tabs \t\t\t, looks little better.
May i use "format" instruction ?
How I can insert it in the loop ?
to get something like:
Name : Value
Naaaaame : Val
nam : Vaaaaaallllluuueee
Thanks in advance.
Serge.
merci !
------------------------------
Date: 17 Nov 1998 11:01:51 -0500
From: ziggy@panix.com (Adam Turoff)
Subject: Re: Wanted: Development Partner
Message-Id: <72s6lf$7jj@panix.com>
Ethan H. Poole <ehpoole@ingress.com> wrote:
>trri744@ibm.net says...
>>Wanted: Development Partner Perl -> Java/SQL/CORBA.
>>We are offering an unique business opportunity to jump into a joint
>>venture online since 1996. Accidentially we lost the developer of
>>100+ well documented Perl5 scripts. The app is integral part of a
>>pioneering business model with other apps in the area of community
>>building.
>
>I'm a little concerned about this 'accidental' loss of a Perl developer. I
>mean, like, was he/she struck down by lightning while attempting to maintain
>one of those scripts? ;-)
I'm a little concered about why they want to take '100+ well documented
Perl5 scripts' and turn them into 'Java/SQL/CORBA'. :-)
Z.
------------------------------
Date: 17 Nov 1998 16:26:45 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Weird error. Can anyone help?
Message-Id: <72s845$b8d$1@pegasus.csx.cam.ac.uk>
Paul Wood <john.wood@diamond.co.uk> wrote:
>When running my perl program this line,
>
> if (! defined $form_results{'name'}) { &Error("no_name") }
>
>throws up this error:
>
>Bad name after name:: at member.pl line 580.
Note that name' was the perl 4 way of saying name::, still supported for
compatibility.
I'll bet you've got a missing closing ' somewhere earlier in your script.
Mike Guy
------------------------------
Date: Sat, 07 Nov 1998 14:48:23 -0600
From: Saturnino Moreno <smoreno@mundoclasico.com>
To: Billsterz <bill@sterzenbach.com>
Subject: Re: Write to an htm field from perl
Message-Id: <3644B217.C28D4D27@mundoclasico.com>
Billsterz escribis:
> Here's what I want to do.
> Have passdata.cgi pass a variable $form{whatever} to a field in an htm form
> it opens and displays to the user.
> The value $form{whatever} in the form must not be static as different
> people use it.
> Now, here's the tricky part (for me):
>
> ###### Using (abbreviated) #####
> if ($line =~ /<!--passme-->/)
> print FILE "<!--login-->$form{whatever} \n";
>
> this works...sorta...it replaces the WHOLE Line the tag is on in the htm
> file. I just want to put a variable in a text box.
Try it:
<INPUT type=text name=\"variable_name\"
value=\"$form{whatever}\">
--
?Te gusta la mzsica? ?Te gusta conocer gente?. A partir de las
23:00 (hora peninsular espaqola) nos reunimos vari@s amig@s del
club para hablar de lo nuestro. !Te esperamos!.
http://www.mundoclasico.com/chat.html
--
AC-CIMC
Mundo Clasico - Revista semanal de mzsica clasica
http://www.mundoclasico.com
------------------------------
Date: Tue, 17 Nov 1998 16:06:00 +0100
From: marcelschmidt <marcel.schmidt@bluewin.ch>
Subject: Zombie process
Message-Id: <365190D8.2C41A69E@bluewin.ch>
The following script "popwatch" does a "tail" on the syslog file.
Whenever the "popwatch" process is being
killed, the "tail" child process is still hanging around.
How can I make sure, that the child process also gets killed ?
Marcel Schmidt
marcel.schmidt@bluewin.ch
#!/usr/local/bin/perl
# Change the following for your system:
$popauthspool = "/var/spool/popauth/";
$poppersyslog = "/var/adm/syslog";
$watcherlog = "/var/log/popwatch.log";
$popwatcherpidfile = "/etc/mail/popwatch.pid";
$TAIL = "/usr/bin/tail";
# should be fine after this
open(LOG,">>$watcherlog") || die("Can't open $watcherlog");
print LOG "\n$date Starting log for popwatch at pid $$\n";
select(LOG);
$| = 1;
select(STDOUT);
$| = 1;
$SIG{'INT'} = 'handler';
$SIG{'QUIT'} = 'handler';
$SIG{'KILL'} = 'handler';
open(PID,">$popwatcherpidfile");
print PID "$$\n";
close(PID);
open(POPPER,"$TAIL -f $poppersyslog |") || die("Can't $TAIL -f
$poppersyslog");
while($line = <POPPER>) {
if($line =~
/^([A-Za-z
]+\s\d+\s\d+\:\d+\:\d+)\s.+STAT\srequest\sfrom\s\"([a-z0-9]{2,8})\".+\s(\d+\.\d+\.\d+\.\d+)\s.+$/)
{
$tstamp = $1;
$user = $2;
$ip = $3;
print LOG "$tstamp $user authenticating relaying for $ip\n" ;
$file = ">".$popauthspool.$ip;
open(TEMP,$file);
close(TEMP);
}
}
close(POPPER);
close(LOG);
exit(1);
sub handler {
local($sig) = @_;
close(POPPER);
close(LOG);
exit(0);
}
------------------------------
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 4239
**************************************