[8490] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2107 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 16 08:17:07 1998

Date: Mon, 16 Mar 98 05:00:53 -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           Mon, 16 Mar 1998     Volume: 8 Number: 2107

Today's topics:
    Re: "Premature End of Script Headers" (Tor Iver Wilhelmsen)
    Re: "Premature End of Script Headers" (Lee Feigenbaum)
        ANNOUNCE: IndexMaker 5.2: an index.html maker from PDF, <pivari@geocities.com>
    Re: calculating distance between strings (fortune cooki Frank@but_dont_use_this.address
        file age <Beljaars@fys.ruu.nl>
    Re: File::Copy <shankeyp@charlestoncounty.org>
    Re: File::Copy <shankeyp@charlestoncounty.org>
    Re: Is there a "Newsgroup" for Newbies to Perl? <birgitt@order.booktraders.com>
    Re: Listing subdirectories... (Bart Lateur)
        mirror 2.8 on NT <mv@pdv-systeme.de>
        New Error Message - @INC (Lee Feigenbaum)
    Re: newbie's 1st question <ckc@dmi.dk>
    Re: password protection for web site? (Ken Churilla)
    Re: Perl and Windows NT question <sb@sdm.de>
    Re: Problem stripping Mac headers off of GIF's <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
        proces killer <Beljaars@fys.ruu.nl>
    Re: Reading excel files under Unix (Ken Irving)
    Re: removing everything between < and > (Ethan H. Poole)
    Re: removing everything between < and > <egwong@netcom.com>
    Re: Splitting Arrays/Variables <dformosa@st.nepean.uws.edu.au>
    Re: User-interface Quandary (Tony Bass)
    Re: What is PERL? Learn JAVA instead? <alan@consultancy-services.ferret.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 16 Mar 1998 10:15:18 GMT
From: toriw@online.no (Tor Iver Wilhelmsen)
Subject: Re: "Premature End of Script Headers"
Message-Id: <3524fa80.11995534@news.eunet.no>

On Mon, 16 Mar 1998 00:47:16 GMT, feigenb@hcs.harvard.edu (Lee
Feigenbaum) uttered:

>Can anyone tell me what is the usual cause for this type of error (if
>there is a usual cause)? Thanks a lot,

Most Web servers are picky, and want the script to return at least a
Content-Type: header; if no recognisable headers (followed by an empty
line) are received, it barfs. I had this problem myself, since I use
OmniHTTPd locally to test (it does not require headers), and deploy on
Apache (which does).

Try adding a simple

print "Content/Type: text/html\015\012\015\012";

or whatever early in your script.

-- 
"Between our dreams and actions lies this world."
   - Bruce Springsteen, "Dead Man Walking"
Tor Iver Wilhelmsen       toriw@online.no


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

Date: Mon, 16 Mar 1998 12:04:40 GMT
From: feigenb@hcs.harvard.edu (Lee Feigenbaum)
Subject: Re: "Premature End of Script Headers"
Message-Id: <350d1527.26893387@news.fas.harvard.edu>

I've got it printing out a header, (and it does print the header (as
regular text) when run in offline debug mode:

i get

Content-Type: text/html

<HTML><HEAD>etc..

That header should suffice... I'm not at all sure whta's going on...
oh well

Lee

On Mon, 16 Mar 1998 10:15:18 GMT, toriw@online.no (Tor Iver
Wilhelmsen) wrote:

>On Mon, 16 Mar 1998 00:47:16 GMT, feigenb@hcs.harvard.edu (Lee
>Feigenbaum) uttered:
>
>>Can anyone tell me what is the usual cause for this type of error (if
>>there is a usual cause)? Thanks a lot,
>
>Most Web servers are picky, and want the script to return at least a
>Content-Type: header; if no recognisable headers (followed by an empty
>line) are received, it barfs. I had this problem myself, since I use
>OmniHTTPd locally to test (it does not require headers), and deploy on
>Apache (which does).
>
>Try adding a simple
>
>print "Content/Type: text/html\015\012\015\012";
>
>or whatever early in your script.



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

Date: Mon, 16 Mar 1998 09:37:11 +0000
From: Fabrizio Pivari <pivari@geocities.com>
Subject: ANNOUNCE: IndexMaker 5.2: an index.html maker from PDF,HTML,VRML and other files
Message-Id: <350CF2C6.34719AF5@geocities.com>

Hi,

