[7337] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 962 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Sep 2 15:07:20 1997

Date: Tue, 2 Sep 97 12: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           Tue, 2 Sep 1997     Volume: 8 Number: 962

Today's topics:
     Re: character substitutions in msqlperl ..again <rootbeer@teleport.com>
     Re: Check if a URL exists <rootbeer@teleport.com>
     Compiling A Regular Expression <Rodney.Wines@ahqps.alcatel.fr>
     Getting WWW URL info on multi domain server <shawn@epicbc.com_._._>
     Re: Help: Making CGI using Perl <jbolden@math.ucla.edu>
     Re: How to get keys of array? <rootbeer@teleport.com>
     Re: How to get keys of array? <rootbeer@teleport.com>
     Re: Integers, God, and e (was Re: Bug in perl? Bug in m <seay@absyss.fr>
     Re: MacPerl and OS8 (Chris Nandor)
     Re: Password verification with a shadow file ?? <rootbeer@teleport.com>
     Re: Pattern matching problem with \n <rootbeer@teleport.com>
     Re: Perl & Shadow Passwords authentitacion. <rootbeer@teleport.com>
     Re: Perl & Shadow Passwords authentitacion. <ptrainor@aura.title14.com>
     Re: Perl & Shadow Passwords authentitacion. <rootbeer@teleport.com>
     Re: Perl (kind of) math question. <seay@absyss.fr>
     Re: Perl (kind of) math question. <rootbeer@teleport.com>
     Perl and Tango <darin@xcape.com>
     perldoc / win32 <rjo100@york.ac.uk>
     Re: perldoc (Kevin)
     plz help about using DLL w/ perl <yinso@u.washington.edu>
     Re: Q: library for dbase file processing. <rootbeer@teleport.com>
     Server Error Help <fishrman@shell.wco.com>
     Re: SSH and Perl (Ivan Kohler)
     Re: stand-alone perle apps? <jbolden@math.ucla.edu>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 2 Sep 1997 10:15:23 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Pat Trainor <ptrainor@aura.title14.com>
Subject: Re: character substitutions in msqlperl ..again
Message-Id: <Pine.GSO.3.96.970902100747.6498K-100000@julie.teleport.com>

On Tue, 2 Sep 1997, Pat Trainor wrote:

> 	The big question is how to s/ or tr/ or anything the \ character
> (and all the other perl-esque chars) into 'delimited' versions for
> inclusion/extraction in db queries such as the one below.

What's the question? :-)  If you're asking "How can I tell Perl I want a
true backslash in a s/// or tr///?", I can answer that.

	The general rule is: "Whenever you want to mean a real
	backslash in Perl, use two." 

tr/// is backslash-interpolated. So if you wanted to replace a bang with a
backslash wherever it appears, you could use tr/!/\\/ . To go the other
way, tr/\\/!/ .

The left side of s/// is double-quote-interpolated (which is more fancy
than backslash interpolating). If you wanted to replace a backslash with
the string "<backslash>", you could use s#\\#<backslash># .

The right side of s/// is also double-quote-interpolated (although it can
do some other stuff if you use the /e option). If you wanted to try to
reverse the previous transformation, you could use s#<backslash>#\\# . 

If you're trying to backslash all "special" characters, you might want the
quotemeta function. Does any of that do anything for you? Hope this helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 2 Sep 1997 10:07:07 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: lvirden@cas.org
Subject: Re: Check if a URL exists
Message-Id: <Pine.GSO.3.96.970902100646.6498J-100000@julie.teleport.com>

On 1 Sep 1997 lvirden@cas.org wrote:

> You could use webget to do the URL verification - here's a little perl
> script that reads a file full of URLs, fetches their title tag and uses
> it. 
> 
> Frankly, I would love to find a way to speed things up - so if someone
> knows of better ways to do this, I would love to know. 

How about LWP?

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 02 Sep 1997 20:01:09 +0200
From: Rodney Wines <Rodney.Wines@ahqps.alcatel.fr>
Subject: Compiling A Regular Expression
Message-Id: <340C5464.138B499E@ahqps.alcatel.fr>

I'm writing a Perl (V5.003_95) script to process Netscape server access
logs.  When the script opens a log, it reads the first line of the file
to find the format for the records in the file.  It then turns the
format into a regular expression which will extract the individual
fields for the rest of the records.  This is necessary, because over
time we've changed our minds about the stuff we want to log, and I
suspect we'll do so again.

