[10896] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4497 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 26 10:07:17 1998

Date: Sat, 26 Dec 98 07:00:25 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 26 Dec 1998     Volume: 8 Number: 4497

Today's topics:
    Re: ------What should I use as a Win32 perl interpreter (Jeff Iverson)
        >>>> A Singaporean Girl looking for more penpals!!<<<<< <hocker@ms7.url.com.tw>
    Re: >>>> A Singaporean Girl looking for more penpals!!< <debot@xs4all.nl>
    Re: a nicer way? (Jason Costomiris)
    Re: a nicer way? (Jason Costomiris)
    Re: a nicer way? (Bart Lateur)
    Re: Artistic License question <jdf@pobox.com>
        Compiling Win32 <dward@pla.net.au>
    Re: Compiling Win32 (Jan Dubois)
    Re: Convert textarea line wraps to print (Ronald J Kimball)
    Re: Convert textarea line wraps to print <mcwebber@my-dejanews.com>
    Re: Convert textarea line wraps to print (brian d foy)
    Re: Convert textarea line wraps to print <mcwebber@my-dejanews.com>
    Re: Convert textarea line wraps to print (Ronald J Kimball)
    Re: Convert textarea line wraps to print <mcwebber@my-dejanews.com>
        Do I need a web server to practice Perl in my computer? (CarlosS940)
    Re: Do I need a web server to practice Perl in my compu (brian d foy)
    Re: Do I need a web server to practice Perl in my compu (Mike Schechter)
    Re: Do I need a web server to practice Perl in my compu (Bart Lateur)
    Re: NEWBIE: Question about $ENV in scripts <off-duty@entheosengineering.com>
        perl script for installing RedHat Linux from CD via FTP (Andrew Haveland-Robinson)
    Re: Problem with Text files with my Program. <off-duty@entheosengineering.com>
    Re: Problem with Text files with my Program. (Bart Lateur)
    Re: Regex question - removing HTML tags.... (Tad McClellan)
        test (Gnacco)
    Re: where to download the perl 5.0052.zip for win32 ?? (Ronald J Kimball)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 26 Dec 1998 03:59:52 GMT
From: j5rson@frontiernet.net (Jeff Iverson)
Subject: Re: ------What should I use as a Win32 perl interpreter-----
Message-Id: <36b45ecb.179923681@news.frontiernet.net>

Here are two suggestions:

The Perl Programmer's Reference : Windows 95/Nt, MacIntosh, Os/2 &
Unix
http://www.amazon.com/exec/obidos/ASIN/1566047501/iversonsoftwarecA

Teach Yourself Perl 5 for Windows Nt in 21 Days
http://www.amazon.com/exec/obidos/ASIN/0672310473/iversonsoftwarecA

On Sat, 19 Dec 1998 03:30:33 GMT, summere1@pilot.msu.edu (Brett
Summerer) wrote:

>	Right now I use ActivePerl, because it's free.  Any other
>ideas?  Also, does anyone know where I can find a decent book on
>getting perl scripts to run on a NT box?  All of the ones that I found
>are written with UNIX in mind.  I do my development on Sparqs, but our
>web server is Domino on NT.
>
>	-Brett Summerer
>summere1@pilot.msu.edu

Kind Regards,
Jeff Iverson
-- 
Iverson Software Co.  507-235-9209 - voice
418 N. State St. #7   507-235-8835 - fax
Fairmont MN  56001    http://www.iversonsoftware.com/


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

Date: Sat, 26 Dec 1998 12:38:41 +0800
From: hocker <hocker@ms7.url.com.tw>
Subject: >>>> A Singaporean Girl looking for more penpals!!<<<<<
Message-Id: <36846850.8543BD3F@ms7.url.com.tw>

>>>> A Singaporean Girl looking for more penpals!!<<<<<


Please reply according to the Email below,
don't reply to author!
Thanks!!!!

Photo can be viewed in http://207.137.99.125

=s89(ID NO) : 446

 <x$M%DCD(Subject) : A Singaporean Girl looking for