I'm glad to announce the version 5.2 of IndexMaker a perl script to make

an index.html file from PDF, HTML, VRML and other files.
At the moment, it uses the /Author field, the first /Title field and in
the /Subject field every matched PDF files, the <TITLE> </TITLE>
field and  the META
Description and Author fields in every matched HTML files the Info
node field in every matched VRML 1.0 files the WorldInfo node field
info and title in every matched VRML 2.0 files and the name of the file
in the others.

What's new with version 5.2
Added recursive option using File::Find module
Bugfix: now indexmaker works correctly with categories

This is the URL where you can find the tool
http://www.geocities.com/CapeCanaveral/Lab/3469



--
Fabrizio Pivari
mailto:pivari@geocities.com
http://www.geocities.com/CapeCanaveral/Lab/3469/
Member of ANFACE Software
http://www.geocities.com/CapeCanaveral/Hangar/4794/





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

Date: 16 Mar 1998 12:41:57 +0100
From: Frank@but_dont_use_this.address
Subject: Re: calculating distance between strings (fortune cookies)
Message-Id: <yo9ogz66ewq.fsf@nym.sc.philips.com>

Ronald J Kimball <rjk@coos.dartmouth.edu> writes:
> 
>Simon Oosthoek wrote:
>>
>> I'm looking for a program/script/whatever that can calculate the
>> distance between two text-strings. By distance I mean that I want
>> to find strings that human beings can identify as "the same", but a
>> computer would not directly consider equal in the sense: ($StrX eq
>> $StrY) 
> This sounds interesting.  Could you be more specific about what you
> mean by "distance"?  In particular, what ideas do you have for
> calculating the distance?  You could do something with the lengths
> of the strings and the number of non-matching characters.  But you'd
> also have to allow for offets, such as "bar" and " bar"...

I read a while ago (here?) that someone produced a thing to transform
a string into some form of phonetic representation. Perhaps this
transformed input is more robust to this kind of offsets & normal
spelling errors.

Sorry for the very vague pointers to reference articels. Dejanews
popped Text::Metaphone for this kind of tranform up.


Simon, please give some feedback if you decide to give this approach a
try.

regards
	Frank
	





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

Date: Mon, 16 Mar 1998 09:06:41 GMT
From: Haaino Beljaars <Beljaars@fys.ruu.nl>
Subject: file age
Message-Id: <350CEBA0.D3D74C@fys.ruu.nl>

Hi,

I have a simple problem. I am currently running a system with multiple
users, the user 'guest' has a disk quota of 10 MB. All files of 'guest'
must be deleted after 10 days but the files of the other persons must be
left alone. How do I do that?

--
Greetings from Haaino Beljaars

--------------------------------------------------
E-Mail:         Beljaars@fys.ruu.nl              -
Home Page:      HTTP://www.fys.ruu.nl/~beljaars/ -
File not found. Should I fake it? (Y/N)          -
Beware of programmers who carry screwdrivers.    -
--------------------------------------------------





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

Date: Mon, 16 Mar 1998 05:22:37 -0500
From: Peter Shankey <shankeyp@charlestoncounty.org>
Subject: Re: File::Copy
Message-Id: <350CFD6D.44DF@charlestoncounty.org>

Kent E. Holsinger wrote:
> 
> Take a look at the messages in the thread on File::Find and -w. I
> didn't see anything in a perldoc File::Copy, but File::Find gives a
> similar warning if $_ is changed in a user-defined function. I
> originally had a line like
> 
>    while (<FILE>)
> 
> in my code. This is equivalent to
> 
>    while ( defined($_ = <FILE>) )
> 
> so $_ was being redefined. When I changed it to
> 
>    while ( defined($line = <FILE>) )
> 
> everything worked like a charm.
> 
> Kent
> 
> --
> Kent E. Holsinger                Kent@Darwin.EEB.UConn.Edu
>                                  http://darwin.eeb.uconn.edu
> -- Department of Ecology & Evolutionary Biology
> -- University of Connecticut, U-43
> -- Storrs, CT   06269-3043

so who would one define $_ back to what File::Copy would understand?
-- 
thanks   
  Pete ;)
shankeyp@charlestoncounty.org
(803) 723-6785


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

Date: Mon, 16 Mar 1998 05:48:57 -0500
From: Peter Shankey <shankeyp@charlestoncounty.org>
To: "Kent E. Holsinger" <kent@darwin.eeb.uconn.edu>
Subject: Re: File::Copy
Message-Id: <350D0399.755A@charlestoncounty.org>