All works well.  The problem is that I don't have a lot of log files,
but each log can have a few hundred thousand entries in it.  I suspect
that my script would go faster if it didn't have to re-compile the
format for each record.  I'd like to only re-compile it for each log.
The script is a loop within a loop:

foreach $log (@logs) {
    open LOG, $log || die ...
    &get_format;
    while (<LOG>) {
        if (!(@data = /$format/g)) {    #Split the fields into @data,
and complain if the pattern doesn't match.
            print "\nFormat doesn't match:\n$_\n\n\n";
            next;
        }
        # ... Do something with the data.
    }
}

I'd really like to use "/$format/og", and for $format to get recompiled
only each time through the "foreach" loop.  I tried saying "my $format"
as the first statement in the "foreach" loop, but that didn't help.
Next, I tried putting all the processing for the "foreach" in a
subroutine, so that the main loop became simply:

foreach $log(@logs) {
    &process_log_file;
}

That didn't help, either.

I thought of assigning the whole inner loop to a string, then "eval"ing
it each time, but that seemed a bit heavy handed.  Is there a better
way?

A response via E-mail would be appreciated.  Thanks.



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

Date: Tue, 02 Sep 1997 10:39:58 -0700
From: Shawn Neumann <shawn@epicbc.com_._._>
Subject: Getting WWW URL info on multi domain server
Message-Id: <340C4F6E.B3083A2C@epicbc.com_._._>

I have a web server that has two domain names pointed to it:  (e.g.
www.one.com and www.two.com)  Both point to the same directory.  My
problem is that I don't have access to the server config files to
redirect requests for www.one.com to "htdocs/one".  What I want to do is
have a cgi script that will return the name of the page requested by the
browser.  I will then re-direct the request in the script.  I know in
JavaScript I can get this value with "document.location".  Is there any
similar way to find this out in Perl?

Thanks for your help!

Shawn


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

Date: Tue, 02 Sep 1997 10:00:35 -0700
From: Jeffrey Bolden <jbolden@math.ucla.edu>
Subject: Re: Help: Making CGI using Perl
Message-Id: <340C4633.6DE5@math.ucla.edu>

stormshield@hotmail.com wrote:
> 
> I want to make a CGI which uses Perl, but I don't know anything about
> Perl now. I need a CGI working these on my homepage;
> 
> (1) Showing visitor's IP Address.
> (2) Getting data (IP Address) from web visitors.
> (3) Running Traceroute and Ping to the IP Address visitors entered.
> (4) Output the result to web.

At the command prompt type "perldoc cgi".  Everything you have here is
straightforward cgi stuff.  However this newsgroup doesn't like cgi
questions so...


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

Date: Tue, 2 Sep 1997 10:27:47 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Tracy Vonick <tvonick@sprynet.com>
Subject: Re: How to get keys of array?
Message-Id: <Pine.GSO.3.96.970902102507.6498M-100000@julie.teleport.com>

On 2 Sep 1997, Tracy Vonick wrote:

> I have X numbers of lines of data & each line starts with a unique
> definable key. I can get the lines into arrays but can't print out the
> actual
> keys. 

> ex   20:This is test line #1
>        30: This is test line #2
>        40: This is test line #3

Does this do anything good?

    @keys = map { my($c = $_) =~ s/:.*$/s; $c } @list;

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 2 Sep 1997 10:30:43 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Tracy Vonick <tvonick@sprynet.com>
Subject: Re: How to get keys of array?
Message-Id: <Pine.GSO.3.96.970902102914.6498N-100000@julie.teleport.com>

[ Oops! I left out a punctuation mark on my first try at this. Again... ]

On 2 Sep 1997, Tracy Vonick wrote:

> I have X numbers of lines of data & each line starts with a unique
> definable key. I can get the lines into arrays but can't print out the
> actual keys.

> ex   20:This is test line #1
>        30: This is test line #2
>        40: This is test line #3