more penpals!!
 Nick Name(5'&W) : Ivis Wee
 Gender()J'O) : F
Age(&~DV) : 19
 Name()m&W) : Ivis Wee
 City(2{)~&m+0%+) : Singapore
 My Appearance('Z*:*x,[):Always Look On The Bright
Side!!
 Height((-0*) : 161
 Weight(Ei-+):54
 E-Mail:disney27@ibox.singnet.com.sg
>G>z(Education) : University/$j>G
Nationality(0jDy) : Singapore(7s%[)Y)
 Horoscope(,P.y) : Capricorn$s&O.y
 Job($u'@):Student
My Hobbies(?3=l)::surfing the net,drinking
coffee,shopping,aerobics,cycling,swimming,going out
with friends,corresponding,collecting cute stuffs,
reading..
 Personality(-S)J):Crazy,Fun loving, Sincere,
 Humourous, Independent,Adorable,friendly,Motivated
Language(%i%N;y(%):English,Chinese and little
Japanese
 Marriage/1B+C*,*p :
Idea Partner Gender/'F1f9o93)J'O :
Relationship/'F1fCv'F :

Introduction(&['Z$62P):
 I'm currently a 1st yr Arts and Social Science student in
the National University of Singapore. Basically, I'm a
 very friendly and fun loving girl who loves the company
of her friends. Would really like it if people around my
 age to drop me a mail!!
I wish my friend to be('F1f9o93):
Honest, Sincere, Humourous, Friendly,



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

Date: Sat, 26 Dec 1998 11:54:02 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Re: >>>> A Singaporean Girl looking for more penpals!!<<<<<
Message-Id: <3684C04A.F3405D02@xs4all.nl>

I thought this was a newgroup for questions about PERL not about
friendships.
Maybe you can check this site out: http://www.debot.nl/ppi/

hocker wrote:

> >>>> A Singaporean Girl looking for more penpals!!<<<<<
>
> Please reply according to the Email below,
> don't reply to author!
> Thanks!!!!
>
> Photo can be viewed in http://207.137.99.125
>
> =s89(ID NO) : 446
>
>  <x$M%DCD(Subject) : A Singaporean Girl looking for
> more penpals!!
>  Nick Name(5'&W) : Ivis Wee
>  Gender()J'O) : F
> Age(&~DV) : 19
>  Name()m&W) : Ivis Wee
>  City(2{)~&m+0%+) : Singapore
>  My Appearance('Z*:*x,[):Always Look On The Bright
> Side!!
>  Height((-0*) : 161
>  Weight(Ei-+):54
>  E-Mail:disney27@ibox.singnet.com.sg
> >G>z(Education) : University/$j>G
> Nationality(0jDy) : Singapore(7s%[)Y)
>  Horoscope(,P.y) : Capricorn$s&O.y
>  Job($u'@):Student
> My Hobbies(?3=l)::surfing the net,drinking
> coffee,shopping,aerobics,cycling,swimming,going out
> with friends,corresponding,collecting cute stuffs,
> reading..
>  Personality(-S)J):Crazy,Fun loving, Sincere,
>  Humourous, Independent,Adorable,friendly,Motivated
> Language(%i%N;y(%):English,Chinese and little
> Japanese
>  Marriage/1B+C*,*p :
> Idea Partner Gender/'F1f9o93)J'O :
> Relationship/'F1fCv'F :
>
> Introduction(&['Z$62P):
>  I'm currently a 1st yr Arts and Social Science student in
> the National University of Singapore. Basically, I'm a
>  very friendly and fun loving girl who loves the company
> of her friends. Would really like it if people around my
>  age to drop me a mail!!
> I wish my friend to be('F1f9o93):
> Honest, Sincere, Humourous, Friendly,



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

Date: 26 Dec 1998 13:52:05 GMT
From: jcostom@madcow.jasons.org (Jason Costomiris)
Subject: Re: a nicer way?
Message-Id: <slrn789qg5.js.jcostom@madcow.jasons.org>

On Fri, 25 Dec 1998 17:52:46 GMT, Andrew M. Langmead <aml@world.std.com> wrote:
: Since Tom Christiansen posted a perfectly valid procedural code
: snippet, and you "corrected" him with the OOP example. I think the
: burden of proof is on you to explain why your example was in any form
: an improvement.

I did not "correct" Tom.  I simply asked if there was something particularly
better about his approach than mine.  Seems that since it was Tom's fingers
that did the typing, that's enough for it to be better. :-)

-- 
Jason Costomiris <><            | Linux...
jcostom@jasons.org              | "Find out what you've been missing 
http://www.jasons.org/~jcostom/ | while you've been rebooting Windows NT."
#include <disclaimer.h>         |         --Infoworld


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

Date: 26 Dec 1998 14:00:55 GMT
From: jcostom@madcow.jasons.org (Jason Costomiris)
Subject: Re: a nicer way?
Message-Id: <slrn789r0n.js.jcostom@madcow.jasons.org>

On 26 Dec 1998 01:22:04 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
: In the case of the overwhelming majority of uses of CGI.pm, the object
: interface produces annoyingly repetitive code that is harder to read
: and thus maintain than what the procedural interface generates.  It's a
: waste of your time and the time of those who come after you -- as well
: as those who would like to, like me.

You might want to clue Lincoln Stein in on this.  In my copy of the
man page to CGI.pm (obviously, gen'd from the embedded pod), all of
his examples use the OO syntax.

I guess Lincoln's a nut too.  Permit me to be the first to congratulate
Lincoln on his status as a nut!  You're really getting absurd here, Tom.

Oh, and BTW Tom, awk is fine as is (I'm sure you'll find that utterly
shocking, coming from me).

Not everything has to be an object, but many times, they are useful,
like in conjunction with CGI.pm.  Obfuscation?  Now I could see you 
claiming obfuscation if I had pack() and unpack()'d everything using
some sort of funky args, and did some bit shifts to hide the meaning
of my code.  Invoking methods of an object?  That's not obfuscation.

Tom's a great guy, who's done a lot for perl.  He's also human, that is,
occasionally will be wrong.  IMHO, this is one of those occasions.

-- 
Jason Costomiris <><            | Linux...
jcostom@jasons.org              | "Find out what you've been missing 
http://www.jasons.org/~jcostom/ | while you've been rebooting Windows NT."
#include <disclaimer.h>         |         --Infoworld


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

Date: Sat, 26 Dec 1998 14:31:02 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: a nicer way?
Message-Id: <3684f2d1.157250@news.skynet.be>

Jason Costomiris wrote:

>Not everything has to be an object, but many times, they are useful,
>like in conjunction with CGI.pm.

I don't think so.

Objects are fine, if you have multiple instances. You ordinarily have
only ONE CGI object. Therefore, the necessity to have it is annoying.

	Bart.


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

Date: 26 Dec 1998 15:22:06 +0100
From: Jonathan Feinberg <jdf@pobox.com>
To: ldubb@home.com (Lindsey Dubb)
Subject: Re: Artistic License question
Message-Id: <m3ww3fx9td.fsf@joshua.panix.com>

ldubb@home.com (Lindsey Dubb) writes:

> How does the Artistic License apply to the use of a small part of the
> Perl distribution?  As I read it, the License talks in detail about
> modifications to the package as a whole, but does not explain the reuse
> of a small number of files.

regcomp.c states that 

 ***    Alterations to Henry's code are...
 ***
 ***    Copyright (c) 1991-1997, Larry Wall
 ***
 ***    You may distribute under the terms of either the GNU General Public
 ***    License or the Artistic License, as specified in the README file.

which suggests to not-a-lawyer me that you may use the file as long as
you keep it "free"*.  Similar notices appear in other relevant files.

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY
http://pobox.com/~jdf

*with ketchup and mustard


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

Date: Sat, 26 Dec 1998 07:57:12 +1100
From: Darren Ward <dward@pla.net.au>
Subject: Compiling Win32
Message-Id: <3683FC28.14E981C2@pla.net.au>

Hi All,

Having trouble compiling perl on win98

I have downloaded mingw32 and installed it correctly (the gcc 2.8.1
version)

However the compile errors with the dmake script
It doesn't like the '&&' sections of the makefile.mk and I'
m not sure of whats needed to fix it.

Darren

Please reply vi email


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

Date: Sat, 26 Dec 1998 12:40:53 +0100
From: jan.dubois@ibm.net (Jan Dubois)
Subject: Re: Compiling Win32
Message-Id: <3687c22e.2149460@news3.ibm.net>

[mailed & posted]

Darren Ward <dward@pla.net.au> wrote:

>Having trouble compiling perl on win98
>
>I have downloaded mingw32 and installed it correctly (the gcc 2.8.1
>version)
>
>However the compile errors with the dmake script
>It doesn't like the '&&' sections of the makefile.mk and I'
>m not sure of whats needed to fix it.

The problem is "command.com". It doesn't support '&&'. You need to get
some other shell. I've read that 4dos works ok. You might try bash from
the cygwin utilities also. I don't have win9x myself, so I don't know
which other problems might be lurking behind the corner.

>Darren
>
>Please reply vi email

No worries mate, I just did.

-Jan


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

Date: Fri, 25 Dec 1998 22:55:51 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Convert textarea line wraps to print
Message-Id: <1dkm718.mg725u1sucl4gN@bos-ip-1-86.ziplink.net>

McWebber <mcwebber@my-dejanews.com> wrote:

> Yes. Currently anything entered in the textarea as:
> line 1
> line 2
> line 3
> 
> appears as:
> line1 line2 line 3

This appears to be more of an HTML question.  If you want line breaks in
your HTML, then you need to either replace "\n" with "<BR>\n", or put
the whole thing inside <PRE></PRE>, which will use a fixed-width font
and leave all whitespace, including newlines, intact.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sat, 26 Dec 1998 04:09:36 GMT
From: "McWebber" <mcwebber@my-dejanews.com>
Subject: Re: Convert textarea line wraps to print
Message-Id: <4kZg2.334$k67.232@news.rdc1.fl.home.com>

Ronald J Kimball wrote in message
<1dkm718.mg725u1sucl4gN@bos-ip-1-86.ziplink.net>...
>This appears to be more of an HTML question.  If you want line breaks in
>your HTML, then you need to either replace "\n" with "<BR>\n", or put
>the whole thing inside <PRE></PRE>, which will use a fixed-width font
>and leave all whitespace, including newlines, intact.
>
Eh? The textarea is part of a form posting to a CGI, if you had read the
original post. The problem with enclosing in a <pre> is that with no actual
"enters" from the user, the text continues on one line and doesn't wrap.
--
McWebber
Help on your web page | http://mcwebber.com/mcwebber/
Newsgroup postings are not an invitation for mail - Post publicly to reply
Under no circumstances will I ever purchase anything offered to me as the
result of an unsolicited e-mail message





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

Date: Fri, 25 Dec 1998 23:22:40 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Convert textarea line wraps to print
Message-Id: <comdog-ya02408000R2512982322400001@news.panix.com>

In article <4kZg2.334$k67.232@news.rdc1.fl.home.com>, "McWebber" <mcwebber@my-dejanews.com> posted:

> Ronald J Kimball wrote in message
> <1dkm718.mg725u1sucl4gN@bos-ip-1-86.ziplink.net>...
> >This appears to be more of an HTML question.  If you want line breaks in
> >your HTML, then you need to either replace "\n" with "<BR>\n", or put
> >the whole thing inside <PRE></PRE>, which will use a fixed-width font
> >and leave all whitespace, including newlines, intact.
> >
> Eh? The textarea is part of a form posting to a CGI, if you had read the
> original post. The problem with enclosing in a <pre> is that with no actual
> "enters" from the user, the text continues on one line and doesn't wrap.

do you want to show it as the user entered it or not?  chipmunk 
understands that problem quite well and gave you the best answer
you could hope for.  there isn't any other way around it.

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: Sat, 26 Dec 1998 05:10:07 GMT
From: "McWebber" <mcwebber@my-dejanews.com>
Subject: Re: Convert textarea line wraps to print
Message-Id: <Pc_g2.338$k67.232@news.rdc1.fl.home.com>

Managed to find a way to do it:

In the script it had this:
$descript =~ s/<([^>]|\n)*>//g;
I changed it to:
$descript =~ s|[\r\n]+|<BR>|gs;
which I found in another script that behaved the way I wanted with a
textarea.

Now the text in the textarea wraps as submitted by the user, no <pre> tags
needed.

Thanks for the help.

--
McWebber
Help on your web page | http://mcwebber.com/mcwebber/
Newsgroup postings are not an invitation for mail - Post publicly to reply
Under no circumstances will I ever purchase anything offered to me as the
result of an unsolicited e-mail message

brian d foy wrote in message ...
>do you want to show it as the user entered it or not?  chipmunk
>understands that problem quite well and gave you the best answer
>you could hope for.  there isn't any other way around it.
>





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

Date: Sat, 26 Dec 1998 00:22:34 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Convert textarea line wraps to print
Message-Id: <1dkmbdd.mdg1prunl3niN@bos-ip-1-50.ziplink.net>

McWebber <mcwebber@my-dejanews.com> wrote:

> >This appears to be more of an HTML question.  If you want line breaks in
> >your HTML, then you need to either replace "\n" with "<BR>\n", or put
> >the whole thing inside <PRE></PRE>, which will use a fixed-width font
> >and leave all whitespace, including newlines, intact.
> 
> Eh? The textarea is part of a form posting to a CGI, if you had read the
> original post. The problem with enclosing in a <pre> is that with no actual
> "enters" from the user, the text continues on one line and doesn't wrap.

Yes, I did read the original post.  I seem to remember something like
the following:

"I'd like to have the output match the 'returns' entered by the user."

I told you how to do that.  If you go with my first suggestion,
replacing "\n" with "\n<BR>", then the browser will still be able to
wrap long lines.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sat, 26 Dec 1998 05:33:54 GMT
From: "McWebber" <mcwebber@my-dejanews.com>
Subject: Re: Convert textarea line wraps to print
Message-Id: <6z_g2.342$k67.222@news.rdc1.fl.home.com>

Ronald J Kimball wrote in message
<1dkmbdd.mdg1prunl3niN@bos-ip-1-50.ziplink.net>...
>Yes, I did read the original post.  I seem to remember something like
>the following:
>
>"I'd like to have the output match the 'returns' entered by the user."
>
>I told you how to do that.  If you go with my first suggestion,
>replacing "\n" with "\n<BR>", then the browser will still be able to
>wrap long lines.
>
Except I tried what you wrote in your original reply: "<br>\n" not "\n<br>"
and that didn't work. Maybe I wasn't placing it in the correct place.
Doesn't matter, as it's working as I wanted now.
--
McWebber
Help on your web page | http://mcwebber.com/mcwebber/
Newsgroup postings are not an invitation for mail - Post publicly to reply
Under no circumstances will I ever purchase anything offered to me as the
result of an unsolicited e-mail message




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

Date: 26 Dec 1998 04:31:05 GMT
From: carloss940@aol.com (CarlosS940)
Subject: Do I need a web server to practice Perl in my computer?
Message-Id: <19981225233105.26912.00001586@ng105.aol.com>

Thanks

CarlosS940@aol.com


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

Date: Fri, 25 Dec 1998 23:43:08 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Do I need a web server to practice Perl in my computer?
Message-Id: <comdog-ya02408000R2512982343080001@news.panix.com>

In article <19981225233105.26912.00001586@ng105.aol.com>, carloss940@aol.com (CarlosS940) posted:

no.  Perl is not the Web, even though the Web may be Perl.  you just 
need Perl to play with perl.

> Thanks

you're welcome. :)

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: Sat, 26 Dec 1998 04:39:07 GMT
From: mschechter@earthlink.net (Mike Schechter)
Subject: Re: Do I need a web server to practice Perl in my computer?
Message-Id: <36846837.40896606@news.earthlink.net>

On 26 Dec 1998 04:31:05 GMT, carloss940@aol.com (CarlosS940) wrote:

>Thanks

It depends on what you want to do.  If you want to write CGI scripts,
it sure would help.  If you want to practice anything else, you don't
need a web server at all.

Mike Schechter



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

Date: Sat, 26 Dec 1998 09:14:20 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Do I need a web server to practice Perl in my computer?
Message-Id: <3686a4af.2533745@news.skynet.be>

CarlosS940 wrote:

>Do I need a web server to practice Perl in my computer?

No. In fact, if you're new at both, I would advice against it. If your
script doesn't work, you have to figure out if it's the web server, the
script, or a header problem. That is an extra burden.

CGI and Perl are two unrelated things. First, try using Perl for things
that are not CGI related, such as file conversion, data extraction etc.

Once you're reasonably fluent in Perl, it's time to start on CGI.

For quite simple CGI stuff, it's easy enough for the script to read the
form data from a file, and save the HTML output in a file, which you can
load into your browser. It has the advantage that you can easily enter
the same or similar data over and over again, even in multiple sessions.

A web server would be nice, when you're experienced enough in Perl, to
check out a script that controls your entire site.

	Bart.


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

Date: Fri, 25 Dec 1998 23:45:02 -0600
From: Rich Grise <off-duty@entheosengineering.com>
To: Brian Willis <bigkingwillie@bigfoot.com>
Subject: Re: NEWBIE: Question about $ENV in scripts
Message-Id: <368477DE.141B@entheosengineering.com>

Brian Willis wrote:
> 
> Hello,
> 
>   I was woundering if someone could explain the different $ENV's that I see
> in CGI scripts. I'm sure that there are a few different ones, but here are
> the ones I've seen the most.
> 
> $ENV{'CONTENT_LENGHT'}
> $ENV{'QUERY_STING'}
> $ENV{'PATH_INFO'}
> 
> I'm kinda new to scripting (trying my hand out on perl now) and I get
> confused how and why to use the different $ENV's. 

Well, it depends on what you're trying to do. These are "environment
variables" - yes, provided by the server daemon, and not restricted
to perl (different languages have different techniques for accessing
them), and it's probably more a comp.infosystems.www.authoring.cgi
question, but here goes.


 Are they related only to
> the web server?  Can you list the ENV's for a web server? 


#!/usr/bin/perl -w

print "Content-type: text/html\n\n";
foreach $item (keys %ENV) {
  print "$item = $ENV{$item}<br>\n";
}

 I've worked
> quite a bit on SunOS and Solaris and I'm familar with the "env" of those
> OS's.
> 
> Excuse the ignorance...

Hey, we've all been there - I'm still 90% there myself! :)

> 
> --
> Brian Willis
> bigkingwillie@bigfoot.com

Cheers!

-- 
Rich Grise
off-duty@entheosengineering.com
(No need to putz around with my e-mail - I have a "DELETE" button!)


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

Date: Sat, 26 Dec 1998 11:08:00 GMT
From: andy@haveland.com (Andrew Haveland-Robinson)
Subject: perl script for installing RedHat Linux from CD via FTP...
Message-Id: <368498dd.3474906@news.cix.co.uk>

This was a pain, I finally got round to trying to install RedHat 5.1 on a
lowly P100 machine but the Pioneer DR-A24X CDROM wouldn't mount though it
works on the same machine under MSDOS.

To solve this, I thought about installing from my main NT server.

Having set up the ftp server to dish out the CD, the linux install program
couldn't find the ftp files as the installation names were 'dossified'.

So to solve this, I copied the CD onto a server disk, and then wrote a perl
script to read the trans.tbl file and rename them from short to long, and
make the symlinks, in case these are required.
I didn't bother traversing dirs, but it Linux installed without any
problems afterwards, much to my surprise!

Here's the script in case anyone else has or will have a similar problem.
Feel free to amend.
ln.exe can be found in the NT3.51 (NT4) resource kit. (I have to modify my
path and comspec for my system calls to work properly - you'll probably
need to remove these).

Cheers,
Andy.

#!/usr/local/bin/perl
# rnfiles.pl
# Reads trans.tbl and converts from short to long names.
# Don't forget to attrib -r /s /d after copying CD to HD.

$ENV{'COMSPEC'}='c:\win32app\4nt\4NT.EXE';
$ENV{'PATH'}='C:\WINNT\system32;c:\public;h:\bin;h:\usr\local\bin';

open TRANS, "trans.tbl" || die "trans.tbl not found.\n";
@list = <TRANS>;
close TRANS;

for (@list) {
   chomp;
   if (/D (.*)? *?\t(\w.*)$/) {
      $from = $1;
      $to = $2;
      print "ren \"$from\" to \"$to\"\n";
      `ren \"$from\" \"$to\"`;
      }
   }
for (@list) {
   chomp;
   if (/F (.*);1.*?(\w.*)$/) {
      $from = $1;
      $to = $2;
      print "ren \"$from\" to \"$to\"\n";
      `ren \"$from\" \"$to\"`;
      }
   }
for (@list) {
   chomp;
   if (/L (.*);1.*?(\w.*)\t(.*)$/) {
      $from = $1;
      $to = $2;
      $ln = $3;
      print "linked file: $2 to $3\n";
      `del \"$1\"`;
      `ln \"$3\" \"$2\"`;
      }
   }

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HRA Web Services                                     Tel. +44 (0)1252-845697
6 Haywarden Place, Hartley Wintney,                             ICQ: 1331640
Hants RG27 8UA England                               Web: http://www.1HR.net


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

Date: Fri, 25 Dec 1998 23:55:22 -0600
From: Rich Grise <off-duty@entheosengineering.com>
Subject: Re: Problem with Text files with my Program.
Message-Id: <36847A4A.6E1D@entheosengineering.com>

Wallace wrote:
> 
> Arrrrgh!!!!!!!!!!! (Shouting at self)
>[...] 
> Due to me misreading (I.e. not paying attention) the sections on what I was
> doing,
> I accidentally slipped back into BASIC mode.
[...]
> Wallace

BASIC????? Ewwwwww! At least when I started with perl, I made my
mistakes in C!

:)
-- 
Rich Grise
off-duty@entheosengineering.com
(No need to putz around with my e-mail - I have a "DELETE" button!)


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

Date: Sat, 26 Dec 1998 09:14:18 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Problem with Text files with my Program.
Message-Id: <3684a090.1479899@news.skynet.be>

Wallace wrote:

>        $len = @hosts;
>        @hosts[$len] = $hostin;
(and lots of similar line duo's)

Ooch!

It seems like you think the "@" indicates an array, and "$" indicates a
scalar. That's only partly right. Actually, @hosts[$len] is an array
slice, (a "subarray"), which contains one scalar element.

If you want one element of an array, it IS a scalar. So you need the
"$". The "[...]" following it is indication enough to tell Perl to use
the array.

So, a first correction would be 

        $len = @hosts;
        $hosts[$len] = $hostin;

But it looks to me as if you want to add an element at the end of an
array. Then do it this way:

	push @hosts,$hostin;

	Bart.


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

Date: Fri, 25 Dec 1998 19:36:04 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Regex question - removing HTML tags....
Message-Id: <4ie167.l99.ln@magna.metronet.com>

GiLLY (hklife@soback.kornet21.net) wrote:
: On 24 Dec 1998 17:16:49 GMT, abigail@fnx.com (Abigail) wrote:

: >GiLLY (hklife@soback.kornet21.net) wrote on MCMXLI September MCMXCIII in
: ><URL:news:3681e0f3.25474765@news.snu.ac.kr>:
: >++ :<!-- So, what about this? --
: >++ :>
: >++
: >++ s/<!\s*-\s*-.*?-\s*-\s*>//gs;
: >
: >
: ><!-- So, what - - > about this then? -->

: now,

: s/<!\s*--.*?--\s*>//gs;
      ^^
      ^^

   White space is not permitted between the markup declaration open
   delimiter("<!") and the comment open delimiter ("--")


<! -- so that will strip things that are not comments -->

;-)


--
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Sat, 26 Dec 1998 12:26:32 GMT
From: gnacco@gnocca.com (Gnacco)
Subject: test
Message-Id: <3686d5f3.6748587@winserver>




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

Date: Fri, 25 Dec 1998 22:55:52 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: where to download the perl 5.0052.zip for win32 ??
Message-Id: <1dkm7fd.u6b8jxivmoijN@bos-ip-1-86.ziplink.net>

<thankyouverymuch@my-dejanews.com> wrote:

> Please tell me where can I download the perl 5.0052.zip file for NT4?? I have
> been perl.com many times but I cannot found the location.... I just found
> the x86perl50052.tar.gz which is seems not win32 file extension.
> 
> I need the original perl not the activestate since I will use it with the
> mod_perl apache.

You started off in the right place, but you must have taken a wrong turn
somewhere.

Start at <http://www.perl.com/>.  In the yellow sidebar on the left,
there is a link to "Get the _latest_version_ of Perl."  At the bottom of
that page, in the table labeled "Unix (source)", you can download the
Perl distribution, as a .tar.gz or .zip file.

The URL for the .zip file is:

http://www.perl.com/CPAN/src/stable.zip

Enjoy!

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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