Kent E. Holsinger wrote:
> 
> Take a look at the messages in the thread on File::Find and -w. I
> didn't see anything in a perldoc File::Copy, but File::Find gives a
> similar warning if $_ is changed in a user-defined function. I
> originally had a line like
> 
>    while (<FILE>)
> 
> in my code. This is equivalent to
> 
>    while ( defined($_ = <FILE>) )
> 
> so $_ was being redefined. When I changed it to
> 
>    while ( defined($line = <FILE>) )
> 
> everything worked like a charm.
> 
> Kent
> 
> --
> Kent E. Holsinger                Kent@Darwin.EEB.UConn.Edu
>                                  http://darwin.eeb.uconn.edu
> -- Department of Ecology & Evolutionary Biology
> -- University of Connecticut, U-43
> -- Storrs, CT   06269-3043

Well I did try it with this peice of perl

#!/usr/bin/perl -w
use POSIX;
use File::Copy 'cp';
$TempFile=POSIX::tmpnam();
#$TempFile1=POSIX::tmpnam();
# vars general vars
$UID="1194";
$UserList="/home/dptpws/s/ed/ps_0306.txt";
#step one: change the Login name to lower case and add a uid number to
each 
#account to be created from ps_0306.txt  finallly write from the temp
file
#back to $UserList
open(TempFile,">$TempFile")  || die "\ncannont open $TempFile\n\n";
open(UserList,$UserList)	||	die "\ncannot open $UserList\n\n";
while(defined ($Line=<UserList>)){ 
	@fields=split(/,/,$Line);
	$fields[0]=lc"$fields[0]"; # change to lower case
	$fields[2]=$UID;
	++$UID;
	print TempFile "$fields[0],$fields[1],$fields[2]\n";
	}
close(TempFile);
close(UserList);
cp("$TempFile","$UserList");
unlink $TempFile; #deletes the Temp file

but I still got the message:

dptpws@ashley/home/dptpws/s/ed>./bi-user-add.1
Use of uninitialized value at /opt/GNUperl5/lib/File/Copy.pm line 84.

could you try running it and see if you get the message??

-- 
thanks   
  Pete ;)
shankeyp@charlestoncounty.org
(803) 723-6785


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

Date: Mon, 16 Mar 1998 02:44:10 -0500
From: Birgitt Funk <birgitt@order.booktraders.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <350CD84A.826B0B8B@order.booktraders.com>

Mark P Stackhouse wrote:
> 
> David Oswald wrote:
> 
> > I've been putting in the effort; got a minor in Comp. Sci., read cover
> > to cover (and re-read) the Camel, Llama, Owls, and Mouse books, spent
> > a lot of time at www.perl.com, worn holes in the soles of DejaNews,
> 
> Do you really expect a "Newbie" to buy and read 4 books at the same
> time?  I have, and am reading "Learning Perl", but I still get confused
> sometimes.  Sorry, but my mind isn't a steel trap!  I DO, use the
> resources available on-line but they're not very friendly... to a
> "Newbie", the answer can be more confusing than the question.  All we
> get from the docs is the syntax...very few examples to learn from.
> 

Sure, you buy the books and you print out the online documentation
and then you print out lots of  code of any good application from cpan. 

Then you go into the woods and read. And never waste your time reading
newsgroups. (This will be certainly my only post to this group for
another year, my first one was last year and I got flamed...8-)). 