Does this do anything good?

    @keys = map { my($c = $_) =~ s/:.*$//s; $c } @list;

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 02 Sep 1997 19:12:51 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Integers, God, and e (was Re: Bug in perl? Bug in my code?)
Message-Id: <340C4913.504EEC64@absyss.fr>

Clinton Pierce wrote:
> 
> In article <5u471i$lli$2@gte2.gte.net>,
>         jdf@pobox.com (Jonathan Feinberg) writes:
> >gbacon@adtran.com said...
> >> Tom C. once wrote "God created the integers.  All else is the work of
> >> man
> >
> >Hmmm.  If you can find some integers whose relationship results in
> >the value of the electron's QED "rest-mass" constant n, please
> >let us know.  Perhaps there's a Physics::QED module on CPAN...
> >
> 
> How do you know that God's Integers don't look like:
> 
>         0
>         9.1e-28
>         1.4142135
>         2.7182818...
>         3.1415926...
>
> What base does God count in?

Umm, integers (by defintion) don't have fractional values.  Other than
0, none of those values are integral.  But maybe the problem is that our
definition of "integer" isn't the best one.  I'm not enough of a
mathematician or a theologian to comment on that.

- doug


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

Date: Tue, 02 Sep 1997 13:50:17 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: MacPerl and OS8
Message-Id: <pudge-ya02408000R0209971350170001@news.idt.net>


In article <340B35C9.2A9C126C@admin.ccny.cuny.edu>, Robert Feinman
<rdf@admin.ccny.cuny.edu> wrote:

# I just upgraded to OS8 and tried to run MacPerl.
# It froze the machine. After downloading the *latest* version
# I was able to get it launch.
# I then tried to access the preferences menu item.
# I box appeared and after 30-60secs a series of icons across
# the top, then the machine froze.
# Has anyone gotten this to work?

I have had zero problems with MacPerl 5.1.3 and Mac OS 8, and I cannot
think of anyone else on the MacPerl list having such problems, either.  My
guess is an extension conflict, but that is only a guess based on the fact
that I know of no problems associated with MacPerl 5.1.3 and Mac OS 8.

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])


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

Date: Tue, 2 Sep 1997 10:41:50 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Aaron Sherman <ajs@ajs.com>
Subject: Re: Password verification with a shadow file ??
Message-Id: <Pine.GSO.3.96.970902103155.6498O-100000@julie.teleport.com>

On Tue, 2 Sep 1997, Aaron Sherman wrote:

> However, if you are living in a production business environment, you
> have to ask yourself how much work it's worth to make your CGI use your
> standard UNIX passwords, and if that's really the right thing to do in
> the first place. I would even argue that it's much safer to have the CGI
> use DIFFERENT passwords (even different usernames). 

Agreed. But, in many environments, it can be less secure to require users
to remember too many passwords - since they'll be more prone to writing
them down, for example. If you wish to use the same passwords, a
password-authentication daemon is no less secure than (as the original
poster suggested) seeing whether non-anonymous FTP succeeds for that
username-password combination. Certainly that method (and telnet) make it
possible for someone to try many passwords in an attempt to crack a
system. (Of course, the daemon could (and probably should) be set up to
log repeated failures, or to delay five seconds before responding if any
password failure occurred in the past minute. But that doesn't affect the
principle of using an authentication daemon.) 

> But again, it's cost/benefit. If you don't care, then don't pay.

Agreed. If you want a really secure system, install it behind a firewall,
and don't let it connect even to the power company. :-)

> PS: I've recently developed sleep apnea, so going to sleep IS merely an
> acceptable risk (and not very acceptable at that). ;-)

I'm sorry that my analogy was unintentionally so fitting. Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 2 Sep 1997 10:22:13 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Simon Hyde <shyde@poboxes.com>
Subject: Re: Pattern matching problem with \n
Message-Id: <Pine.GSO.3.96.970902102054.6498L-100000@julie.teleport.com>

On Mon, 1 Sep 1997, Simon Hyde wrote:

> The following should do:
> 
>  s/\\t/\t/g;
> s/\\n/\n/g;
> s/\\\\/\\/g;

Do you see how that mis-translates the string backslash-backslash-n?

> or if you want to be clever try:
> s/(\\t|\\n|\\\\)/eval('"'.$1.'"')/eg;

That's not especially clever, IMHO, with a slow eval string for each
match. I'd prefer a lookup in a hash, since that's much faster. Hope this
helps! 

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 2 Sep 1997 10:06:18 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Perl & Shadow Passwords authentitacion.
Message-Id: <Pine.GSO.3.96.970902100145.6498H-100000@julie.teleport.com>


