[10230] in Perl-Users-Digest
Perl-Users Digest, Issue: 3822 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Sep 25 13:07:14 1998
Date: Fri, 25 Sep 98 10:00:26 -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 Fri, 25 Sep 1998 Volume: 8 Number: 3822
Today's topics:
[Fwd: IP Hardware acting as self (from self)] <webmaster@fccjmail.fccj.cc.fl.us>
Re: any way to encrypt my script? jmh@pubserv.com
Re: any way to encrypt my script? (Greg Bacon)
Re: Can't get cgi-lib.pl to work!? droby@copyright.com
Re: cat reese > /dev/null (was Re: Perl & Java - differ <borg@imaginary.com>
Re: Current package detection <ets@egnetz.uebemc.siemens.de>
Re: exec cgi in apache 1.3.1 postmaster@truevision.net
Re: exec cgi in apache 1.3.1 (Ryan Bloom)
faxing in perl? <fsi001@gate.net>
Re: FS Check <eashton@bbnplanet.com>
Re: FS Check <eashton@bbnplanet.com>
Re: getting open(FH, "| tee $filenameVar"); to work (wo <ngrossman@searchathome.com>
Re: Help using Perl and Tk dave@mag-sol.com
help with removing leading zeros with reg-exp <stackhou@execpc.com>
Re: help with removing leading zeros with reg-exp <uri@camel.fastserv.com>
Re: help with removing leading zeros with reg-exp (Craig Berry)
Re: HELP:: s/// problem... (Bart Lateur)
Re: How do I implement perl with javascript or vice ver <antony.gibson@zetnet.co.uk>
How to test if a value is a number or a string <jl.persat@wanadoo.fr>
Re: How to test if a value is a number or a string (Sean McAfee)
Re: How to test if a value is a number or a string (Craig Berry)
Looking for System Admin coolbrown@my-dejanews.com
network.pl and www.pl for Windows NT? (Mike Burnett)
Re: NT 4 + PWS 4 vs PERL 5 + CGI droby@copyright.com
Re: Perl & Java - differences and uses <jdporter@min.net>
Re: Perl & Java - differences and uses <jdporter@min.net>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 25 Sep 1998 12:38:16 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Subject: [Fwd: IP Hardware acting as self (from self)]
Message-Id: <360BC6F8.5DC44A05@fccjmail.fccj.cc.fl.us>
This is a multi-part message in MIME format.
--------------01435D59CBB7583C19EE7CAB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------01435D59CBB7583C19EE7CAB
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Received: from fccjmail.fccj.cc.fl.us (fccjmail.fccj.cc.fl.us [207.203.47.6])
by astro.fccj.cc.fl.us (8.9.1/8.9.1) with ESMTP id MAA26339
for <bill@astro.fccj.cc.fl.us>; Fri, 25 Sep 1998 12:36:12 -0400 (EDT)
Received: from astro.fccj.cc.fl.us (astro.fccj.cc.fl.us [207.203.61.2])
by fccjmail.fccj.cc.fl.us (8.8.8/8.8.8) with ESMTP id MAA26771;
Fri, 25 Sep 1998 12:41:24 -0400 (EDT)
Received: from fccjmail.fccj.cc.fl.us (astro.fccj.cc.fl.us [207.203.61.2])
by astro.fccj.cc.fl.us (8.9.1/8.9.1) with ESMTP id MAA26335;
Fri, 25 Sep 1998 12:36:11 -0400 (EDT)
Sender: bill@astro.fccj.cc.fl.us
Message-ID: <360BC67B.D33C018B@fccjmail.fccj.cc.fl.us>
Date: Fri, 25 Sep 1998 12:36:11 -0400
From: "Bill Jones, FCCJ Webmaster" <webmaster@fccjmail.fccj.cc.fl.us>
Reply-To: bill@astro.fccj.cc.fl.us
Organization: Florida Community College at Jacksonville
X-Mailer: Mozilla 4.06 [en] (X11; U; SunOS 5.5.1 sun4u)
MIME-Version: 1.0
Newsgroups: comp.sys.sun.admin
CC: lsf@fccjmail.fccj.cc.fl.us, bill@fccjmail.fccj.cc.fl.us
Subject: IP Hardware acting as self (from self)
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
[Posted to comp.sys.sun.admin]
The following message:
Sep 25 12:03:23 astro unix: IP: Hardware address '08:00:20:7d:55:cd'
trying to be our address 207.203.061.002!
Sep 25 12:03:23 astro unix: IP: Hardware address '08:00:20:7d:55:cd'
trying to be our address 207.203.061.002!
Sep 25 12:11:41 astro unix: IP: Hardware address '08:00:20:7d:55:cd'
trying to be our address 207.203.061.002!
Sep 25 12:11:41 astro unix: IP: Hardware address '08:00:20:7d:55:cd'
trying to be our address 207.203.061.002!
Is intermittently showing up in the log.
I have researched this and found some mention of it, but none
of those solutions appear to apply. The server has a single
10MB Ether to a 10/100 switch. The server has been connected
for over a month without incident and now it appears to be
happening sporadically for about a week -
over 300 messages, etc...
Anyone have any ideas or other resources to point me to
so that I may resolve this?
Thx :]
__________________________________________________________________
Bill Jones FCCJ Webmaster | http://www.fccj.org/cgi/mail?webmaster
--------------01435D59CBB7583C19EE7CAB--
------------------------------
Date: Fri, 25 Sep 1998 13:55:11 GMT
From: jmh@pubserv.com
Subject: Re: any way to encrypt my script?
Message-Id: <6ug7bv$vkk$1@nnrp1.dejanews.com>
In article <6ueb7q$eka$3@client3.news.psi.net>,
abigail@fnx.com wrote:
> ++ The portability
> ++ and ease of use of Perl have made it my choice for implementation,
> [...]
> Of course, choosing Perl for its portability and ease of maintaince, and
> then writing obfuscated code is mindboggling.
Agreed, but I didn't say I wanted to make the code I provide to the client
easy to maintain. I chose Perl because it's easy to develop in and easy to
port. I'm obfuscating the code as a post-production measure to satisfy the
client.
-- jeff‰
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 25 Sep 1998 14:49:06 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: any way to encrypt my script?
Message-Id: <6ugah2$s1b$1@info.uah.edu>
In article <36081799.B01E98DD@osmic.com>,
Ben Sauvin <sauvin@osmic.com> writes:
: Compilers and interpreters are both language translators, with the
: major general distinction being the time at which the computer will act
: upon the translated output. A compiler's output (often called "object")
: can itself easily be some intermediate form required by some interpreter
: (the CPU itself being only one _form_ of interpreter) or yet another
: compiler, but the only "true" compiler merely translates into *some*
: form other than what it is given.
What leads you to believe perl isn't doing this?
: In the "street" sense, Perl is an interpreted language in the sense
: that it does not (normally) generate true machine-readable binary the
: way an assembler or C compiler (usually) would.
Joe Average Person's definition isn't necessarily correct or one upon
which experts would agree.
: It is not necessarily
: interpreted the same way QBasic on Windows machines interprets (line by
: line, sequentially except on flow redirection, each line crunched anew
: before execution);
Right...
: Nobody who has never written or maintained a compiler, interpreter
: or other computer language translator should really be commenting in
: this thread.
People who don't know what they're talking abot shouldn't be commenting
in this thread.
gcc without its output code would still be a C compiler (although not a
very useful C compiler :-). Perl converts its input to an intermediate
bytecode (and I believe there are even modules to dump this bytecode and
be able to execute it later--which would meet even your bizarre
definition of compiler) to be interpreted by a virtual machine. Just
because there is no silicon implementation of perl's machine doesn't
mean that perl doesn't compile Perl.
Greg
--
When going to visit the woman, do not forget the whip.
-- Nietzsche
------------------------------
Date: Fri, 25 Sep 1998 16:21:34 GMT
From: droby@copyright.com
Subject: Re: Can't get cgi-lib.pl to work!?
Message-Id: <6ugfud$8ei$1@nnrp1.dejanews.com>
In article <sarvhmdwc01.fsf@camel.fastserv.com>,
Uri Guttman <uri@camel.fastserv.com> wrote:
> >>>>> "d" == droby <droby@copyright.com> writes:
>
> >> require ("cgi-lib.pl");
>
> d> This require happens at compile-time. The above push happens at
> d> run-time. So even if it had the correct path, it would happen to
> d> late to help this require find your library. There is a section in
> d> the FAQ dealing with ways to load your own modules. I'd suggest
> d> you read that.
>
> require happens at run time unless it is in a BEGIN block. use happens
> at compile time.
>
So sorry. My bad.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Fri, 25 Sep 1998 16:31:16 GMT
From: George Reese <borg@imaginary.com>
Subject: Re: cat reese > /dev/null (was Re: Perl & Java - differences and uses)
Message-Id: <ozPO1.2094$Ge.6741606@ptah.visi.com>
In comp.lang.java.programmer John Klassa <klassa@aur.alcatel.com> wrote:
: On Tue, 22 Sep 1998 13:47:48 GMT, George Reese <borg@imaginary.com> wrote:
: > Ahh, yes, let's all be judged by the code we wrote a decade ago in
: > college.
: You didn't write code a decade ago, in college. You didn't write code a
: decade ago, period. You didn't write code until at least 1991, according
: to your web page (excerpted below, without permission). Since you claim to
: be a stickler for the facts, and for what's been said, I thought this was
: relevant.
[ quotes deleted as they say what John says ]
A "decade" is a good approximation of 8 years. And, yes, I was in
college in 1991.
--
George Reese (borg@imaginary.com) http://www.imaginary.com/~borg
PGP Key: http://www.imaginary.com/servlet/Finger?user=borg&verbose=yes
"Keep Ted Turner and his goddamned Crayolas away from my movie."
-Orson Welles
------------------------------
Date: Fri, 25 Sep 1998 16:31:53 +0200
From: "Hr. Jochen Stenzel" <ets@egnetz.uebemc.siemens.de>
Subject: Re: Current package detection
Message-Id: <360BA959.38F8A30B@egnetz.uebemc.siemens.de>
> You can also examine the contents of the __PACKAGE__ token:
> ...
Thank you for your answers. __PACKAGE__, unfortunately, is not yet
available in Perl 5.003 (used here), but caller() works fine there.
> >Can I get a list of all modules currently loaded by a program?
>
> Not really. It's possible that the information you want is what is in
> %INC. But you didn't say what you're trying to accomplish, so it's
> difficult to help you.
I simply want to build an intranet documentation of modules used by our
inhouse scripts. %INC is a good solution for this, thanks!
Jochen
------------------------------
Date: Fri, 25 Sep 1998 14:11:08 GMT
From: postmaster@truevision.net
Subject: Re: exec cgi in apache 1.3.1
Message-Id: <6ug89s$ji$1@nnrp1.dejanews.com>
sevo@inm.de wrote:
> "Options Includes", just as in .htaccess. To repeat it: Anything that
> can go inside a .htaccess file (and some more) can go inside a directory
> context.
I do it, but the SSI "exec cgi" don't work.
My perl script work with: "perl counter.pl", but with exec cgi inside an .html
or .shtml do nothing.
I have the following lines in my access.conf:
<Directory /usr/local/www*> #The .html or shtml files directory.
Options All MultiViews
AllowOverride All
Allow from all
</Directory>
<Directory /usr/local/www/*/cgi-bin*> #The script directory.
Options ExecCGI
AllowOverride All
</Directory>
And, in my srm.conf:
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
AddHandler cgi-script .exe
Options +ExecCGI
AddType text/html .shtml
AddHandler server-parsed .shtml
Thanks for helpme...
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Fri, 25 Sep 1998 11:19:25 -0400
From: rbbloom@us.ibm.com (Ryan Bloom)
Subject: Re: exec cgi in apache 1.3.1
Message-Id: <MPG.10757e8d362a2f7c989698@rtpnews.raleigh.ibm.com>
In article <6ug89s$ji$1@nnrp1.dejanews.com>, postmaster@truevision.net
says...
>
>
> sevo@inm.de wrote:
> > "Options Includes", just as in .htaccess. To repeat it: Anything that
> > can go inside a .htaccess file (and some more) can go inside a directory
> > context.
>
> I do it, but the SSI "exec cgi" don't work.
> My perl script work with: "perl counter.pl", but with exec cgi inside an .html
> or .shtml do nothing.
>
> I have the following lines in my access.conf:
I hope you have changed these for posting, because if not there are
errors. You CAN NOT have comments on the same line as directives. If
those comments are just to help us, please next time, put the comment
above the line, because it helps us to see the files exactly as they
appear on your computer.
>
> <Directory /usr/local/www*> #The .html or shtml files directory.
> Options All MultiViews
> AllowOverride All
> Allow from all
> </Directory>
>
> <Directory /usr/local/www/*/cgi-bin*> #The script directory.
> Options ExecCGI
> AllowOverride All
> </Directory>
>
> And, in my srm.conf:
>
> AddHandler cgi-script .cgi
> AddHandler cgi-script .pl
> AddHandler cgi-script .exe
> Options +ExecCGI
>
> AddType text/html .shtml
> AddHandler server-parsed .shtml
>
> Thanks for helpme...
The SSI code you posted originally referenced was:
<!--#exec cgi="/cgi-bin/counter.pl"-->
Two issues. 1) Unless you have either an Alias, AliasMatch, or
ScriptAlias directive to tell Apache that /cgi-bin/ maps to
/the/proper/location, this won't work, because Apache doesn't know where
to find the file. You haven't included any of those directives, so I am
assuming you don't have one. 2) the --> at the end of the SSI command
MUST have a space before it. Without it, it is not a valid SSI command,
refer the docs on mod_include that come with Apache, or SSI RFC.
Lastly, please tell us what your error_log says. I have a feeling the
problem will be either file not found, in which case, look at the
preceding paragraph.
If none of this works, let us know.
Ryan
--
Ryan Bloom
rbbloom@us.ibm.com
------------------------------
Date: Thu, 24 Sep 1998 19:29:30 -0400
From: "Dennis P." <fsi001@gate.net>
Subject: faxing in perl?
Message-Id: <6ugg90$k1k$1@news.gate.net>
does anyone know how i can use perl to fax a complete form to 2-3 locations?
------------------------------
Date: Fri, 25 Sep 1998 16:02:25 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: FS Check
Message-Id: <360BBC23.7B786C89@bbnplanet.com>
Patrick wrote:
> Check a FS and when it's > 80%, post a mail, write a message on screen
> or create an pop-up screen.
I have a lovely little one-line awk script that will do this :)
e.
"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon." R. Carver
------------------------------
Date: Fri, 25 Sep 1998 16:16:35 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: FS Check
Message-Id: <360BBF75.62F99570@bbnplanet.com>
> I have a lovely little one-line awk script that will do this :)
Oops, forgot to tack it on.
/bin/df | /bin/awk '{ if ($6 == "/usr/xxx") { len=length($5);
num=substr($5,1,len-1); if (num+0 > 85) {print "echo \"Brain: /usr/xxx
is greater than 85%! (" $5 ")\" | /usr/ucb/Mail xxxxxxx@skytel.com";} }
}' | /bin/sh
You could do a lot more stuff with Perl such as checking and rotating
certain log files etc that fill the disk, but if all you want to do is
check capacity and email/page, then this is a really simple way to do
it. awk is so worthy of love yet left in the dust so often.
e.
"All of us, all of us, all of us trying to save our immortal souls, some
ways seemingly more round-about and mysterious than others. We're having
a good time here. But hope all will be revealed soon." R. Carver
------------------------------
Date: Sat, 26 Sep 1998 11:29:33 -0400
From: Nick Grossman <ngrossman@searchathome.com>
Subject: Re: getting open(FH, "| tee $filenameVar"); to work (won't convert var name)
Message-Id: <360D085D.C85D058@searchathome.com>
Uri Guttman wrote:
> well i ran this one liner and it works:
>
> perl -e '$f="bar";open F,"|tee $f"; print F "asdf\n"'
>
> not nice code but asdf went to the file and stdout
>
> maybe you should post more broken code. what you have here works.
Ok, the problem was that I have a space after the pipe character. Your
example works perfectly.
Thanks for your help!!
Nick
--
Nicolai Grossman Webmaster
SearchAtHome.com +212-481-6501
http://www.searchathome.com/
------------------------------
Date: Fri, 25 Sep 1998 15:39:41 GMT
From: dave@mag-sol.com
Subject: Re: Help using Perl and Tk
Message-Id: <6ugdfu$61s$1@nnrp1.dejanews.com>
In article <360B8F94.A89AD99E@shaw.wave.ca>,
Rick Delaney <rick.delaney@shaw.wave.ca> wrote:
> Jonathan Feinberg wrote:
> >
> > Soon there will be an O'Reilly book about Perl/Tk. Hang in there.
>
> Is this fact or wish?
Fact:
<http://www.oreilly.com/catalog/lperltk/>
and
<http://www.oreilly.com/catalog/perltkpr/>
hth,
Dave...
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://www.mag-sol.com/London.pm/>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Fri, 25 Sep 1998 11:02:14 -0500
From: Mark Stackhouse <stackhou@execpc.com>
Subject: help with removing leading zeros with reg-exp
Message-Id: <6ugf6e$7gg@newsops.execpc.com>
Could someone please clear up my misunderstanding of "tr"?
I'm trying to remove leading zeros in the first six elements of file
lines. The closest code I can come up with is:
for ($k=0; $k<=5; $k++) #check the first 6 elements
{
if ($line_element[$k] =~ /^0/) #match leading zeros
{
$line_element[$k] =~ tr/1-9//cd; #remove zeros
}
}
I want "000" to be "0"
"001" to be "1"
"002" to be "2"
etc.
"010" to be "10" and so on all the way up to "71"
With the above code, I delete the "0" and "10" becomes "1" etc.
I've searched through the FAQ's, Perlre and re-read the chapter on
reg-exp in Learning Perl but didn't recognize what I need here. Can
someone help me out here?
Thanks,
--
Mark Stackhouse
***********************************************************************
homepage: http://www.execpc.com/~stackhou
"The best things in life aren't things."
--Art Buchwald
***********************************************************************
------------------------------
Date: 25 Sep 1998 12:46:59 -0400
From: Uri Guttman <uri@camel.fastserv.com>
To: Mark Stackhouse <stackhou@execpc.com>
Subject: Re: help with removing leading zeros with reg-exp
Message-Id: <sariuicw35o.fsf@camel.fastserv.com>
>>>>> "MS" == Mark Stackhouse <stackhou@execpc.com> writes:
MS> Could someone please clear up my misunderstanding of "tr"?
MS> I'm trying to remove leading zeros in the first six elements of file
MS> lines. The closest code I can come up with is:
MS> for ($k=0; $k<=5; $k++) #check the first 6 elements
MS> {
MS> if ($line_element[$k] =~ /^0/) #match leading zeros
MS> {
MS> $line_element[$k] =~ tr/1-9//cd; #remove zeros
try using s/^0+// instead of tr//
hth,
uri
--
Uri Guttman Fast Engines -- The Leader in Fast CGI Technology
uri@fastengines.com http://www.fastengines.com
------------------------------
Date: 25 Sep 1998 16:37:33 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: help with removing leading zeros with reg-exp
Message-Id: <6uggsd$avu$2@marina.cinenet.net>
Mark Stackhouse (stackhou@execpc.com) wrote:
: Could someone please clear up my misunderstanding of "tr"?
You don't want tr///, since your task has positional dependencies (remove
'0' from '01', but not '10'). s/// is the right task for this job.
: I'm trying to remove leading zeros in the first six elements of file
: lines. The closest code I can come up with is:
:
: for ($k=0; $k<=5; $k++) #check the first 6 elements
: {
: if ($line_element[$k] =~ /^0/) #match leading zeros
: {
: $line_element[$k] =~ tr/1-9//cd; #remove zeros
: }
: }
My rewrite:
foreach (@line_element[0..5]) {
s/^0+//;
}
In 5.005 you can express that even *more* tersely, believe it or not. :)
The idea is to use an array slice to pull out the @line_element members
you want to transform, iterating over them with $_ aliased to each array
member in turn. The substitution then replaces any initial string of one
or more '0' characters with nothing. Make sense?
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Fri, 25 Sep 1998 17:32:16 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: HELP:: s/// problem...
Message-Id: <360bd1da.2175634@news.ping.be>
hampus@my-dejanews.com wrote:
>The format of the textfile is like this
>($star,$starpic,$starpicnr,$description) example: star,3,5,this is a
>star;star2,6,7,this is also a star;star3,4,4,ssstttaaarr; ----- Now, I want
>to change one of the numbers in the string.
Ough, your message formatting is pretty unreadable.
Anyway, there are several ways of approaching this, I'll describe how I
would tackle it.
* read in the file, split on ";"
* split on ","
You now got the fields of the records. Manipulate, and spit out the
result to a file.
Some code:
$/ = ";"
$\ = ";"; $, = ",";
while(<>) {
my($star,$starpic,$starpicnr,$description) = split/,/,$_,4;
# now manipulate!
...
#printout:
print $star,$starpic,$starpicnr,$description;
}
Does your file include/require/like newlines? You might throw them in as
well, or deal with them separately.
Bart.
------------------------------
Date: Fri, 25 Sep 1998 16:18:58 +0100
From: Antony Gibson <antony.gibson@zetnet.co.uk>
Subject: Re: How do I implement perl with javascript or vice versa?
Message-Id: <1998092516185875139@zetnet.co.uk>
The message <Pine.BSF.4.02A.9809250856260.29005-100000@dillinger.io.com>
from Chocolate <poohba@io.com> contains these words:
> I thought about trying that but isn't onLoad a javascript event. And
> logout.cgi is not a javascript function. It is a perl script. Would it
> still work?
How about using a bit of javascript to open the cgi? For example:
<SCRIPT LANGUAGE="Javascript">
<!--
function LoadCGI(CGIRef) {
document.location.href = CGIRef
}
// -->
</SCRIPT>
<BODY onUnload="LoadCGI(/cgi-bin/logout.cgi)">
etc...
------------------------------
Date: Fri, 25 Sep 1998 18:02:27 +0200
From: Jean-Louis PERSAT <jl.persat@wanadoo.fr>
Subject: How to test if a value is a number or a string
Message-Id: <360BBE93.3F7A2374@wanadoo.fr>
I would like to test the value of a zip code with an if function,
but i don't know how...
thanks
--
e d r a
[communication on-line]
__________________________________________________
TECHNOPARC - 1, Allie Moulin Berger - 69130 ECULLY
Til. : 04 72 52 15 20 - Fax : 04 72 52 15 24
http://www.edra.fr - e-mail : edra@edra.fr
------------------------------
Date: Fri, 25 Sep 1998 16:54:49 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: How to test if a value is a number or a string
Message-Id: <tVPO1.4749$F7.17525005@news.itd.umich.edu>
In article <6ugh42$avu$3@marina.cinenet.net>,
Craig Berry <cberry@cinenet.net> wrote:
>Jean-Louis PERSAT (jl.persat@wanadoo.fr) wrote:
>: I would like to test the value of a zip code with an if function,
>: but i don't know how...
>The question above is more interesting. This regex will test whether $_
>consists entirely of a valid US zipcode, allowing for ZIP+4 or
>old-fashioned five-digit codes:
> /^\d{5}(?:-\d{4})$/
ITYM /^\d{5}(?:-\d{4})?$/
--
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: 25 Sep 1998 16:41:38 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: How to test if a value is a number or a string
Message-Id: <6ugh42$avu$3@marina.cinenet.net>
Jean-Louis PERSAT (jl.persat@wanadoo.fr) wrote:
: I would like to test the value of a zip code with an if function,
: but i don't know how...
The question in your subject line is meaningless, or at least misleading.
Perl values hop back and forth between behaving as numbers or strings as
needed; you as a programmer rarely need to think about this process.
The question above is more interesting. This regex will test whether $_
consists entirely of a valid US zipcode, allowing for ZIP+4 or
old-fashioned five-digit codes:
/^\d{5}(?:-\d{4})$/
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
Date: Fri, 25 Sep 1998 16:19:25 GMT
From: coolbrown@my-dejanews.com
Subject: Looking for System Admin
Message-Id: <6ugfqc$8b0$1@nnrp1.dejanews.com>
San Francisco Bay Area California
Job Summary :
Paralogic Software Corporation, the leader in Java based internet chat
solutions, is
seeking a UNIX System Manager for its network of chat and web servers.
The successful candidate will take on the responsibility of maintaining one of
the
highest uptime and performance networks for chat and web sites in the industry
and
help us face the technical challenges of expanding it to include new internet
based
services.
Reporting Relationship:
reports directly to VP Operations
Responsibilities: maintain Solaris, FreeBSD, and Windows servers, work
stations, and related networking equipment set up and maintain chat/web
servers ensure low chat/web server downtimes through redundancy, data
backups, and disaster recovery plans monitor and maintain high server
performance, and network connectivity, and security help plan network growth,
evaluate, purchase, and install new equipment
Minimum Qualifications:
undergraduate degree in computer science or equivalent or 4+ years of
applicable industry experience ability to work independently and with minimum
supervision
willingness to seek out and solve the technical problems faced by high end
internet installations some Solaris or POSIX system management experience
working knowledge of TCP/IP networking, DNS, Ethernet, hubs, and switches
working knowledge of several operating systems including UNIX,
Windows95/98, WindowsNT and their respective strengths and limitations web
server management experience.
Additional Desirable Qualifications: excellent communication skills Java.
C++, and C programming skills knowledge of current internet security issues
working knowledge of HTML
Contact:
info@paralogic.com
Phone: 510 795 0559
FAX: 510 795 6181
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 25 Sep 1998 15:03:04 GMT
From: mnb@ornl.gov (Mike Burnett)
Subject: network.pl and www.pl for Windows NT?
Message-Id: <6ugbb8$chq$1@sws1.ctd.ornl.gov>
I know very little about perl. I apologize if I'm asking a really
dumb question.
My web server is a Windows NT server. A friend has provided me with a
perl script the runs under UNIX, making use of network.pl and www.pl.
Are there equivalents of these for Windows NT that will allow me to run
the UNIX script under NT without requiring major work?
Mike Burnett
mnb@ornl.gov
------------------------------
Date: Fri, 25 Sep 1998 14:17:30 GMT
From: droby@copyright.com
Subject: Re: NT 4 + PWS 4 vs PERL 5 + CGI
Message-Id: <6ug8lq$130$1@nnrp1.dejanews.com>
In article <6uckur$fh5@chronicle.concentric.net>,
"Phlip" <new_email@see.web.page> wrote:
> Groupies.
>
> To decode the above acronyms, I have Windows NuT 4 and Personal Web
> Server. I'm trying to install PERL 5 so I can gate to it with
>
> http://localhost/cgi-bin/hello.pl
>
> Ever since running the batch file "perlw32-install.bat" that came with
> PERL 5 for NT, when I point IE4 at that URL I get a very slow crawl,
> then the browser times out waiting for a page.
>
> It's as if PERL started but PWS never figured out it ended and never
> sent the page it output. If there were an installation problem or
> security problem PWS would have bounced an error page back instantly.
>
> The following responses will not help:
>
> Read the FAQ.
> Use www.dejanews.com and scan for "PERL and PWS and hang".
> Switch to another language/platform/web server.
> Scan MS's knowledge base.
> Set PERL.EXE to Read/Execute permissions for the Guest role in the
> NTFS file settings.
> Set CGI-BIN to Script, Read and Execute permissions in PWS's virtual
> directory tree.
> Add the .pl extension to the ScriptMap node of the Registry
> settings.
> Change the CreateProcessWithNewConsole setting in the Registry.
> Use PERLis.DLL.
>
Such a long list of responses that won't work! Is this because you've already
tried them all, or do you just not like all those responses?
How about:
Look at your server's error logs. (Does PWS have error logs?)
Run your program from the command line and see what happens.
Show us some code.
--
Don Roby
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Fri, 25 Sep 1998 12:33:25 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <360BC5D5.74B1BDB4@min.net>
Hi, I hope you don't mind me emailing you; but I have a
question which is probably not fit for the broader audience
considering it is probably a newbie/faq.
Hunter Kelly wrote:
>
> public class closure {
>
> interface printer {
> void printTimes(int i);
> void set(int n);
> }
>
> public closure() {}
>
> public printer times_something(int num) {
> final int pnum = num;
> return new printer() {
> int foo = pnum;
> public void printTimes(int i) {
> System.out.println(foo*i);
> }
> public void set(int n) {
> foo = n;
> }
> };
> }
I don't know Java well, so I'm confused by one thing that's
going on here. I wouldn't bother you with it but I think
it's probably central to the discussion. Namely,
printer is defined as a interface, yet you do a
new printer(). Is it possible to instantiate an interface?
What are the semantics of that? Does it make a sort of
ad-hoc class which only implements that one interface, and
then instantiate a single object of that ad-hoc class?
Or...?
Thanks for your time,
John "Many Jars" Porter
------------------------------
Date: Fri, 25 Sep 1998 12:54:38 -0400
From: John Porter <jdporter@min.net>
Subject: Re: Perl & Java - differences and uses
Message-Id: <360BCACE.ED596DBC@min.net>
George Reese wrote:
>
> I threw away my credibility by making it easy to refute my claim???
Let's talk about credibility.
When someone makes a highly contentious claim,
which is met with demands for proof of that claim,
and then refuses to supply any, giving the excuse that the burden
of proof rests with his opponents to prove his claim false,
that person does great injury to his own credibility.
Perhaps it wouldn't be so bad, if that person did not then
rhetorically disallow his opponents for employing the same
device.
This is a person who categorically eschews any onus in the debate.
By so doing, he never provides any supporting evidence for
his position, offering only his own (alleged) expertise as
sufficient to change others' minds.
That this person then insists that his credibility remains
intact and vital, is despicable in the extreme -- at least
in a supposedly academic forum such as this.
--
John Porter
------------------------------
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 3822
**************************************