> > A newbie newsgroup would indeed be a nightmare; a zillion questions
> > (not unlike this group's current state of affairs) and a half zillion
> > wrong answers.  Go to the books; that's where you'll find the truth.

Absolutely right.

I would like to add some numbers from the
www.redhat.com/redhat/linuxmarket
page (please that is not meant to abuse this group for advertisment):

quote:

"It is our experience that the majority of our customers have not used
UNIX   apreviously. Last year our registration system survey indicated
that
 56.2% of Linux users had not previously used UNIX; conversely only
43.8%     have had previous experience with UNIX. This year, the
 numbers showed (and yes we find this hard to believe ourselves) that
81% of  those registering their Red Hat Linux products had not
 used UNIX, while 19% had. 

 Total number of UNIX users using Linux plus the number of users
represented  by the ratio of non-UNIX users among Red Hat
 Software's customer base. 

     Low estimates: 1,742,000 + 2,613,000 = 4,355,000
     High estimates: 3,015,000 + 7,035,000 = 10,050,000" 

end of quote

Linux widely being used for Webservers, Perl widely being used
for any Web application, it is pretty safe to think that
the increase of people who want to learn Perl with no prior
programming experience increases in similar proportions. 

So I wonder if it makes sense at all for the experts to get
frustrated or upset about the increase and pattern of
"newbie" questions.

You don't want to teach the "millions" out there a lesson 
"one by one" in telling them "READ THE DCOS", do you ? 
I would think that would make any person pretty sick after 
a while.

May be just everybody should watch out what he had wished for,
after all the experts make their living thanks to the growth
of the web.

What beginners need ?

Excellent documentation, beginner's style and advanced style and 
lots of code expamples. 

All this can be found online and it must be found out
by the student himself that this will take a lot of time.

This is not the "Teach yourself something in a week" stuff. 

No "human" interaction via a news group is necessary. 
And surely no "helpdesk".

The ones who want to solve a problem will read and dig out 
the information by themselves. The others will give up and 
should give up. 

mikeh@minivend.com (Mike Heins) wrote:

>> Do you really expect a "Newbie" to buy and read 4 books at the same
>> time?  I have, and am reading "Learning Perl", but I still get confused
>> sometimes.  Sorry, but my mind isn't a steel trap!  I DO, use the
>> resources available on-line but they're not very friendly... to a
>> "Newbie", the answer can be more confusing than the question.  All we
>> get from the docs is the syntax...very few examples to learn from.

>I would like the world to have more good Perl programmers. So
>when I see one who has promise, I try to help when I can.  I am
>trying to find one now for full-time employment, and it isn't easy.

>But I need steel traps. Having worked with some who aren't, I know
>that holding hands:

> 1. Takes my time.
> 2. Ultimately prevents them from learning.
> 3. Lengthens the time until the unsuccessful student finds
     out they aren't programmer material.

Teaching is always to some degree handholding, and 
any expert should decide for himself in how far he wants 
to teach or if he even can teach. 

Nobody gets forced to teach or to answer questions.
There are thousands of gifted scientist and programmers out
there who are lousy or unwilling teachers. That is known
and they just shouldn't teach.

But if you accept to teach then handholding is also a part
of it. (What is handholding anyway? - it is guidance as long 
as it is needed) And teaching and handholding  never prevents 
from learning.  

I don't believe a minute that one can enforce learning, neither
by teaching and handholding, nor by doing exactly and with
purpose the opposite.
  
One learns through several methods, imitation, trial and error, 
being taught explicitely, being guided, being thrown into the
water.

The only thing I know which really doesn't help learning
is to tell the student he should do his homework. They might
already know that...8-). 


Myles Barrett Williams <a@b.c.d>

>>Jonathan Feinberg <jdf@pobox.com> writes:
>> Now, nobody here minds answering questions.

> I'd have to differ with you, Jonathan.  There are *some* people
> subscribing to this newsgroup (no names) who hate answering questions.
> Yet for some strange reason they do it anyway, until it burns them
> out.

The reason might not be so strange, but as human as anything else.
Experts need to be recognized as experts and this forum is a way
to let the world know. Who wants them to blame for that, especially
if it helps so many of us. 

> 
> > There are pleanty of mentors at the University.  They get paid, and
> > they're called professors, tutors, teaching assistants, etc.
> 

Yes, go to school, but don't waste your money, read the books first. And
never forget how much a good five minute joke of a smart expert costs
you when he teaches in real life (my calculations for a private
university class comes to around $80.00 for five minute joke). 


Josh Carter <josh@removethis.spies.com

> Above all, I think posters to any comp.lang.* newsgroup should receive
> some minimum baseline of respect, since programming isn't an easy thing
> to everyone. I've coached plenty of people through various programming
> tasks I consider trivially easy, and I admit it takes a conscious effort
> on my part to remember they are very intelligent people; they just don't
> have the background or "programmer's mindset" that I've aquired through
> many years of hacking around and asking trivially easy questions myself.

IMHO, if it is really a conscious effort you have to make to remember
that people who don't program and may just want to try it out
have also somethings in their brains (and hearts), you need a brake
from your computer and deal with other more mundane life issues for 
a while.


cberry@cinenet.net (Craig Berry)