On 1 Sep 1997, Tom Grydeland wrote:

> So unprivileged code gets the crypted passwords in these systems, and in
> one of them it even gets the root password!  None of these have crypted
> passwords in the /etc/passwd file. 

You've probably already let the sysadmin know about this. You should also
probably try to persuade him or her to contact the vendor and CERT,
because something's seriously wrong with that implementation (or
installation) of shadow passwords. Almost certainly, yours isn't the only
site which has this potential hole.

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/




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

Date: Tue, 2 Sep 1997 13:33:12 -0400
From: Pat Trainor <ptrainor@aura.title14.com>
To: Tom Grydeland <tom@mitra.phys.uit.no>
Subject: Re: Perl & Shadow Passwords authentitacion.
Message-Id: <Pine.LNX.3.95.970902132546.3639B-100000@aura>

On 1 Sep 1997, Tom Grydeland wrote:

> palver ~/ > perl -le 'while(($n,$p)=getpwent){print "$n:$p"}'

	While trolling for an answer to my problem, this caught my eye.
Running on shadow-960325 with Linux 2.0.0 yields:

root[/usr/src/shadow]>  perl -le 'while(($n,$p)=getpwent){print "$n:$p"}'
root:x
bin:x
daemon:x
adm:x
sync:x
 ...

	and as non-priveledged:

www[/usr/local/etc/apache]> perl -le 'while(($n,$p)=getpwent){print
"$n:$p"}'
root:x
bin:x
daemon:x
adm:x
sync:x
 ...

	This result makes sense to me, in both cases, due to where
getpwent looks (same as for dir/file id-> name).. 
   	On a shadowed SVR4 system, this command shouldn't yield any
information on actual passwords for _any_ user, right? Now, if you were to
open a filehandle to /etc/shadow from the superuser (or SUID) shell...


pat 	
:)
  	

ptrainor@aura.title14.com
http://www.title14.com/resume
#$reality=$bandwidth!=spam;
"While it's true winning isn't everything-LOSING IS NOTHING!" -Ed Bighead




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

Date: Tue, 2 Sep 1997 10:47:25 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Fil Krohnengold <fil@amnh.org>
Subject: Re: Perl & Shadow Passwords authentitacion.
Message-Id: <Pine.GSO.3.96.970902104600.6498Q-100000@julie.teleport.com>


On 2 Sep 1997, Fil Krohnengold wrote:

> That might be more of a NIS+ issue - I dumped NIS+ many moons ago -
> but I remember that the default permissions on the ecrypted passwd
> entries weren't what they should have been without a manual "nischmod"
> or "nistbladm" - I forget the actual command.  (In fact - by default, 
> users had *write permission* on thier uid entry in the passwd table - 
> I'm tired of being 23451 today - maybe I'll be 0 instad...).  

The interesting thing about this is that, once you've done that, it's easy
enough to log in and fix the security hole. :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 02 Sep 1997 19:08:52 +0200
From: Doug Seay <seay@absyss.fr>
Subject: Re: Perl (kind of) math question.
Message-Id: <340C4823.5EA0DE14@absyss.fr>

Mike Stok wrote:
> 
> 12 and 60 happen to be really good numbers to divide up without
> remainders, and are much easier for humans unpolluted by metric
> brainwashing to handle.  Only people without any idea about the difference
> between fingers and thumbs would promote a base 10 system as "natural" ...
> had the metric system been octal then the world would be a better place
> ;-)

8 (primes 2) utilization 62.5% no common factors with 3,5,7
10 (primes 2,5) utilization 70% no common factors with 3,7,9
12 (primes 2,3) utilization 75% no common factors with 5,7,11
60 (primes 2,3,5) utilization 75% no common factors with
7,11,13,17,19,23,29,31,37,41,43,47,49,53,59

Base 12 is a bit better in having common factors with smaller numbers,
but not too much.  Duodecimal's big claim is that it is a multiple of 3
and we like to divide by 3 a lot.  Perhaps because 3 is the second
smallest prime number, and therefore the second most occuring common
factor.

