[6971] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 596 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 10 14:17:09 1997

Date: Tue, 10 Jun 97 11:00:57 -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, 10 Jun 1997     Volume: 8 Number: 596

Today's topics:
     blank lines (Tri Duy Tram)
     Re: Can I user oraperl with perl 5? (Jeff Horwitz)
     Re: Can I user oraperl with perl 5? ( Thomas Lachlan XMS x4206 )
     Checking a mount point (Angel Leyva)
     Re: Checking a mount point <rootbeer@teleport.com>
     Re: Compiling Perl code possible? <rootbeer@teleport.com>
     Re: Displaying a Web Site Tree? <jcmurphy@smurfland.cit.buffalo.EDU>
     Re: Help me please <rootbeer@teleport.com>
     Help on executing DOS commands through perl <webmaster@auditorgen.state.pa.us>
     Re: Help on executing DOS commands through perl (Scott McMahan)
     Re: Help on executing DOS commands through perl <coke@adrenalin.com>
     help: pull down menus <DLemay@jonction.net>
     Re: help: pull down menus (Andreas Schmidt)
     Re: help: pull down menus (Steve O'Hara Smith)
     Re: how to make a script executable on DOS <webmaster@auditorgen.state.pa.us>
     Re: inconsistent opendir behaviour in Perl for win32 <rootbeer@teleport.com>
     LOCAL: Cleveland Linux User's Group (Steve Wainstead)
     Re: LOCAL: Cleveland Linux User's Group (A. Deckers)
     negation in regex <staci@datahost.com>
     Re: OO perl slow? <rootbeer@teleport.com>
     Re: Parsing Comma Delemited Text DataBase (Clay Irving)
     Re: Parsing Comma Delemited Text DataBase (Nem W Schlecht)
     Re: passwd command and perl data? (Nem W Schlecht)
     Re: Perl front end to LDAP <dean@tbone.biol.sc.edu>
     Re: Perl interpreter for Windows 3.1 or MS-DOS 6.xx? <dean@tbone.biol.sc.edu>
     Perl script as login shell? (Ben Neil Gerdemann)
     Re: PERL sorting algorithm (Abigail)
     Perl training in Silicon Valley <kriszti@goodpoint.com>
     Re: PERL Training in UK ( Thomas Lachlan XMS x4206 )
     perlxs question (James J. Heck)
     Re: perlxs question (Nathan V. Patwardhan)
     Re: Regexpert's assistance required. (Chris Cole)
     Re: Running CGI in the background <rootbeer@teleport.com>
     Re: Sockets in Perl <psrc@corp.airmedia.com>
     Re: UPDATE MULTIPLE FRAMES w/cgi? <rootbeer@teleport.com>
     Re: UUencoding between UNIX and PC - newlines (Nem W Schlecht)
     Re: What does "UNIX" stand for.. <av@inorbit.com>
     Re: where is mistake? (Abigail)
     Re: why won't 'print <<end_print...end_print' work? <chilton@scci-ad.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Tue, 10 Jun 1997 17:11:53 GMT
From: trit@olympic.seas.ucla.edu (Tri Duy Tram)
Subject: blank lines
Message-Id: <EBKL3t.6yA@seas.ucla.edu>

	I was wondering how can I do a regular expression that will only
catch blank lines?  I have text like:

blah blah blah . . . .
blah blah . . . .

more blahs blah . . .

I tried $var !~ /a-z/ || $var !~ /A-Z/ || $var /0-9/
but that doesn't seem to work.  Any help will be appreciated.



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

Date: 10 Jun 1997 15:54:37 GMT
From: jhorwitz@umich.edu (Jeff Horwitz)
Subject: Re: Can I user oraperl with perl 5?
Message-Id: <5njtbt$g20$1@newbabylon.rs.itd.umich.edu>

you need to get the latest DBI & DBD-Oracle modules.  DBD-Oracle comes with
an Oraperl compatibility library, which works great.

Robert Augustyn (augustyn@unn.unisys.com) wrote:
: Hi,
: I wonder if anyboady did it.
: All references I found say that oraperl runs under perl 4
: Is that true?
: Thanks in advance
: robert



--
------------------------------------------------------------------------
| Jeff Horwitz                                  University of Michigan |
| jhorwitz@umich.edu                                         Ann Arbor |
| http://www.umich.edu/~jhorwitz                     ITD Login Service |
------------------------------------------------------------------------


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

Date: 10 Jun 1997 15:46:57 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: Can I user oraperl with perl 5?
Message-Id: <5njsth$ju3@newstoo.ericsson.se>

Robert Augustyn (augustyn@unn.unisys.com) wrote:
: Hi,
: I wonder if anyboady did it.
: All references I found say that oraperl runs under perl 4
: Is that true?
: Thanks in advance
: robert

Yes. It does work exceptionally well with perl 5.

					Regards Tam



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

Date: Tue, 10 Jun 1997 08:45:47 -0400
From: angel_leyva@prenhall.com (Angel Leyva)
Subject: Checking a mount point
Message-Id: <339569e9.177326271@news.prenhall.com>

How would I test if a directory on an RS6000 running 4.0 AIX has any
filesystems mounted on it.

I have an filesystem that is mounted into different locations. When I
want people to view the information, the filesystem is mounted for READ
only access. During the time that I want to add more information to the
filesystem, I unmount it from location 1, and remount it onto location
2, only this time, it has READ/WRITE access. I make my changes, then I
remount it for READ only.

Prior to having the perl program begin writing to the filesystem, I want
to make sure that it is correctly mounted.

How can I test for this?

Angel
---
Angel Leyva
(http://www.leyvagroup.com/airborne)
(aleyva@leyvagroup.com             )
(airborne@leyvagroup.com           )


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

Date: Tue, 10 Jun 1997 10:26:53 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Angel Leyva <angel_leyva@prenhall.com>
Subject: Re: Checking a mount point
Message-Id: <Pine.GSO.3.96.970610102333.20918K-100000@kelly.teleport.com>

On Tue, 10 Jun 1997, Angel Leyva wrote:

> How would I test if a directory on an RS6000 running 4.0 AIX has any
> filesystems mounted on it.

You probably want to run /bin/mount (or equivalent) and parse its output. 
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, 10 Jun 1997 09:02:22 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Ben Neil Gerdemann <gerdemb@rice.edu>
Subject: Re: Compiling Perl code possible?
Message-Id: <Pine.GSO.3.96.970610090002.20918D-100000@kelly.teleport.com>

On 9 Jun 1997, Ben Neil Gerdemann wrote:

> Is it possible to compile Perl code into some type of binary executable? 

Do you think the FAQ might mention something about this?  :-)

    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq3/
          How_can_I_compile_my_Perl_progra.html

-- 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: 10 Jun 1997 11:36:08 -0400
From: Jeff Murphy <jcmurphy@smurfland.cit.buffalo.EDU>
Subject: Re: Displaying a Web Site Tree?
Message-Id: <wwalo4ilbbr.fsf@smurfland.cit.buffalo.edu>

shortt@acsu.buffalo.edu (Kevin M Shortt) writes:
> Rick Barkhouse (rbarkhou@rc.gc.ca) wrote:
> : Does anyone know of a program or script (preferably in Perl) that I can 
> : use on our Unix web server to give a tree-like display of the web site?  
> : It would take an index file and recursively branch off with each local html 
> : file it finds referenced.
> :
> 
> try Expander.cgi....try demo at: 
> 
> http://sware.cit.buffalo.edu/Expander/Expander.cgi 
> 
> 
> download it at:
> 
> http://sware.cit.buffalo.edu/Expander/index.html


a glitch due to the demo being located on a virtual web server was causing
it to fail. the demo should function correctly now.

-- 
jcmurphy@acsu.buffalo.edu           sunyab cit oss           network management
standard disclaimers apply          http://smurfland.cit.buffalo.edu/~jcmurphy/
        ``Men forget but don't forgive. Women forgive but never forget.''


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

Date: Tue, 10 Jun 1997 10:08:57 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Inga Webmistress of Europe Blue <europeblue@europeblue.com>
Subject: Re: Help me please
Message-Id: <Pine.GSO.3.96.970610100810.20918G-100000@kelly.teleport.com>

On 10 Jun 1997, Inga Webmistress of Europe Blue wrote:

> Subject: Help me please

You would be helped by reading the frequent posting on choosing good
subject lines. Enjoy!

-- 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: 10 Jun 1997 15:07:01 GMT
From: Nathan Raupach <webmaster@auditorgen.state.pa.us>
Subject: Help on executing DOS commands through perl
Message-Id: <339D6CBD.3A36@auditorgen.state.pa.us>

I am having trouble capturing the output of DOS commands through perl. 
When I try to assign the output of a DOS command to a variable using
'backticks', the command executes in the DOS window and returns nothing
to the variable.  For example, if I have the following line in a script:
	@output = `dir`;
the "dir" command executes in the DOS window, but returns nothing to the
variable "output".

Any advice?


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

Date: 10 Jun 1997 16:46:37 GMT
From: scott@lighthouse.softbase.com (Scott McMahan)
Subject: Re: Help on executing DOS commands through perl
Message-Id: <5nk0dd$6ni$1@mainsrv.main.nc.us>

Nathan Raupach (webmaster@auditorgen.state.pa.us) wrote:
: I am having trouble capturing the output of DOS commands through perl. 
: When I try to assign the output of a DOS command to a variable using
: 'backticks', the command executes in the DOS window and returns nothing
: to the variable.  For example, if I have the following line in a script:
: 	@output = `dir`;
: the "dir" command executes in the DOS window, but returns nothing to the
: variable "output".

: Any advice?

Commands which are part of command.com itself and not standalone
programs will probably not run with backticks unless you
say something like `command /c dir`.

On any system like NT or 95, "standard" input and output is so
hopelessly screwed up that it is a much, much better idea to
use system calls than try to use shell commands.

Scott



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

Date: 10 Jun 1997 17:50:14 GMT
From: "Chris" <coke@adrenalin.com>
Subject: Re: Help on executing DOS commands through perl
Message-Id: <01bc75c6$e9b292e0$371c9bcf@pc10.adrenalin.com>

Try:

    open(DIR,"dir") || die "Couldn't run dir";
    local(@output)=<DIR>;              # get dir output
    close(DIR);

Hope this helps.

Chris

Nathan Raupach <webmaster@auditorgen.state.pa.us> wrote in article
<339D6CBD.3A36@auditorgen.state.pa.us>...
> I am having trouble capturing the output of DOS commands through perl. 
> When I try to assign the output of a DOS command to a variable using
> 'backticks', the command executes in the DOS window and returns nothing
> to the variable.  For example, if I have the following line in a script:
> 	@output = `dir`;
> the "dir" command executes in the DOS window, but returns nothing to the
> variable "output".
> 
> Any advice?
> 


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

Date: Sun, 08 Jun 1997 14:51:26 -0400
From: Daniel Lemay <DLemay@jonction.net>
Subject: help: pull down menus
Message-Id: <339AFF2B.51CD@jonction.net>

Need a script that will spew out URLs from a pull down menu

eg <option value="./arelativeurl.html">A page
   <option value="http://anabsoluteurl.html">Another page


BTW , are there any decent online perl tutorials that actually
explain the syntax, in terms a non-programmer can understand?
I d like to learn how to write my own instead of having to hack and
patch together from other scripts. (which 99% of the time doesn t
work too well)

Thank you


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

Date: 10 Jun 1997 15:26:33 GMT
From: schmidt@miserv2iai.kfk.de (Andreas Schmidt)
Subject: Re: help: pull down menus
Message-Id: <5njrn9$6uc$1@nz12.rz.uni-karlsruhe.de>

In article <339AFF2B.51CD@jonction.net>, Daniel Lemay <DLemay@jonction.net> writes:
|> Need a script that will spew out URLs from a pull down menu
|> 
|> eg <option value="./arelativeurl.html">A page
|>    <option value="http://anabsoluteurl.html">Another page
|> 
|> 

hi daniel,

so far as i know it is not possible to insert other tags within an <select>
element. 



sorry
smiff


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

Date: 10 Jun 1997 15:51:56 GMT
From: sohara@mardil.elsevier.nl (Steve O'Hara Smith)
Subject: Re: help: pull down menus
Message-Id: <5njt6s$bf3$2@ns.elsevier.nl>

Andreas Schmidt (schmidt@miserv2iai.kfk.de) wrote:
: In article <339AFF2B.51CD@jonction.net>, Daniel Lemay <DLemay@jonction.net> writes:
: |> Need a script that will spew out URLs from a pull down menu
: |> ...

: so far as i know it is not possible to insert other tags within an <select>
: element. 

	Quite right, the best you can do is to use a JavaScript OnChange
handler to set the window.location.href property depending on which entry
is selected.


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

Date: 10 Jun 1997 14:33:51 GMT
From: Nathan Raupach <webmaster@auditorgen.state.pa.us>
Subject: Re: how to make a script executable on DOS
Message-Id: <339D64F6.10AD@auditorgen.state.pa.us>

If you didn't already, download Perl for Win32 from
http://www.ActiveWare.com.  It only works for WinNT and Win95, but it
does execute through the DOS shell.


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

Date: Tue, 10 Jun 1997 08:53:06 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Wm <wm_n00@tarrcity.demon.co.uk>
Subject: Re: inconsistent opendir behaviour in Perl for win32
Message-Id: <Pine.GSO.3.96.970610084915.20918B-100000@kelly.teleport.com>

On Mon, 9 Jun 1997, Wm wrote:

> directories that could be tested for existence but not read (eg execute
> only permission on a Unix directory for example; I can see the file and
> that it is a directory but I may not have permission to open it and see
> its contents) appeared to be the sort of thing that might produce
> different behaviour between -d and opendir.

Agreed: -d and opendir don't have produce the same results for every name. 
But if -d says it's a directory, opendir's failure should get a different
error value than "no such file or directory". And if -d says it's _not_ a
directory, then there's no way opendir should be able to open it! 

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: 10 Jun 1997 13:06:08 GMT
From: swain@panic.pdnewmedia.com (Steve Wainstead)
Subject: LOCAL: Cleveland Linux User's Group
Message-Id: <5njjg0$2oj$2@iagnews.iagnet.net>



The Cleveland Linux User's Group will hold its second meeting on Saturday
June 14th and the Cleveland State University Law Library, East 18th and
Euclid, in room 237. Meeting time is 10 a.m.

Greg Boehnlien from New Age Consultants will give a demonstartion of rpm
and Martin Hebrank will talk about the Beowulf project to build a
supercomputer from a set of networked Linux boxes.

All are invited!

For directions and more info see http://ni.nacs.net~clug.

Steve Wainstead



--
Steve Wainstead |||||||||||||||||||||||||| Cleveland Live
http://www.cleveland.com/
|||||||||||||||||||||


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

Date: 10 Jun 1997 13:41:02 GMT
From: deckers@man.ac.uk (A. Deckers)
Subject: Re: LOCAL: Cleveland Linux User's Group
Message-Id: <slrn5pqmbd.o7l.deckers@news.rediris.es>

In <5njjg0$2oj$2@iagnews.iagnet.net>,
	Steve Wainstead <swain@panic.pdnewmedia.com> wrote:
>
>
>The Cleveland Linux User's Group will hold its second meeting on Saturday
>June 14th and the Cleveland State University Law Library, East 18th and
>Euclid, in room 237. Meeting time is 10 a.m.
>
>Greg Boehnlien from New Age Consultants will give a demonstartion of rpm
>and Martin Hebrank will talk about the Beowulf project to build a
>supercomputer from a set of networked Linux boxes.
>
[...]

That's really interesting, especially for the thousands of
comp.lang.perl.misc readers who don't live anywhere near Cleveland.

If you have a announcement about local events, then please use a
friggin local group. And don't post your announcements to
comp.lang.perl.*.if it isn't specifically related to Perl.

*plonk*

[followup set]

Alain



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

Date: Tue, 10 Jun 1997 09:44:38 -0700
From: Michael Stearns <staci@datahost.com>
Subject: negation in regex
Message-Id: <339D8476.7255@datahost.com>

I am trying to build html tables from a text document and I have gotten
to the following point:

+++++++++++++++++++++++++++++
Here is the stuff before

asdflkjasdfjkas
sadfsdfalkjasdflkjasdfkljasdflkja sdaflkjsda lksadfjsdaklfj
<TR><TD>line 1</TD><TD>12></TD></TR><P>

<TR><TD>line2</TD><TD>23></TD></TR><P>

<TR><TD>line 3</TD><TD>3></TD></TR><P>

<TR><TD>line 4</TD><TD>Another entry 123></TD></TR><P>

This is the stuff after
+++++++++++++++++++++++++++++


I'm trying to figure out how to write a regex that will insert the
opening and closing table tags. It seems like I need to match a pattern
that has:

- a line of text, which doesn't include a <T...> tag followed by a line
that includes the pattern "<TR><TD>line2</TD><TD>23></TD></TR><P>".

-for the end of the table I think I need to do the same thing with the
two lines flipped around.

But I don't see how to write a regex that finds a line of text that does
not include <TR> or <TD>. Can anyone tell me how to do this? Or if there
are any recommended alternate methods, please fill me in.

Thanks,
Michael Stearns
University of Oregon


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

Date: Tue, 10 Jun 1997 10:00:51 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Peter Lees <peter@junior.next.com.au>
Subject: Re: OO perl slow?
Message-Id: <Pine.GSO.3.96.970610095703.20918E-100000@kelly.teleport.com>

On 10 Jun 1997, Peter Lees wrote:

> i've been writing a few perl programs using fairly strict OO,
> and am concerned that they run verrrrry slowly.  

Could you tell us what version of Perl you're running? I don't recall any
recent speed enhancements, but the latest is 5.004. (You can find the
version with 'perl -v'.) 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: 10 Jun 1997 10:11:27 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Parsing Comma Delemited Text DataBase
Message-Id: <5njnaf$rta@panix.com>

In <865935438snz@dhcs.demon.co.uk> Dave Hodgkinson <daveh@dhcs.demon.co.uk> writes:

>In article <5nfj6o$1ar@panix.com> clay@panix.com "Clay Irving" writes:

>> 
>> I'd be inclined to use the Text::CSV module:
>> 

>OK, I've searched CPAN for this, which points you to
>Joseph N Hall, who claims on his home page that the
>module is not released yet.

>Any offers on where to find it?

ftp://ftp.mcs.net/mcsnet.users/apc/Text-CSV-0.01.tar.gz

-- 
Clay Irving                                        See the happy moron,
clay@panix.com                                     He doesn't give a damn,
http://www.panix.com/~clay                         I wish I were a moron,
                                                   My God! Perhaps I am!


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

Date: 10 Jun 1997 10:15:47 -0500
From: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: Parsing Comma Delemited Text DataBase
Message-Id: <5njr33$lpb@abattoir.cc.ndsu.nodak.edu>

[courtesy copy e-mailed to author(s)]

In comp.lang.perl.misc, Nasser Al-Zawawi  <nzawawi@worldnet.att.net> wrote:
>I trying to figure out how to parse a Text DataBase that is Comma
>delimeted and has "" Double quotes for its strings fields.  My problem
>is withen these string fields you could have a comma that should not be
>parsed.
>Meaning
>1,"Hello, World",6,"hi"
>Should be parsed into 4 fields
>1. 1
>2. "Hello, World"
>3. 6
>4. "hi"

Hmm.. since I don't see any real responces to your post... I wouldn't use a
regex for this, since perl actually already knows exactly how to parse the
above, let's just let perl do it with an eval():

#!/local/bin/perl
# Author: Nem W Schlecht

while (<>) {			# read in the text db
    chomp;			# no newlines, please
    $_ = "\@input=($_)";	# add perl code to line
    eval($_);			# presto!
    for (0..$#input) {		# print it out
        print "$input[$_]\n";
    }
}

__END__

If you don't what @input clobbered after each iteration, you'll have to
copy it off or something.

-- 
Nem W Schlecht                  nem@plains.nodak.edu
NDUS UNIX SysAdmin         http://www.nodak.edu/~nem
"Perl did the magic.  I just waved the wand."


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

Date: 10 Jun 1997 10:35:41 -0500
From: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: passwd command and perl data?
Message-Id: <5njs8d$m2l@abattoir.cc.ndsu.nodak.edu>

[courtesy copy e-mailed to original author(s)]

In comp.lang.perl.misc, Jarkko Hietaniemi  <jhi@alpha.hut.fi> wrote:
>
>Bryan Hart <bryan@eai.com> writes:
>: Eric Harley wrote:
>: > How would I pipe data into the passwd(1) command on a BSD box?
>: > Do i just open it like a file handle?
>: > open PAS, "| passwd $user";
>: > print PAS "$oldpass";
>: > print PAS "$newpass";
>: > print PAS "$secondpass";
>: > Thanks!
>: > -Eric Harley
>: > erich@powerwareintl.com
>: Close, try:
>: open PAS, "| passwd $user";
>: print PAS "$oldpass\n";
>: print PAS "$newpass\n";
>: print PAS "$secondpass\n";
>: close PAS;
>
>This cannot be done with Perl but you could try the Expect package by
>Don Libes, please see <URL:http://expect.nist.gov/>.  Expect requires
>Tcl because it is a Tcl extension.

Hmm.. not true.. perl has a Chat module (of some sort) that has similar
functionality of expect.  However, I do suggest using expect over perl's
Chat stuff, which I haven't had much luck with.

-- 
Nem W Schlecht                  nem@plains.nodak.edu
NDUS UNIX SysAdmin         http://www.nodak.edu/~nem
"Perl did the magic.  I just waved the wand."


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

Date: 10 Jun 1997 12:34:44 -0400
From: Dean Pentcheff <dean@tbone.biol.sc.edu>
Subject: Re: Perl front end to LDAP
Message-Id: <m1d8pu4dsr.fsf@nauplius.psc.sc.edu>

Michael Edelman <mje@FILLERpass.wayne.edu> writes:
> Is anyone using PERL to call LDAP routines? I'm a newbie to both Perl
> and LDAP, and I'm having a hard time calling the ldapmodify routine from
> Perl using system.

I haven't used it, so I can't speak to its utility, but you'll want to
check out the Net::LDAP module.  

As with all modules, you can find it via the CPAN network of Perl
archives.  To get to that, start at <URL:http://www.perl.com/perl> and
quest for CPAN.

Good luck!

-Dean
-- 
N. Dean Pentcheff   <pentcheff@acm.org>   WWW: http://tbone.biol.sc.edu/~dean/
Biological Sciences, Univ. of South Carolina, Columbia SC 29208 (803-777-3936)
PGP ID=768/22A1A015 Keyprint=2D 53 87 53 72 4A F2 83  A0 BF CB C0 D1 0E 76 C0 
Get PGP keys and information with the command: "finger dean@tbone.biol.sc.edu"


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

Date: 10 Jun 1997 13:01:06 -0400
From: Dean Pentcheff <dean@tbone.biol.sc.edu>
Subject: Re: Perl interpreter for Windows 3.1 or MS-DOS 6.xx?
Message-Id: <m1bu5e4ckt.fsf@nauplius.psc.sc.edu>

Goh Yong Kwang  <s6606555@mercury.np.ac.sg> writes:
> I would like to write Perl scripts on my PC which is running on Win3.1 
> and MS-DOS but I can't find a Perl interpreter for Win3.1 or MS-DOS on the
> Internet. Is there any Perl interpreter for WIn3.1 or MSDOS 6.xx? If so, 
> where can I download them?

Appended is a "cheat sheet" I wrote a while back for getting Perl to
run on DOS/Windows systems.  The specifics (filenames, etc.) may have
changed slightly by now, but the general ideas should still apply.

-Dean
-- 
N. Dean Pentcheff   <pentcheff@acm.org>   WWW: http://tbone.biol.sc.edu/~dean/
Biological Sciences, Univ. of South Carolina, Columbia SC 29208 (803-777-3936)
PGP ID=768/22A1A015 Keyprint=2D 53 87 53 72 4A F2 83  A0 BF CB C0 D1 0E 76 C0 
Get PGP keys and information with the command: "finger dean@tbone.biol.sc.edu"

=============================================================================

I recently went through the exercise of hunting for a DOS/Win Perl,
needing to write a Perl program that would run on Unix, DOS 5, and
Windows 95/NT, and be distributable (along with Perl) with a minimum
of fuss.  

I settled on Ilya Zakharevich's OS/2 port of Perl.  Yup.  It will run
on DOS and Windows systems.  It's a very full Perl port that is
aggressively maintained and kept up to date.

You'll need to tinker slightly.  Following is an outline of a recipe
that worked for me.

Grab the port from CPAN.  Start at <URL:http://www.perl.com/perl> and
look for "Software", then "Alien Ports", then "CPAN/ports", and follow
links until you get to OS/2 ports, and then the "ilyaz" directory.
Once there, look for the most recent version in a directory that looks
something like "5.003.05" (of course, that number will change as
versions get updated).  Within that is a set of zip files.  Get these
files:

                perl_aou.zip
                perl_mlb.zip
                perl_pod.zip
                perl_ste.zip
                perl_utl.zip
                plREADME.zip

Make sure you have a decent unzip utility on DOS/Win.  One that works
is Info-Zip's, which you can grab from the "arcers" directory of the
MSDOS section of the Simtel archives at oak.oakland.edu
(<URL:http://oak.oakland.edu/pub/simtelnet/msdos/arcers/unz520x.exe>).
That file will unzip into multiple files, including a good DOS unzip
program.  The reason you need a good one is that you need to unzip
into a tree, and you need to properly truncate long filenames -- that
unzipper seems to do the job properly.

OK, now that you've got the code and an unzipper, do the following to
create a Perl hierarchy (the following manipulation gets done from a
DOS window, if you're under Windows):

        cd \
        mkdir perl
        mkdir perl\bin
        mkdir perl\lib
        mkdir perl\lib\pod

Now unpack the zip files into appropriate directories.  To do that,
change directories to the target directory first, then from there,
unzip the archive files as follows:

        perl
                plREADME.zip
        perl\bin
                perl_aou.zip
                perl_utl.zip
        perl\lib
                perl_mlb.zip
                perl_ste.zip
        perl\lib\pod
                perl_pod.zip

Put the following in your autoexec.bat (carefully noting the slash
directions in the text that follows):

        set path=...your...existing...path...;c:\perl\bin
        set perllib_prefix=f:/perllib c:/perl

(I assume your perl destination is drive "c:", otherwise modify the
"c:"s above appropriately, but don't change the "f:").

===== Note: The following is from Ilya Zakharevich: =====
 As I mentioned it in another post today, unless you install sh.exe
 from sh_dos.zip, and set PERL_SH_DIR according to the docs, you are
 not going to have backticks and pipes working.
=========================================================

Now, based on addresses in Ilya's documentation, go out and grab the
latest versions of the "emxrt" package and the "rsx" package.  Unzip
them under a temporary directory.  Copy the following files to
c:\perl\bin:

        from the emx package:
                emx.exe      [VCPI DOS extender for DOS]
                emxfpemu     [coprocessor emulator for 386sx machines]
                emxbind.exe  [emx executable load-format twiddling program]
                emxl.exe     [emx stub loader module]
        from the rsx package:
                rsx.exe      [DPMI DOS extender for Windows]

Now drop out into DOS if you're running under Windows (not a DOS
shell: if you're in Windows, kill Windows and drop to plain DOS).

Go to the c:\perl\bin directory and use emxbind to extract the a.out
module from perl_.exe, something like:

        emx emxbind.exe -x perl_.exe perl.out

Use emxbind to bind the a.out module with the emxl.exe stub:

        emx emxbind.exe emxl.exe perl.out perl.exe

Assuming that worked, you can now delete the following files:

        emxbind.exe
        emxl.exe
        perl.out
        perl_.exe
        perl5_00.exe

If you're really twitchy about a startup warning message under
Windows, you can use a hex editor or other binary editor to edit the
file "rsx.exe" so that it will not complain about the emx version
you're using.  In the file "rsx.exe", search for the string
"emx_version".  You'll find the emx version number in reverse,
something like: "emx_version=b9.0" (which really refers to emx version
number 0.9b).  Change the version number/letter to fit the emxrt
version you downloaded (in my case, recently, I changed "b9.0" to
"c9.0", which defines me as really twitchy I suppose).  Save the new
rsx.exe (must be in the filename "rsx.exe").  Then the runtime warning
about emx versions will shut up.

Reboot your machine to let the c:\autoexec.bat changes take effect.


What have you achieved by this?  The OS/2 version will run using
either the emx.exe DOS extender (using the VCPI protocol, suitable for
"naked" DOS) or the rsx.exe extender (using the DPMI protocol,
compatible with Windows 3.x, 95 (and NT?)).  The rigamarole with
emxbind pulled out the core executable and rebound it with a stub
loader that will automatically and transparently find and use the
emx.exe extender in plain DOS, and the rsx.exe extender under Windows
(as long as they're in a directory on the PATH).  Setting the
emxlib_prefix variable properly sets Perl's @INC list of where to
search for Perl libraries.

The "utility" programs in \perl\bin are set up as OS/2 "cmd" files.
You'll need to trim off the top few lines that get them to execute
under the OS/2 command interpreter.  There are magical incantations
you can do to turn them into automatically executing DOS batch files
(which I don't know), or you can create a batch file for each of them
(in the same directory) that looks something like the following (for
an example "utility.cmd" file):

@perl -S utility.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9

in the file "\perl\bin\utility.bat".


And that's that!


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

Date: 10 Jun 1997 16:16:01 GMT
From: gerdemb@rice.edu (Ben Neil Gerdemann)
Subject: Perl script as login shell?
Message-Id: <5njuk1$l5f$1@joe.rice.edu>

Hello,

We are writing a perl script that allows users to automatically create a
login account for themselves by telneting to a certain account. We are of
course concerned about this script's security. What is the best way to
make sure that the users cannot exit from the script and gain unauthorized
access? 

The only system we can think of, is turning the Perl script into the
account's login shell. Is this possible using the new Perl compiler? Is
this secure? Has anyone done this before? Do you have any suggestions or
gotchas? 

Thank you very much,
Ben


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

Date: Tue, 10 Jun 1997 16:12:59 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: PERL sorting algorithm
Message-Id: <EBKIDn.25E@nonexistent.com>

Robert Davis (rjdavis@nortel.ca) wrote on 1379 September 1993 in
<URL: news:339D466E.1770@nortel.ca>:
++ Hi,
++   I have a text file containing a list,
++   each entry containing a number followed by a letter
++   (person's initial) followed by their last name (surname), e.g.:
++ 
++   Can people tell me about any sorting algorithms
++   that I could use/modify to do this job?

Uhm, have you looked up the Perl buildin sort () function already?

I would use a Schwarztian Transform:

@sorted = map  {$_ -> [0];}
          sort {$a -> [1] cmp $b -> [1];}
          map  {[$_, (split ' ', $_, 2)[1]];} @notsorted;


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=$]*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: 10 Jun 1997 15:34:16 GMT
From: "kriszti" <kriszti@goodpoint.com>
Subject: Perl training in Silicon Valley
Message-Id: <01bc75b3$836a2a60$99fe56ce@mendo>


Hi, I'm looking for a short intro to Perl class in Silicon Valley, San
Francisco
Bay Area. You'ld think they'ld be easy to find, but they're not. 

You can reply to me via e-mail.

Thanks,

Kriszti
kriszti@goodpoint.com


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

Date: 10 Jun 1997 15:35:31 GMT
From: etltsln@etlxd30.ericsson.se ( Thomas Lachlan XMS x4206 )
Subject: Re: PERL Training in UK
Message-Id: <5njs83$ju3@newstoo.ericsson.se>

David Hayden (dhayden@netcomuk.co.uk) wrote:
: I am looking for a Perl Programming Course in the UK (not CBT) to be run in
: next 4-8 weeks. Any ideas???

'Learning Tree' do Perl courses.

			Regards Tam



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

Date: 10 Jun 1997 13:38:18 GMT
From: jheck@coral.bucknell.edu (James J. Heck)
Subject: perlxs question
Message-Id: <5njlca$ka01@homer.bucknell.edu>

I have a fairly large library of C calls that I would like to put a Perl interface on.  However, teh Perlxs man
pages and such dont give you directions for taking an existing library and turning it into a XS library.

	I understand how to convert my main function to the proper syntax, but not sure what to do with teh
other '.h' files and functions that the main function uses.  

	Any help or guidance would be great.  

	James
--
--------------------
James J. Heck
jheck@acm.org
http://www.bucknell.edu/~jheck


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

Date: 10 Jun 1997 15:37:36 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: perlxs question
Message-Id: <5njsc0$9n3@fridge-nf0.shore.net>

James J. Heck (jheck@coral.bucknell.edu) wrote:
: I have a fairly large library of C calls that I would like to put a Perl interface on.  However, teh Perlxs man

Read perlxstut, which should be very helpful.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 10 Jun 1997 17:37:02 GMT
From: dmi@deltanet.com (Chris Cole)
Subject: Re: Regexpert's assistance required.
Message-Id: <5nk3bu$g1b$1@news01.deltanet.com>

In article <339BD90D.41C6@metrica.co.uk>, 
Simon Fairey <sfairey@metrica.co.uk> writes:
>I am trying to extract fields from a line and am wondering if it is
>poosible to do in one go or am I going to have to do some fiddling
>about. An example of a line might be:
>
>	item1, function1([0,11], function2() ), item2
>
>What I want is to just extract the three entries
>	item1
>	function1([0,11], function2() )
>	item2
>
Maybe some fiddling:

        $_ = 'item1, function1([0,11], function2() ), item2';

        ($re = $_) =~ s/(\()|(\))|./$1.$2/gs; 
        $re = join '|',map {quotemeta($_)} /$re/s; 
        @_ = /((?:$re|[^,])*),?\s*/g; 

        print join "\n",@_; 



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

Date: Tue, 10 Jun 1997 08:59:30 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Scott Blanksteen <sibsib@hotmail.com>
Subject: Re: Running CGI in the background
Message-Id: <Pine.GSO.3.96.970610085505.20918C-100000@kelly.teleport.com>

On Mon, 9 Jun 1997, Scott Blanksteen wrote:

> Or, more constructively, use the 'sleep' function
> to write a '.' to the browser every few seconds.

That advice won't help anybody!

A CGI script's output is buffered by the server; you'd need to make it NPH
to get any benefit from this. But how would sleep() make anybody happier? 

Most importantly, what's this doing in a Perl newsgroup? It's a CGI
topic, no doubt about it.

-- 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, 10 Jun 1997 12:34:12 -0400
From: Paul S R Chisholm <psrc@corp.airmedia.com>
To: Ken Ficara <ficara@panix.com>
Subject: Re: Sockets in Perl
Message-Id: <339D8204.E69@corp.airmedia.com>

Ken Ficara wrote:
> I have written a server and client in perl (5.003 on Solaris 2.4) basically
> using the skeleton server/client pair in the Sockets section of the Camel
> book (p 348 of the second, ie blue, edition).

First, check out the Camel-2 errata:

	http://www.perl.com/perl/critiques/camelrata/

and pick up the changes to the sample server.

Second, realize that you need to wait about five minutes after killing a
server before you can restart a server on the same socket. (It's a
TCP/IP thing.)

> If the server is NOT running, my client starts up fine. All the various
> socket calls including socket() itself act like they're working fine --
> even though there's no server to connect to.

You're 100% sure that the return codes for socket() and connect()
indicate success? Especially the latter?

> Then, when the client tries to print to the socket filehandle, it quits
> immediately.

It dies from a SIGPIPE signal. You can catch this, but all that will
tell you is that you wrote to the socket too soon. You can select() (the
four argument version) to find when you can safely write to the socket.
--
Paul S. R. Chisholm, AirMedia, Inc.        (formerly Ex Machina)
mailto:psrc@corp.airmedia.com http://www.corp.airmedia.com/~psrc
  I'm not speaking for the company, I'm just speaking my mind


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

Date: Tue, 10 Jun 1997 10:12:21 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Brandon <thesimpleman@atlantafest.com>
Subject: Re: UPDATE MULTIPLE FRAMES w/cgi?
Message-Id: <Pine.GSO.3.96.970610100939.20918H-100000@kelly.teleport.com>

On Tue, 10 Jun 1997, Brandon wrote:

> Subject: UPDATE MULTIPLE FRAMES w/cgi?

There's no need to shout!

> gnat@frii.com wrote:

[ gnat's helpful information mostly snipped ]

> > 2. comp.lang.perl.misc is for questions on the Perl language.  Try
> > comp.infosystems.www.authoring.cgi for questions on the CGI part of
> > CGI scripts.  

> I can't find an answer to this at any of those places
> 
> can you use a cgi script to update multiple frames?

So, why are you still asking your CGI questions in the wrong place? He
told you where to look for the answer. It's probably in their FAQ.

-- 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: 10 Jun 1997 10:25:50 -0500
From: nem@abattoir.cc.ndsu.nodak.edu (Nem W Schlecht)
Subject: Re: UUencoding between UNIX and PC - newlines
Message-Id: <5njrlu$luh@abattoir.cc.ndsu.nodak.edu>

[courtesy copy e-mailed to author(s)]

In comp.lang.perl.misc, Matthew Burnham <danew@enterprise.net> wrote:
>I have a script that uuencodes a file and emails it off somewhere,
>unfortunately the output is mangled so that the newlines aren't right.
>How can I make it work!
>
>This is an extract from the script:
>
>	$sendMsg = "begin 644 $filename\n" . pack("u", $sendMsg) .
>"end\n";

hmm.. I don't PC's so I'm probably way off here, but you need to do
something like this after the above line:

$sendMsg =~ s/\n/\r\n/mog;

That still might not work.. it may be:

$sendMsg =~ s/\n/\015\n/mog;
or
$sendMsg =~ s/\n/^M\n/mog;

Where that's an actual ^M.  It may be either \012 or ^J, though.  I'm not
sure, you'll have to experiment a bit.

-- 
Nem W Schlecht                  nem@plains.nodak.edu
NDUS UNIX SysAdmin         http://www.nodak.edu/~nem
"Perl did the magic.  I just waved the wand."


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

Date: Tue, 10 Jun 1997 17:22:09 +0200
From: av <av@inorbit.com>
Subject: Re: What does "UNIX" stand for..
Message-Id: <339D7121.F121CA82@inorbit.com>

Bill (Gates) Erwin wrote:

> UNIX started out as "Castrated MULTICS" and was shortened from there.
> Check out the "UNIX Haters Handbook" for further details.
>
> Bill

I have 4 Intranet servers running. 3 are Linux and one is NT. I keep the
NT alive just for demo, it runs on the better machine and still has the
worse performance, and crashes at least twice a week... Really Microsoft
style.. :-b

I don't know what the "UNIX Haters Handbook" is, but sounds like
bullshit...



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

Date: Tue, 10 Jun 1997 16:15:19 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: where is mistake?
Message-Id: <EBKIHJ.29s@nonexistent.com>

A. Deckers (deckers@man.ac.uk) wrote on 1379 September 1993 in
<URL: news:slrn5pqdbr.j7q.deckers@news.rediris.es>:
++ In <5njc1o$fqq@news-central.tiac.net>,
++ 	Mike Stok <mike@stok.co.uk> wrote:
++ >In article <AA-1Jdp8c2@comac.spb.ru>, Sasha Titov  <sasha@comac.spb.ru>
++ >wrote:
++ >> [ Some cgi that doesn't work ]
++ >>
++ >  $| = 1;
++ 
++ That and checking file permissions, which is the classic cause of the
++ "it works from the shell but not when called from the browser"
++ syndrome.

Yes, in most of the time that's found in the error log too.


Abigail
-- 
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=$]*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'


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

Date: Tue, 10 Jun 1997 12:39:52 -0500
From: Chris Hilton <chilton@scci-ad.com>
Subject: Re: why won't 'print <<end_print...end_print' work?
Message-Id: <339D9168.ABD322C@scci-ad.com>

Tad McClellan wrote:
> 
> Bryan Hart (bryan@eai.com) wrote:
> 
> : > Will Sexton wrote:
> : > >
> : > > If I do the following:
> : > >
> : > >         print <<"end_print";
> : > >         some text
> : > >         some text on the next line
> : > >         end_print
> : > >
> 
> : Also, I don't think that you should double-quote the terminator string
> : either...
> 
> Why not?
> 
> An answer without a reason is of significantly reduced value.
> 

I believe that he may have been under the impression that the
double-quotes aren't allowed, which of course they are.  

You may use single or double quotes around the terminator string to
explicitly specify the treatment of the text. If no quotes are
specified, the text is treated as if double quoted.

-- 

Chris
Be seeing you.


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

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

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