> I categorically refuse to respect an individual who would rather waste the
> time of thousands of people than do five minutes of reading.  It seems
> others on this group agree with me.  No, programming is not an easy thing;
> I think part of the problem is that people *expect* it to be easy, expect
> to be able to approach it as one would a (say) Windows word processor --
> playing with it to learn, rather than reading a single word of the doc
> (on- or offline).  This simply will not work, and those who expect it to
> need an awakening, rude or otherwise. 

No, I don't think people *expect* programming to be easy, they just 
don't know, what really is involved. And they can't know it. So they
will make their experience and learn that it is not easy. Period.

I don't know why one would get upset about the fact that people
new to programming and the web go through experiences. There is 
no rude awakening necessary caused through intervening expert's 
"teach you a lesson" attitude.

The programming in itsself does that job of awakening you 
nicely by itsself.

All you need to do to protect yourself from burn out in answering
questions is just not to answer them, if you know they can be found
online or in books. 

I for myself admire and am grateful to the experts who give answers 
to well put questions. There is no better source of finding stuff 
than in mailing list archives. 

So thanks to all of you who can - and do - and like to give -  
still - some answers to some questions. 
 
Birgitt Funk


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

Date: Mon, 16 Mar 1998 08:11:20 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Listing subdirectories...
Message-Id: <3510de97.4344787@news.tornado.be>

Jonathan Feinberg <jdf@pobox.com> wrote:

>Remember that the
>dot in a regex does not match a literal dot.

Oh yes it does. But not just dots.

	Bart.


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

Date: Mon, 16 Mar 1998 09:43:13 +0100
From: "Martin Vorlaender" <mv@pdv-systeme.de>
Subject: mirror 2.8 on NT
Message-Id: <6eiong$tmo$1@tpl-news.bs.tpl.net>

Hi!

I'm trying to get mirror 2.8 to run on an NT system (4.0; Perl 5.004_04,
compiled from the standard distribution). Unfortunately, mirror relies
heavily on alarm()s, which aren't implemented in my version of perl.
Do I have to reinvent the mirroring wheel, or is there a simple
(or even not so simple) solution?

cu,
  Martin
-- 
                    | Martin Vorlaender         VMS & WNT programmer
 OpenVMS  --        | work: mv@pdv-systeme.de
 Where do you want  |       http://www.pdv-systeme.de/users/martinv/
 to BE today?       | home: martin@radiogaga.harz.de




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

Date: Mon, 16 Mar 1998 12:16:15 GMT
From: feigenb@hcs.harvard.edu (Lee Feigenbaum)
Subject: New Error Message - @INC
Message-Id: <350e171a.27392464@news.fas.harvard.edu>

I fixed my earlier problem, and now I"m haivng a new strange problem:

Because of very annoying finickiy behavior by my ISP, I have CGI.pm in
a local directory (cgi-lib), and at the top of my Perl script I have:

use lib '{full-path}/cgi-lib';
use CGI qw(:cgi);

lib.pm is in /usr/lib/perl5/

/usr/lib/perl5/ is in @INC (I tried jsut prinitng out @INC, it was
there)

When I run the script from the command line:

 ./foo.cgi 

There are no errors (no errors when invoked with -w, either), and I
get CGI.pm's offline debugging mode. Great.

Now I go to the web, and I get an internal server error. I check the
error_log, and see:

Can't locate lib.pm in @INC at /www/htdocs/cgibin/foo.cgi line 7.
BEGIN failed--compliation aborted at /www/htdocs/cgibin/foo.cgi line
7.

Any idea what's going on?

Thanks again,
Lee


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

Date: 16 Mar 1998 13:15:39 +0100
From: Casper Kvan Clausen <ckc@dmi.dk>
Subject: Re: newbie's 1st question
Message-Id: <wvpk99u25n8.fsf@pratt.ejoper.dmi.min.dk>

anderst@_NO_UCE_OR_SPAM_algonet.se (Anders Thelemyr) writes:

> cberry@cinenet.net (Craig Berry) said:
> >You definitely should buy a book -- two, in fact.  _Learning Perl_ to 
> >learn the language, _Programming Perl_ for reference and to get into more 
> >esoteric topics.
> 
> Does anyone know if these books have been translated into Swedish?
> I read and and write English fairly well but it could get quite tiresome to
> try to learn a programming/scripting language in English especially if
> you're (like me) new to programming...