60 has all the advantages of 12 plus it is a multiple of 5, so 7 is the
smallest prime number that is not divisible by 60.  It also has common
factors with the same percentage of smaller integers (75%).  But 60 is
just too big for daily use IMHO.

Base 8 just plain sucks.

Metric is OK, it is just that those revolutionary Frenchies were
compliant with the existing "decimal standard".  Although I agree that
decimal isn't the best, at least it is a standard.

- doug

PS - Yes, I have put much more brain power into this topic than it
deservers.  Nothing new or extraordinary there.


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

Date: Tue, 2 Sep 1997 10:44:14 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Doug Seay <seay@absyss.fr>
Subject: Re: Perl (kind of) math question.
Message-Id: <Pine.GSO.3.96.970902104250.6498P-100000@julie.teleport.com>

On Tue, 2 Sep 1997, Doug Seay wrote:

> But since French has single words for numbers up through 16, maybe the
> ancient French (Gauls?  Gallo-Roman?) used hexadecimal.  I asked my wife
> (both French and a software engineer) about this once and she rejected
> it out-of-hand. 

Actually, French uses nearly a base-twenty system. The French word for
eighty-seven is really saying "fourscore and seven".

So maybe they counted on their toes... :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: Tue, 02 Sep 1997 13:12:06 -0400
From: Darin Kaplan <darin@xcape.com>
Subject: Perl and Tango
Message-Id: <340C48E6.71F7@xcape.com>

Has anybody out there tried to implement Perl calls with Tango from
Everyware development on NT?

Any help would be appreciated.

Darin Kaplan
darin@xcape.com


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

Date: Tue, 02 Sep 1997 15:42:43 +0100
From: Russell Odom <rjo100@york.ac.uk>
Subject: perldoc / win32
Message-Id: <340C25E3.232B7907@york.ac.uk>

Hmmmm...

C:\Program Files\Perl\utils>perl perldoc.pl perldoc
Can't locate auto/Text/ParseWords/shellwords.al in @INC at perldoc.pl
line 68

This is Perl for Win32 build 307 (5.003_07).

Any suggestions?

Russ

---------------------------------------------------------------------
--[ R u s s e l l    O d o m ]---[    mailto:rjo100@york.ac.uk    ]--
--[  University of York, UK  ]---[ http://www.york.ac.uk/~rjo100/ ]--
---------------------------------------------------------------------
--[    FAQ maintainer, news:comp.os.ms-windows.win95.moderated    ]--
---------------------------------------------------------------------



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

Date: 2 Sep 1997 10:00:02 -0700
From: klander@primenet (Kevin)
Subject: Re: perldoc
Message-Id: <340c4659.3447837@news.primenet.com>

On 1 Sep 1997 15:48:21 GMT, mjtg@cus.cam.ac.uk (M.J.T. Guy) wrote:

>You seem to have a very bent Perl installation.   Did you check all
>the output from Configure / make / make test / make install for errors?
>(Did you run "make test" at all?)     Did you use unusual options to
>Configure?
>

I watched it build and didn't notice anything glaring.  And yes, I ran
"make test", and it was clean.  No unusual options either.

>perldoc gets its pod information for a module from the module itself,
>which will be in IO/Socket.pm in one of the directories in the @INC list.
>So if it fails to find it, the module isn't installed as it should be.
>

Let's see...without modification, $INC[0] is
'/usr/local/lib/perl5/sun4-sunos/5.00401' and $INC{'IO/Socket'} is
'/usr/local/lib/perl5/sun4-sunos/5.00401/IO/Socket.pm'.  Does that
look right?

The previous perl installation here was pretty screwed up, so maybe
it's screwing this one up too...

-Kevin


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

Date: Tue, 2 Sep 1997 10:53:22 -0700
From: Y Chen <yinso@u.washington.edu>
Subject: plz help about using DLL w/ perl
Message-Id: <Pine.OSF.3.96.970902105110.25031A-100000@saul6.u.washington.edu>

Hi gurus,

I got a question that may be very dumb, but plz help me if you can.  I
have some already compiled dlls and I want my perl script to access it.  I
know the API to my dlls, but they are compiled under either C/C++ or
Pascal.  plz let me know if there is an easy way of accessing my dll's
functionalities.

any help is appreciated :)

yin-so			



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

