[6624] in Perl-Users-Digest
Perl-Users Digest, Issue: 249 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 7 17:27:14 1997
Date: Mon, 7 Apr 97 14:00:24 -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 Mon, 7 Apr 1997 Volume: 8 Number: 249
Today's topics:
Base conversion routines available? <dslauson@boulder.vnet.ibm.com>
Error Http 500 1.0 not supported lawrence@faxserver.com
giving a subroutine as a parameter of a function <fretje@bicho.eui.upm.es>
Re: giving a subroutine as a parameter of a function <jong@mrc-lmb.cam.ac.uk>
Help Installing GD with NT Perl <sgilliar@cmp.com>
RE: Help newbie:Using passwd file to verify Web access <derekb@teleport.com>
HELP! With MacPerl (Ben Brown)
Re: HELP! With MacPerl (Chris Nandor)
Holy Wars! (was: Perl vs C++, Unix vx MS, etc) (Jason C Austin)
How to use COOKIES from perl ??? <konink@telebyte.nl>
IFSHLP.SYS <bwil@erinet.com>
Re: Live Randal Schwartz interview (Bennett Todd)
Negative lookahead and nested stars BUG? (Vincent Partington)
Re: Ousterhout and Tcl lost the plot with latest paper <tchrist@mox.perl.com>
Re: Ousterhout and Tcl lost the plot with latest paper <tchrist@mox.perl.com>
Perl 5 for Win95 Installation Question <spaustin@ualr.edu>
Re: Perl 5 for Win95 Installation Question <spaustin@ualr.edu>
Re: perl Alpha compiler on OS/2? (Ilya Zakharevich)
Re: perl Alpha compiler on OS/2? (Nathan V. Patwardhan)
Re: Perl and NT <jong@mrc-lmb.cam.ac.uk>
Re: Problems with OO Perl5 features (Ilya Zakharevich)
Q-> Win32 / Registry Module <frank.caccavale@mci.com>
re:Help Doing a chomp type function (Timothy Hall)
Seeking cgi-bin host...for free...make $ off a search e (Mwebernet)
Re: sort array? (David Alan Black)
Re: Wrapping text in Perl (Timothy Hall)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 07 Apr 1997 13:13:57 -0500
From: David Slauson <dslauson@boulder.vnet.ibm.com>
Subject: Base conversion routines available?
Message-Id: <33493965.3A87@boulder.vnet.ibm.com>
I need to be able to convert a 7-digit (base 10) number to a higher
numeric base (base 32). I also need to convert a base 32 number back
to base 10. Anyone have a (or know of) a perl subroutine that will
perform these functions? Regards,
David Slauson
------------------------------
Date: Mon, 07 Apr 1997 14:51:33 -0600
From: lawrence@faxserver.com
Subject: Error Http 500 1.0 not supported
Message-Id: <860441675.23336@dejanews.com>
I have a few cgi scripts I've been running on AIX UNIX, they work fine. I
desire to port them to Windows NT 4.0 platform. I installed Perl 5.003
for Win32, mapped the .pl extension to use the perl.exe, followed all the
steps necessary for proper implementation. Each time I try to run my
script I get this error from my browser "Http 500 1.0 not supported" If I
clicked on the browser's refresh button, my script will be displayed in
text format. I do not know what I am doing wrongly.
Any help will be greatly appreciated.
Thanks.
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Mon, 7 Apr 1997 20:46:11 +0200
From: Frederiek Lefebvre <fretje@bicho.eui.upm.es>
Subject: giving a subroutine as a parameter of a function
Message-Id: <Pine.SUN.3.96.970407204222.13836A-100000@bicho.eui.upm.es>
I wander if there is a way to give a function a subroutine
as parameter in Perl. Does anybody know?
.-ccc-,
( )
( )
-!x!- ( )
/c c\ ( )
! ! ( )
! ! ( ) Greetings
! __ _, (cccc-( )
/\/\ (. ).) `_'_', ( ) Fretje
C __) (.( .)-( )
! /ccc \ (_ ( ) Fretje@bicho.eui.upm.es
/ \ c====' /_____/` D)ee
/`-_ `---' \ |ee
.__|c-/^\-c|_/_ |\/\/\/\|| |ee
__. ||/.\ | |OooooOee
\ ---. \ | | \ DO THE BARTMAN!!
_- ,`_'_' .c\ \|__ __|-____ / )e
< -(. ).) \ ( .\ (. ) \(_/ )e
c- _) \_- ooo @ (_) @ \(_//.e
/ /_C (-.____) /((O)/ \ ._/\c_.e
/ |_\ / / /\\\\`-----'' _|o< |__
| \ooooO ( \ \\ \\___/ \ `_'_', /
\ \__-| \ `)\\-'\\ '--. /_(.(.)- _\
\ \ ) |-`--.`--=\-\ /-//_ ' ( c D\
\_\_) |-___/ / \ V /.c \/\\\ (@)___/ c|
/ | / | |. /`\\_/\/ /
/ | ( C`-'` / | \/ (/ /
/_________- \ `C__-c | / (/ /
------------------------------
Date: Mon, 07 Apr 1997 21:26:41 +0100
From: Jong <jong@mrc-lmb.cam.ac.uk>
To: Frederiek Lefebvre <fretje@bicho.eui.upm.es>
Subject: Re: giving a subroutine as a parameter of a function
Message-Id: <33495881.2781@mrc-lmb.cam.ac.uk>
Frederiek Lefebvre wrote:
>
> I wander if there is a way to give a function a subroutine
> as parameter in Perl. Does anybody know?
>
There is.
Use function reference.
Jong
( )
> ( )
> -!x!- ( )
> /c c\ ( )
> ! ! ( )
> ! ! ( ) Greetings
> ! __ _, (cccc-( )
> /\/\ (. ).) `_'_', ( ) Fretje
> C __) (.( .)-( )
> ! /ccc \ (_ ( ) Fretje@bicho.eui.upm.es
> / \ c====' /_____/` D)ee
> /`-_ `---' \ |ee
> .__|c-/^\-c|_/_ |\/\/\/\|| |ee
> __. ||/.\ | |OooooOee
> \ ---. \ | | \ DO THE BARTMAN!!
> _- ,`_'_' .c\ \|__ __|-____ / )e
> < -(. ).) \ ( .\ (. ) \(_/ )e
> c- _) \_- ooo @ (_) @ \(_//.e
> / /_C (-.____) /((O)/ \ ._/\c_.e
> / |_\ / / /\\\\`-----'' _|o< |__
> | \ooooO ( \ \\ \\___/ \ `_'_', /
> \ \__-| \ `)\\-'\\ '--. /_(.(.)- _\
> \ \ ) |-`--.`--=\-\ /-//_ ' ( c D\
> \_\_) |-___/ / \ V /.c \/\\\ (@)___/ c|
> / | / | |. /`\\_/\/ /
> / | ( C`-'` / | \/ (/ /
> /_________- \ `C__-c | / (/ /
--
I support Perl, Linux ...
With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?
) Linux Newsletter
http://www.smli.com/people/john.ousterhout/scripting.html
------------------------------
Date: Mon, 07 Apr 1997 15:53:20 -0400
From: Steve Gilliard <sgilliar@cmp.com>
Subject: Help Installing GD with NT Perl
Message-Id: <334950B0.5419C2EA@cmp.com>
I just installed perl 5.003_7 for windows nt with the GD.pm module and
moved all the necessary files to there directories. When I try to debug
the test.pl script that comes with Gd.pm I get the following error
message:
Error: parse exception
I'm using what I think is the latest GD library for Win32
(Win32_gd_v961016.zip). If anyone could shed a little light to what I'm
doing wrong, i'd greatly appreciate it.
--
Steve Gilliard
Web Solutions
steveg@htp.net
------------------------------
Date: Mon, 7 Apr 1997 13:29:58 -0700
From: Derek Boonstra <derekb@teleport.com>
To: javed@research.nj.nec.com
Subject: RE: Help newbie:Using passwd file to verify Web access
Message-Id: <Pine.GSO.3.96.970407123705.29004A-100000@linda.teleport.com>
>I am setting up a system, and rather than assign every user a fresh
>account/password pair for every user or use .htaccess, I want a way to
>verify/authenticate users from their unix account information.
>
>Any information/sample code/pointers will be appreciated.
You will still have to use the .htaccess file but you need to point
its users to a shadow of your passwd file that is readable via www.
This is a big security risk because if anyone gets a hold of your
shadowed passwd file, your system is in deep compromised s**t.
Only shadow the users you want (not root!).
Ensure that you trust _everyone_ that has accounts on the web server.
If I had an account on this webserver and I _really_ wanted to take a
look at these protected web pages I would write a CGI that would read the
web pages for me. I could do this because I can run programs with the
same permissions as the httpd. I might also be malign enough to look at
the .htaccess file. This would point me to the users file.
So, I write a CGI to read the users file...
Now ... within the users file, I may notice a correlation between
usernames and people who have accounts on the system. As a rational
thinking person I can easily assume that even if the users file is not
directly shadowed from the passwd file, that these users may use the same
passwd for the httpd and their shell accounts. I move the file off
location, run a cracker over it, and then start some real trouble.
!!!!!! VERY BAD !!!!!!!
So, read on if this is really what you want to do...
your .htaccess file should look like this
This example uses the AuthUserFile of /usr/local/etc/httpd/conf/users
--BEGIN----------------------------------------------
AuthType Basic
AuthName Staff_stuff
AuthGroupFile /dev/null
AuthUserFile /usr/local/etc/httpd/conf/users
<LIMIT GET POST>
require valid user
</LIMIT>
--END-------------------------------------------------
the /usr/local/etc/httpd/conf/users file will look like this
--BEGIN------------------------------
usr1:tz56TRICtvp4I
usr2:Uxc5VQTYQwVLw
--END----------------------------------------------------
to create the users file, do something like this
--BEGIN------------------------------------------------------
#!/usr/bin/perl
$http_user_file = "/usr/local/etc/httpd/conf/users";
$passwd_file = "/etc/master.passwd"; # this is BSD
# for Solaris use "/etc/shadow"
# users I want http passwd access for
@users = qw(usr1 usr2 usr3);
open USERS, "> $http_user_file";
open PW, $passwd_file;
while (<PW>) {
($user,$pass) = (/^([^:]+):([^:]+):/) or next;
if ( grep /^$user$/, @users ) {
print USERS "$user:$pass\n";
}
}
close PW, USERS;
--END--------------------------------------------------
The passwd entries are encrypted with the system crypt function.
The actual encryption type varies from one system to another but is
typically DES. The httpd uses the system crypt for authentications.
crontab this to run every day or so to update any changed passwds and
you are all set (with a new security concern)
Hope this helps,
__ __ __
___/ /__ _______ / /__ / /
/ _ / =_) __/ =_) '_// _ \
\_._/\__/_/ \__/_/\_\/_.__/@teleport.com
------------------------------
Date: 7 Apr 1997 11:55:08 -0700
From: bbrown@eyrie.org (Ben Brown)
Subject: HELP! With MacPerl
Message-Id: <5ibfuc$5gb@eyrie.org>
Hi,
I've been trying to install MacPerl, but the linkss in the HTML MacPerl
FAQ on www.perl.org for the most part go nowhere. Is there a more recent
version and/or a better location to download the binary from? I downloaded
one but now can't unstuff it.
Any help would be unbelievably appreciated.
-Ben
------------------------------
Date: Mon, 07 Apr 1997 15:21:46 -0400
From: pudge@pobox.com (Chris Nandor)
Subject: Re: HELP! With MacPerl
Message-Id: <pudge-ya02408000R0704971521460001@nntp.noc.netcom.com>
http://err.ethz.ch/~neeri/macintosh/perl.html
ftp://err.ethz.ch/pub/neeri/MacPerl/
The most recent version is 5.1.3 (if you download the PerlGUI archive, you
can get your hands on 5.1.4a).
#================================================================
When I have a kid, I want to buy one of those strollers for
twins. Then put the kid in and run around, looking frantic.
When he gets older, I'd tell him he used to have a brother, but
he didn't obey.
--Steven Wright
Chris Nandor pudge@pobox.com
PGP Key 1024/B76E72AD http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6
------------------------------
Date: 06 Apr 1997 16:51:11 GMT
From: jason@quake.cs.odu.edu (Jason C Austin)
Subject: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <JASON.97Apr6125111@quake.cs.odu.edu>
Okay, I've made a new resolution; no more getting sucked into
holy wars! There's just too much lost information in a news post and
it just goes around in circles.
I have learned a bit reading through them. People tend to
promote what they know and dislike what they never learned completely.
If you don't know what polymorphism, a virtual constructor, and
multiple inheritance is or can't use them effectively, you can't argue
for or against C++. If you can't write a decent regex or type a $
without looking at the keyboard, you can't argue for or against perl.
Unix is better than Windows in some applications and Windows is better
that Unix in others. Why argue and block out all the real questions?
--
Jason C. Austin
austin@visi.net
------------------------------
Date: Mon, 07 Apr 1997 21:51:49 +0200
From: "T. de Konink" <konink@telebyte.nl>
Subject: How to use COOKIES from perl ???
Message-Id: <33495055.4BC4@telebyte.nl>
Hello,
I want to use cookies for an internet-game I'm going to develop, soo I
can identify the players.
QUESTION:
How can I set and "read" cookies from a Perl script.
Thanks in advance.
Thomas de Konink
E-mail: mailto:konink@telebyte.nl
------------------------------
Date: Mon, 07 Apr 1997 16:19:51 -0400
From: Bud Allen <bwil@erinet.com>
Subject: IFSHLP.SYS
Message-Id: <334956E7.5EA9@erinet.com>
Hello,
Well I'm not a programmer but i thought somebody here might answer my
question.
Whats is IFSHLP.SYS? What's it for, what's it do, and why does windows
require it?
If this is the wrong group to post this in, please let me no. Perhaps
point me to the right one.
Thanks in advance,
I may not get back here so a e-mail answer would be greatly appreciated.
Bud Allen
bwil@erinet.com
------------------------------
Date: 7 Apr 1997 16:05:40 GMT
From: bet@rahul.net (Bennett Todd)
Subject: Re: Live Randal Schwartz interview
Message-Id: <slrn5ki6qk.kos.bet@waltz.rahul.net>
On 06 Apr 1997 18:17:15 -0400, Eric S. Johansson <esj@harvee.billerica.ma.us> wrote:
>hmm, thought he was pining for the fjords...
Wait a minute, doesn't this belong in comp.lang.python?
-Bennett
"Stop hitting me!"
------------------------------
Date: 7 Apr 1997 20:50:29 GMT
From: vinny@nmg.DONT_NEED_SPAMS.nl (Vincent Partington)
Subject: Negative lookahead and nested stars BUG?
Message-Id: <vinny-0704972250500001@p712.asd.euronet.nl>
Hi everybody,
While messing about with regexpes for parsing HTML documents I think I
stumbled upon a bug. It concerns the following script:
---> start of rebug.pl
#!/usr/local/bin/perl
# this regexp hangs perl5.002 and perl5.003
$re1 = '\[if\b((?:[^\]\'"]*|([\'"]).*?\2)*)\](?!\])';
# this one does not
$re2 = '\[if\b((?:[^\]\'"]*|([\'"]).*?\2))\](?!\])';
print "trying re2 on simple text\n";
'hi' =~ m{$re2}is;
print "trying re2 on complex text\n";
'hi [[if _nr exists]]something else[[/if]] there' =~ m{$re2}is;
print "trying re1 on simple text\n";
'hi' =~ m{$re1}is;
print "trying re1 on complex text\n";
'hi [[if _nr exists]]something else[[/if]] there' =~ m{$re1}is;
print "finished\n";
--> end of rebug.pl
When this script is run using perl 5.002 on FreeBSD the interpreter hangs
after printing "trying re1 on complex text\n", when running the script
using perl 5.003 on Linux the interpreter waits a few seconds after
printing the same line and then quits with a segmentation violation.
The only difference between $re1 and $re2 is the nested stars in $re1. The
'bug' only comes up when a substring matches the regexp up to the negative
lookahead and then does not match that.
I've been able to work around the bug for the script I was writing, but I
hope somebody can explain to me why the interpreter hangs, I'm just
curious.
Vincent.
------------------------------
Date: 7 Apr 1997 20:10:12 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5ibkb4$5et$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
papresco@csclub.uwaterloo.ca (Paul Prescod) writes:
:Sun is pushing Java more than ever. The reason for their interest in TCL
:seems to be this dichtomy between systems programming languages and scripting
:languages.
What dichotomy? Repeating something doesn't make it true. Perhaps you
missed this brief article I posted last week in response to an article
in comp.lang.python by jim@ks.uiuc.edu (Jim Phillips).
...
Jim Phillips wrote:
:This was an interesting paper, and I agreed with a lot of the comments on the
:advantages of scripting languages. I do, however, feel that the bashing of
:object-oriented programming was unjustified for two reasons:
:
:1) False separation of "scripting" or "typeless" languages from
:object-oriented languages. Objective-C and Python both use a single type for
:objects and do run-time member lookup allowing any object which can handle
:the necessary calls to be used with any package.
(As does Perl, Tom notes tactlessly.)
To me, the whole notion that there exist two kinds of languages:
TYPE A TYPE B
scripting system
interpreted compiled
typeless strongly-typed
glue components
string-based object-oriented
rapid-development product-oriented deliverables
is a facile oversimplification loaded with false dualism. Reality would
seem to be that items in those columns float freely back and forth
depending on many factors, and pretending that they are two sides of a coin
ignores many shades of grey as well as unrelated orthogonal axes.
Cannot compiled languages glue things together? Cannot interpeted
languages be used for systems programming (think of BASIC-PLUS and RSTS/E
for a non-Unix example)? Is there some reason why interpreters should
not have objects, or compilers dynamic/fluid types? I can compile awk
or Perl into C, and thence to assembler and machine language. Or I can
run C or Pascal in an interpreted environment. Does that all of a sudden
change what they are?
I don't think so.
Many of the other points are valid, but it just seems too much a case
of black and white.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
X-Windows: Even your dog won't like it.
--Jamie Zawinski
------------------------------
Date: 7 Apr 1997 20:22:17 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5ibl1p$5et$2@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
fellowsd@cs.man.ac.uk (Donal K. Fellows) writes:
: toplevel .t
: button .t.b -text Hi! -font {Times 16} -command {puts "Pressed at (%x,%y)"}
: pack .t.b -fill both -expand 1
:
:The button now appears in a separate window to the main application
:window, and reports where it was pressed. When this window is
:resized, the button will occupy any extra space allocated. How much
:extra Lisp would be needed to achieve this?
:
:Unless you can do this in very few lines, the point about Tcl being
:better for some things would seem to be made amply to me.
Strange how often people seem to confuse Tk with Tcl. You aren't
talking about Tcl here.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
"Your reality is lies and balderdash, and I'm glad to say that I have no
grasp of it." --Baron Munchausen
------------------------------
Date: Mon, 07 Apr 1997 15:12:22 -0500
From: Sean Austin <spaustin@ualr.edu>
Subject: Perl 5 for Win95 Installation Question
Message-Id: <33495526.48D8@ualr.edu>
After completing the install of ActiveWare's perl 5 for Win95 and poking
around a little, I attempted to execute a sample script that came with.
Much to my dismay, the system came back with "Bad command or file name."
*cringe* Ok. So, how do you tell Windows 95 what a perl script is and
what to do with one? Also, I have seen one post requesting information
on locating a VMS version of perl and one post asking a question about
an already installed version of perl for VMS. So, where can I find perl
for VMS?
Thanks,
Sean Austin
Systems Analyst
University of Arkansas at Little Rock
------------------------------
Date: Mon, 07 Apr 1997 15:37:11 -0500
From: Sean Austin <spaustin@ualr.edu>
Subject: Re: Perl 5 for Win95 Installation Question
Message-Id: <33495AF7.6FE0@ualr.edu>
Sean Austin wrote before thinking:
>
> After completing the install of ActiveWare's perl 5 for Win95 and poking
> around a little, I attempted to execute a sample script that came with.
> Much to my dismay, the system came back with "Bad command or file name."
> *cringe* Ok. So, how do you tell Windows 95 what a perl script is and
> what to do with one?
Ok, everyone glare at the newbie who forgot to reboot his machine after
installing something new. *cringe*
My apologies,
Sean Austin
Systems Analyst
University of Arkansas at Little Rock
------------------------------
Date: 7 Apr 1997 19:13:31 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: perl Alpha compiler on OS/2?
Message-Id: <5ibh0r$1q2$2@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Dan Ascheman
<asched1@medtronic.COM>],
who wrote in article <5ibdvt$8f9$1@gazette.corp.medtronic.com>:
> Hi all,
> I was wondering is anyone has used the Alpha compiler in Conjunction with
> perl 5.3 on Os/2 ? It works on Unix fine, and I am about 1 step away from
> converting a perl script to a C program, and executable. My problem is
> that gmake does NOT successfully compile my makefile, thus I do not get my
> loadable objects, which i need to convert a perl script to a c program.
> Any help at all is appreciated,
> thanks,
> Dan
I needed a couple of small patches to the compiler (since it was
written for older version of Perl than 5.003_17 I tried it with), but
had no problem with makefiles.
I wonder why people are so excited on the compiler? Currently it
provides (almost?) no advantages over just running your application.
Ilya
------------------------------
Date: 7 Apr 1997 20:39:07 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: perl Alpha compiler on OS/2?
Message-Id: <5ibm1b$s3v@fridge-nf0.shore.net>
Ilya Zakharevich (ilya@math.ohio-state.edu) wrote:
: I wonder why people are so excited on the compiler? Currently it
: provides (almost?) no advantages over just running your application.
I think "executable" might be the magic word for some.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: Mon, 07 Apr 1997 21:29:04 +0100
From: Jong <jong@mrc-lmb.cam.ac.uk>
Subject: Re: Perl and NT
Message-Id: <33495910.446B@mrc-lmb.cam.ac.uk>
Geoffrey Myers wrote:
>
> Matthew Knight wrote:
> >
> > I use Perl on a UNiX box at the moment, but I've been asked to develop a
> > site which will sit on an NT server.
> >
> > What is the easiest way of getting Perl for an NT machine, is a case of
> > getting an NT Perl port, sticking it on the server, and then
> > referenceing it in the the usual way...
> >
> > i'd be grateful if anyone who knows how to do it, could you email me at
>
> God I hate NT, it sucks. That ought to get them going. I'm currently
> being forced to support a web site on an NT box and I'm using perl for
> all my cgi stuff. Check out the docs at www.perl.com/perl/ you'll find
> pointers to NT ports of perl. It works, although you'll find some
> differences.
>
Soon, Win32 Perl/Tk alpha version will be announced for NT.
Jong
> > matt@geenite.demon.co.uk
> >
> > thanks alot
> >
> > Matt Knight
>
> --
> Until later:
> Geoffrey Myers geof@abraxis.com http://www.abraxis.com/geof
>
> Opinions expressed by me are mine, all mine, only mine.....
--
I support Perl, Linux ...
With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?
) Linux Newsletter
http://www.smli.com/people/john.ousterhout/scripting.html
------------------------------
Date: 7 Apr 1997 19:10:21 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Problems with OO Perl5 features
Message-Id: <5ibgqt$1q2$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Tom Christiansen
<tchrist@mox.perl.com>],
who wrote in article <5ibdk0$dk$1@csnews.cs.colorado.edu>:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc,
> Luca Passani <lpa@sysdeco.no> writes:
> :### perl -d convertdia.pl diag0
> :Stack dump during die enabled outside of evals.
> :
> :Loading DB routines from perl5db.pl patch level 0.94
> :Emacs support available.
> :
> :Enter h or `h h' for help.
> :
> :Undefined subroutine &Carp::longmess called at
> :/usr/local/lib/perl5/perl5db.pl l
> :ine 1361.
> :###
>
> That happens when you have a syntax error in your original program.
> If you can't compile, you can't debug.
However, "Undefined subroutine &Carp::longmess called at" is a
possible bug in older version of debugger.
Ilya
------------------------------
Date: Mon, 07 Apr 1997 12:17:46 -0700
From: Frank Caccavale <frank.caccavale@mci.com>
Subject: Q-> Win32 / Registry Module
Message-Id: <3349485A.3AA3@mci.com>
Have problems developing a script to create and update the registry on
NT box. Have been working with the following:
$HKEY_LOCAL_MACHINE->Create($NewObj,"InteSystems\1.0\Options\CallOptions")
|| die $!;
$NewObj->SetValue("sDigitType", REG_SZ, "DTMF" );
Here is one error that I continue to recieve:
Modification of a read-only value attempted at
C:\Perl\lib/Win32/Registry.pm line 207.
Any help would be appreciated. If you know of a site that might be of
interest to me concerning this subject, pls let me know!
Respond via email, SVP:
frank.caccavale@mci.com
------------------------------
Date: 7 Apr 1997 20:21:38 GMT
From: thall@lexis-nexis.com (Timothy Hall)
Subject: re:Help Doing a chomp type function
Message-Id: <5ibl0i$fa8@mailgate.lexis-nexis.com>
Cc: sent to poster. It was the right thing to do.
In article <3343EEC2.7794@lexis-nexis.com> you wrote:
: I want to find where each users home account is.. I am doing
: a:
: #!/serve/bin/perl -w
: open(USERS, "user_list") || die "could not open file ($!)";
: while(<USERS>) {
: $person="$_";
: $local = `ypcat passwd | grep $person`;
: print $local;
: }
: I want to remove the exta info that the ypcat gives me. I tried doing
: a $local =~ s/^$person//g; to start widdling away at the output of
: $person
: but it doesn't work.
: Any suggestions?
Maybe use a regex, like:
: #!/serve/bin/perl -w
: open(USERS, "user_list") || die "could not open file ($!)";
: while(<USERS>) {
: $person="$_";
$_= `ypcat passwd | grep $person 2>&1`;#feeds the string back to perl
if(/.*:.*:.*:.*:.*:(.*):.*/i){
$home_dir=("$1");
}
else{ print("$person is not valid.\n");
}
or:
: #!/serve/bin/perl -w
: open(USERS, "user_list") || die "could not open file ($!)";
: while(<USERS>) {
: $person="$_";
$_= `ypcat passwd 2>&1`;#feeds the string back to perl
if(/$person:.*:.*:.*:.*:(.*):.*/i){
$home_dir=("$1");
}
else{ print("$person is not valid.\n");
}
Untried, but I think either will work. Community Comments/Complaints?
--
~^-~^~~^-_~^~~^~_-~^~-_-~^_--~~|~~ un-"SPAM" to DROP TIM A LINE
~ hallta@erinet.SPAM.com ~ ? ~ All opinions are mine
~ ~ ~ ~ }<`3$j~ Not my employer's.
~ ~ ~ }<`p; ' ~ Please excuse any facts
()perl ' <@)c-shell \|/ I may have carelessly
VVV#####VVV#########/ \#########VV inserted into my opinion.
------------------------------
Date: 7 Apr 1997 20:09:28 GMT
From: mwebernet@aol.com (Mwebernet)
Subject: Seeking cgi-bin host...for free...make $ off a search engine!
Message-Id: <19970407200901.QAA05792@ladder01.news.aol.com>
I am looking for someone to host the PERL5 search engine that I have
created. It is very efficient and the database cannot be "Spammed." In
order to hist this, you must have a cgi-bin. Any college student,
corporation, or small business interested in hosting this search engine
for free....please conatct me ASAP.
Thanks.
M. Weber
http://weber.home.ml.org
-------------------------------
President and CEO
Weber Internet Design Service (WIDS)
http://weber.home.ml.org
-----------------------------
------------------------------
Date: 7 Apr 1997 19:55:21 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: sort array?
Message-Id: <5ibjf9$csu@pirate.shu.edu>
Hello -
soccer@microserve.net (Geoffrey Hebert) writes:
>I want to sort lines. So simple (ha), I thought I would
>code is as below. The nature of my real data is like that
>below.
>help appreciated.
>Yeh, this is my first sort. Read and re-read for a couple of hours
>I haven't given up. But, I know this is an easy question for someone
>that knows the answer. Thanks.
>#!/opt/bin/perl -w
>@line_is = (
> ["10", "line data"],
> ["1", "line data"],
> ["31", "line data"],
> ["3", "line data"],
> ["6", "line data"],
> ["2", "line data"],
> ["22", "line data"],
> ["202", "line data"],
> ["41", "line data"],
> ["4", "line data"],
> ["5", "line data"],
>); # problem one how to print line
>foreach $line(@line_is) {
> print "$line\n"; # This of course prints ARRAY(0..etc
>}
>@sorted= sort {$line_is[$a][1] <=> $line_is[$b][1]} @line_is;
> # sort gives OUT OF MEMORY
>foreach $line(@sorted) {
> print "$line\n";
>}
>exit;
Remember that the elements of @line_is are references to lists.
Thus, each ($a, $b) pair passed to your subroutine is a pair of
references to lists.
These references *already* come from @line_is - you do not need
to, and indeed must not, use them as indexes into @line_is.
What you need to do is dereference them, and compare on the value
of a given index into the resulting lists:
@sorted = sort {$$a[0] <=> $$b[0]} @line_is;
(I'm assuming you want to sort on the numbers.)
David Black
dblack@icarus.shu.edu
------------------------------
Date: 7 Apr 1997 20:28:07 GMT
From: thall@lexis-nexis.com (Timothy Hall)
Subject: Re: Wrapping text in Perl
Message-Id: <5iblcn$fa8@mailgate.lexis-nexis.com>
Is this snippet-ty enough for you?
#!/usr/local/bin/perl
use Text::Wrap;
$Text::Wrap::columns = 40;
$pre1 = "";#add to front of 1st line
$pre2 = "";#add to front of rest of lines
$TEXT_LINE =<STDIN>;
print wrap($pre1, $pre2, $TEXT_LINE);
--
~^-~^~~^-_~^~~^~_-~^~-_-~^_--~~|~~ un-"SPAM" to DROP TIM A LINE
~ hallta@erinet.SPAM.com ~ ? ~ All opinions are mine
~ ~ ~ ~ }<`3$j~ Not my employer's.
~ ~ ~ }<`p; ' ~ Please excuse any facts
()perl ' <@)c-shell \|/ I may have carelessly
VVV#####VVV#########/ \#########VV inserted into my opinion.
------------------------------
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 249
*************************************