Well, the entire language is built around English, as is all the
documentation. If you see yourself as programming in the future, you
might as well get used to reading technincal documentation in
English. I actually happen to think that reading the books in [insert
national language here] would be detrimental to further learning,
since you would have to pick up new idioms for concepts you'd already
familiarized yourself with. In fact, I make it a point to never read
Danish books about anything computer related, unless I absolutely have
to. Translations of such books are, in my experience, riddled with
errors and hard to read because the translator has less of a grasp of
the subject material than the author.

In short, I doubt they've been translated, and even if they had been,
you'd do yourself a favor by reading the English versions
instead. YMMV, of course.

Regards,
Kvan.
-- 
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- |  unattempted is impossible.'
           Lokal  544            |   
I do not speak for DMI, just me. |        - Lord Mhoram, Son of Variol.      


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

Date: Mon, 16 Mar 1998 07:44:33 GMT
From: ken@elsop.com (Ken Churilla)
Subject: Re: password protection for web site?
Message-Id: <350dd7fc.360577503@nntp1.ba.best.com>

On Thu, 12 Mar 1998 07:49:07 GMT, geoff.cox@cableinet.co.uk (Geoff Cox)
wrote:

>Hello,
>
>How doe I go about making my web site password protected? - and indeed
>does it work?? Cann't anyone just get to a page "beyond" the password
>protected page???

It works if you use the server features. Yes, someone can get beyond the
protected page if it is not set up properly. No, they can't if done right.

The following information:

Password or User Authentication 
        Apache Week Feature: Using User Authentication 
        Mosaic User Authentication Tutorial 
        So You Want A Password Protected Page, Huh? 

is covered in the Reference Room of

The Elsop Webmaster Resource Center at this URL:

http://www.elsop.com/wrc/refroom

Most password protection is done from the server and
your internet service provider must allow for it. There
are less secure ways of doing this with Java or javascript but
that requires a Java or javascript enabled browser. Since
many people do not use those browsers, the server solution
is best.

Ken Churilla
http://www.elsop.com/linkscan/
LinkScan - The best link checker & Site Mapper available.


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

Date: 16 Mar 1998 08:45:18 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: Re: Perl and Windows NT question
Message-Id: <6eioqu$1r0$1@bsdti6.sdm.de>

In article <6ehi0s$72t$1@news.fsu.edu>, Eric Smith <ecs@talstar.com> wrote:

> A week ago I installed the lastest version of ActiveStates Perl on my NT
> machine. I set up up the registry and all that good stuff. I placed my perl
> scripts in the scripts directory. Called them from the browser and they
> worked beutifully. A couple days ago my boss gave me the latest tech-net cd
> with the NT Option Pack 4 on it. I installed it and now I'm geting an error
> when I run my scripts from the browser. They still work perfectly from the
> DOS prompt but I get the following error in the browser window:

> Cgi Error

> The specified CGI application misbehaved by not returning a complete set of
> HTTP headers. The headers it did return are:

> Can't open perl script
> "??????????????????????????????1??????????????E??????????????????????E??????
> ?????????????c??c"; Invalid argument.

> I have messed around with the Server config in the Management Console, but
> nothing major. I know I've got all the newline characters correct and all
> that. In fact I went to a site that had a test script on it and got the same
> error. I'm not an Internet Information Server guru so I really don't know
> what to do. When I first installed NT it put a version of IIS on the machine
> called Peer Web Services. When I put the NT Option Pack 4 on it changed that
> to Personal Web Server and put a cheesy homepage builder on my machine.

> Any help is appreciated. Thanks in advance.

> Eric

Forget ActiveState's ports. They're not up to date (not the latest Perl
versions), and they have all these problems you described.

Get the "Perl for Win32" port by Gurusamy Sarathy instead!

Not only does it install absolutely easily, but it also contains many
useful modules from CPAN in precompiled form - i.e., you don't have to
compile or install them, just use them!

Moreover, the port supports MakeMaker right out of the box!

You just need a C compiler (Borland C++ or MS Visual C++) and then you
can install additional modules as easily as in Unix:

perl Makefile.PL
dmake
dmake test
dmake install

(with MSVC, use "nmake" instead of "dmake").

(Hint: Install the C compiler first before installing the Perl port!)

And finally, the port is quite up to date (Perl 5.00402).

The port is available from http://www.perl.com/CPAN/authors/id/GSAR/.

Do it! You won't regret it!