Date: Tue, 2 Sep 1997 10:53:21 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Ster <ster@stargazer.net>
Subject: Re: Q: library for dbase file processing.
Message-Id: <Pine.GSO.3.96.970902104749.6498R-100000@julie.teleport.com>


On 2 Sep 1997, Ster wrote:

> I understand there are PERL libraries for processing DBase files
> (insert,delete,edit,search,etc.)
> Can someone direct me to an EASY library that is PERL 4 compatible (not
> PERL 5)

And do you have a version of Perl which runs on ENIAC? 

:-)

Seriously, if you're developing new scripts, you should really write them
for version 5. If you've got old scripts which you don't want to update
right now, that's no problem - you don't have to discard Perl 4 to install
the new version. Then you can update each old script as you have time.
(Usually only a minute or two per script - really!)

That's the carrot. The stick is that bugs in Perl 4 are no longer being
fixed, so if you choose to use it, you're on your own.

Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 2 Sep 1997 18:13:56 GMT
From: "Michael A. Watson" <fishrman@shell.wco.com>
Subject: Server Error Help
Message-Id: <5uhl14$2q9$1@news.wco.com>

I created a simple pearl script called test.cgi (see the source below). 
When I run it from my Unix shell account it runs fine, but when I run 
it through a HTML FORM using 
<form method=POST action="http://myhost.com/~mydir/cgi-bin/test.cgi"> 
I get a server error 500 "Internal Server Error The server encountered 
an internal error or misconfiguration and was unable to complete your request."

But when I check the output file it has the correct data from the html form.

So the script is working but why do I get an error only when it is posted 
through html?

source:
#!/usr/local/bin/perl
$buffer = <STDIN>;
open(NEWFILE,">TEST.TXT") || die $!;
print NEWFILE "$buffer\n";
close(NEWFILE);

thanks
fishrman@wco.com




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

Date: Sun, 31 Aug 1997 16:20:57 GMT
From: ivan@voicenet.com (Ivan Kohler)
Subject: Re: SSH and Perl
Message-Id: <34099a6f.69511267@netnews.voicenet.com>

Hello,

system('/usr/local/bin/ssh','-n','-o BatchMode yes',$host,$command);

and

system('/usr/local/bin/scp','-Bpr',$src,$dest);

work for me.  If you find something better, please post it up!

jjune@midway.uchicago.edu wrote:

>Hi!
>
>I am currently trying to write a perl script that will utilize ssh and scp
>to
>
>	1)  Copy files to many different servers automatically;
>	2)  Execute commands on many different servers automatically;
>
>Basically I need to be able to execute the same command on multiple
>servers... for example... I will need to scp a file (a tar file) to 30
>different servers... and execute a command to untar the file on all 30
>servers.
>
>I think I can set up the ssh with RSA to ssh in and out of all the servers
>without passwords... so i'm in the process of writing a perl script which
>will basically read in the server ips and do a system call on them...
>
>turning out to be MUCH more tricky then I had anticipated... has anyone
>seen any script that does this?... Or better yet... can anyone offer any
>pointers or advice on how to go about writing something like this?
>
>thanks for your help!
>
>-------------------==== Posted via Deja News ====-----------------------
>      http://www.dejanews.com/     Search, Read, Post to Usenet


Ivan Kohler
VoiceNet Staff
ivan@voicenet.com
"I may not have the world to give to you
 but maybe I have a tune or two." -JG/RH


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

Date: Tue, 02 Sep 1997 10:07:55 -0700
From: Jeffrey Bolden <jbolden@math.ucla.edu>
Subject: Re: stand-alone perle apps?
Message-Id: <340C47EB.6F74@math.ucla.edu>

Mark E. Crane wrote:
> 
> I'm burning 400 images on a cd rom for use by faculty at our school.  The
> end product will be running on windows 3.1.
> 
> Can someone tell me if it is possible to put a Perl-based crawler and
> search engine on the cd-rom that will look through the images (actually,
> the html that accompanies each image) and let users search for stuff by
> topic/keyword?
> 
> How tough would this be to do?

I don't know of a perl script, but walnut creek includes a freeware
program that does exactly this on all their grab bag type cdroms (for
example the TeX and the perl ones).  

> Would I have to have some sort of standalone server burned on the disk
> that would run cgi scripts?

apache?


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

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

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