Yours sincerely,
-- 
     Steffen Beyer <sb@sdm.de>
  Feel free to visit my download area with free software at
     http://www.engelschall.com/u/sb/download/


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

Date: Mon, 16 Mar 1998 00:17:51 -0800
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Re: Problem stripping Mac headers off of GIF's
Message-Id: <6ein44$f0p@bgtnsc03.worldnet.att.net>

Unless the file is being copied onto a Mac, or onto an NT system with NTFS
and File Services for Macintosh, the resource fork will be stripped out
anyway, so that's not a problem. Unless, of course, the resource fork has
some of the information you need . . .



Lasse Hillerxe Petersen wrote in message ...
>In article <schinder-1303981752560001@schinder.clark.net>,
>schinder@leprss.gsfc.nasa.gov wrote:
>
>>available at <ftp://ftp.clark.net/pub/schinder/Conversions.pm>, which you
>>might want to look at.
>>
>>My guess is that you can make the files usable simply by discarding the
>>first 128 bytes.
>
>If the files are created with something (PhotoShop) that adds a thumbnail
>icon, then the file _will_ have a resource fork, and in that case, just
>skipping 128 bytes may not be enough. I haven't looked at your
>Conversion.pm, but I guess that is the safest route, if automatic,
>unattended conversion is what is desired.
>
>-Lasse




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

Date: Mon, 16 Mar 1998 09:11:20 GMT
From: Haaino Beljaars <Beljaars@fys.ruu.nl>
Subject: proces killer
Message-Id: <350CECB8.A64AF678@fys.ruu.nl>

Hi,

I have a simple problem. I am currently running a simple apache http
daemon. Everybody my execute .cgi's. The only problem is that some .cgi
processes don't terminate. I want to use a perl to kill a .cgi proces
after 10 minits. The only thing I know is that the user 'nobody' is the
owner of the proces and it has an .cgi extension. How do I do that?


-- 
Greetings from Haaino Beljaars

--------------------------------------------------
E-Mail:         Beljaars@fys.ruu.nl              -
Home Page:      HTTP://www.fys.ruu.nl/~beljaars/ -
File not found. Should I fake it? (Y/N)          -
Beware of programmers who carry screwdrivers.    -
--------------------------------------------------


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

Date: Mon, 16 Mar 1998 09:43:28 GMT
From: systech@polarnet.com (Ken Irving)
Subject: Re: Reading excel files under Unix
Message-Id: <350cf2f6.281136462@news.polarnet.com>

On Sat, 14 Mar 1998 18:26:58 -0500, "Tom" <nelson24@insight.att.com>
wrote:

>I am looking for a module or any information that may be helpful
>for reading MS excel files with perl on Unix systems.
>
>Thanks in advance
>Tom
>
The OLE-Storage module might have what you're looking for, available
at:

    http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/index.html

    http://www.cs.tu-berlin.de/~schwartz/pmh/index.html

<from readme>

What is Structured Storage?

It's the binary data format of standard Microsoft Windows OLE
documents. 

Hitherto it was only safe to deal with Windows documents at Windows
operating systems. OLE::Storage is an interface for all operating
systems.

</from readme>

Hope this helps.

Ken




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

Date: 16 Mar 1998 07:37:28 GMT
From: ehp-remove_this@gte.net (Ethan H. Poole)
Subject: Re: removing everything between < and >
Message-Id: <6eikro$h2a$1@gte1.gte.net>

In article <350CBB9F.B9FA59F9@eecs.berkeley.edu>, yashesh@eecs.berkeley.edu 
says...
>
>hi all!
>I have tried the perl documentation but was not able to find any source
>for my following problem:
>I would like to remove everything between '<' and '>' in a line and for
>all the instances.  I am trying to work out a script that basically
>removes all the formatting tags in an HTML document.  For the script:
>-----------
>$line = "This is <strong>strong</strong> and this is <b>bold</b> and
>this is plain text.";
>$line =~ s/<.+>//g;
>print $line;

How about:

 $line =~ s/<[^>]*>//g;

Note: The above example *will* run into problems if '<' or '>' actually appear 
in the desired text (in the text they should be represented as &lt; and &gt; or 
if each '<' is not properly matched with its corresponding '>'.

-- 
Ethan H. Poole
* ehp @ gte . net *
http://home1.gte.net/ehp/



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

Date: Mon, 16 Mar 1998 07:45:32 GMT
From: Eric Wong <egwong@netcom.com>
Subject: Re: removing everything between < and >
Message-Id: <egwongEpwIvx.5K9@netcom.com>

Yashesh Shroff <yashesh@eecs.berkeley.edu> wrote:
: hi all!
: I have tried the perl documentation but was not able to find any source
: for my following problem:
: I would like to remove everything between '<' and '>' in a line and for
: all the instances.  I am trying to work out a script that basically
: removes all the formatting tags in an HTML document.  For the script:
: -----------
: $line = "This is <strong>strong</strong> and this is <b>bold</b> and
: this is plain text.";
: $line =~ s/<.+>//g;
: print $line;
[ cut ]

What you want is
  $line =~ s/<.+?>//g;

Look for the term "greedy" in the perlre manpage.

[cc'd]


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

Date: 16 Mar 1998 09:34:40 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Splitting Arrays/Variables
Message-Id: <890040880.215201@cabal>

In <6eieng$e0a@bgtnsc02.worldnet.att.net> Jesse Rosenberger <jesse@savalas.com> writes:

>Question #1: I have a array named @arr, that has 4 numbers in
>it...numbers differ every time with a number 1-4...but the array
>contents look like "4 3 2 1", how can I split this array into 4 seperate
>variables...

($anum,$bnum,$cnum,$dnum)=@arr;

>Question #2: How can you take a variable that contains a word....that
>may contain spaces...and break each letter into a seperate
>variable...

@arr=spilt //,$word;

Then use the above trick to stick into verables.  Or you might just wish
to do it all in one go.

--
Please excuse my spelling as I suffer from agraphia see the url in my header. 
Never trust a country with more peaple then sheep. 
Support NoCeM http://www.cm.org/                   
I'm sorry but I just don't consider 'because its yucky' a convincing argument


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

Date: 16 Mar 1998 10:23:20 -0000
From: aeb@brains.cartoon.bt.co.uk (Tony Bass)
Subject: Re: User-interface Quandary
Message-Id: <6eiuio$fep$1@brains.cartoon.bt.co.uk>

> Tom Christiansen (tchrist@mox.perl.com) wrote on 1655 September 1993 in
> <URL: news:6ebsam$lfv$1@csnews.cs.colorado.edu>:
> ++ 
> ++ In short, they compile into this, searching for "Fred"
> ++ 
> ++     Anywhere		    /Fred/
> ++     Whole Words Only 	    /\bFred\b/
> ++     Entire Field	    /^Fred$/
[...]

Another possibility is to illustrate, using a non-computer notation
such as ellipses,

   Looking like
      ...Fred...
      ... Fred ...
      Fred

but the distinction between anywhere and word may be a bit too subtle.

    Tony Bass

-- 
# A E Bass                                      Tel: (01473) 645305
# MLB 3/19, BT Laboratories                     e-mail: aeb@saltfarm.bt.co.uk
# Martlesham Heath, Ipswich, Suffolk, IP5 7RE   DO NOT e-mail to From: line
#                                               Opinions are my own


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

Date: Mon, 16 Mar 1998 11:59:15 +0000
From: Alan Silver <alan@consultancy-services.ferret.com>
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <i4xuWHATQRD1Ewiw@consultancy-services.com>

John Porter <jdporter@min.net> wrote ...
>The word is Spanish. "Java" in Spanish is pronounced
>"Hava", and is a reference to the famous Jewish dance.
>It is rumored that the name is a secret reference to
>a cabal of Sephardic scholars in Spain, contemporaries
>of Blaise Pascal.  Apparently these scholars had
>developed a rudimentary algorithmic symbolic language.
>(Wasn't Lord Byron a closet Jew?)
>
>John Porter

Sorry to disappoint you, but you seem to have been badly misinformed
here. There word "hava" in Hebrew (which is what you were referring to
above) actually means "come along" as in the dance/song to which you
referred - "hava nagila" which means "come along and let's dance". Any
rumours about secret cabals of scholars is almost certainly a wild
invention of someone's undertaxed mind.

Sorry to be off-topic, but you were off-topic and off-planet :-)

Alan

P.S. No idea about Lord Byron.


NOTE - In order to discourage unsolicited e-mail, the address in the
header may have .ferret added. Please remove this before replying.

-- 

Sent By   : Alan Silver 
Fish Page : http://www.geocities.com/Heartland/Hills/6749/fishtank.html

It's not an optical illusion, it just looks like one


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

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

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