[15886] in Perl-Users-Digest
Perl-Users Digest, Issue: 3299 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 9 03:05:25 2000
Date: Fri, 9 Jun 2000 00:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <960534310-v9-i3299@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 9 Jun 2000 Volume: 9 Number: 3299
Today's topics:
Re: ActiveState mailing lists <jand@activestate.com>
Re: Activeware perl 313 and makemake.pm <jand@activestate.com>
Any Perl experts around? farahas@my-deja.com
Re: How to turn off "Deep recursion" warnings? (Gwyn Judd)
Re: How to turn off "Deep recursion" warnings? (Gwyn Judd)
Re: How to turn off "Deep recursion" warnings? (Gwyn Judd)
JPG img <stephane@siw.ch>
Re: Larry Rosler interview on perl.com! <lr@hpl.hp.com>
Re: Larry Rosler interview on perl.com! (Gwyn Judd)
Re: Larry Rosler interview on perl.com! <lr@hpl.hp.com>
Re: Linux/Perl classes (David H. Adler)
logarithms <cybertoast@nopoop.mindless.com>
Re: logarithms (Prasanth A. Kumar)
Re: logarithms (Neil Kandalgaonkar)
Need a hand with this piece of code...... root@rady.zzn.com
Re: Newbie.. Sorry.. (SASprgmr)
Re: No offense but Larry Wall should do the maths !! <lr@hpl.hp.com>
perl and odbc 309666@my-deja.com
Re: Perl vs Python for Numerical Analysis <mck@iag.net>
Re: Perl vs Python for Numerical Analysis <mck@iag.net>
Recruiting for a perl CGI expert <russellb@decideinteractive.com>
windows -> perl = no longer work <ab@cd.com>
Re: windows -> perl = no longer work (Neil Kandalgaonkar)
Re: windows -> perl = no longer work <lr@hpl.hp.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 09 Jun 2000 05:48:55 GMT
From: Jan Dubois <jand@activestate.com>
Subject: Re: ActiveState mailing lists
Message-Id: <nm01ksgvsicm5foe8atunigs31dtmh0pg1@4ax.com>
[mailed & posted]
"Borkur Gudjonsson" <borkur@netverk.net> wrote:
>Does anyone know why ActiveState's mailing lists are down?
The mailing list software started bringing down the whole website every 5
minutes or so. The offender seems to be a corrupted Lyris database. This
was kind of the last straw that broke the camel's back: the mailing lists
have been moved to Mailman.
Unfortunately the extraction of the user lists from the dormant Lyris
database didn't go very well; lots of people who unsubscribed a long time
ago where resubscribed and people where switched from digest to non-digest
mode. This created a big uproar as many people felt spammed by the flood
of messages.
All these complains have been delivered through the lists etc ... As an
emergency measure, the new lists have been switched to moderated status to
filter out administrative messages and complaints and to give everyone a
chance to unsubscribe / switch back to digest mode. Unfortunately it
looks like the server (or at least the web interface is down again).
>And, when will they be back up?
I have no idea. People are working on it, but it is all a big mess right
now.
Sorry for the inconvenience. I know that this should have been handled
differently.
-Jan
------------------------------
Date: Fri, 09 Jun 2000 05:38:24 GMT
From: Jan Dubois <jand@activestate.com>
Subject: Re: Activeware perl 313 and makemake.pm
Message-Id: <hi01ks4art3sv5qtbmrmb308grb46ic6e9@4ax.com>
[mailed & posted]
"Paul D.Smith" <pds@x-datcon.co.uk> wrote:
>Anyone hit this? I have tried to install some Perl libraries (libnet) but
>have found that ExtUtils/MakeMaker.pm is absent. This is with the Windows
>NT Activeware port of Perl (build 313). Anyone know the "correct" solution
>to this?
The "Perl for Win32" series (3xx) doesn't support MakeMaker at all. You
only solution is to either upgrade or to "manually" install the modules
(if they even work under Perl 5.003_07). This should be relatively easy
for Perl-only modules, but for XS code it is almost hopeless.
-Jan
------------------------------
Date: Fri, 09 Jun 2000 04:11:56 GMT
From: farahas@my-deja.com
Subject: Any Perl experts around?
Message-Id: <8hpqq3$5gf$1@nnrp1.deja.com>
Hi guys I recently registered on www.qsupport.com, they have an
interesting referral programe running.
They are in the process of creating a database of computer experts
around the world, to help solve all computer realted problems.Think its
a nice idea.
Farah
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 09 Jun 2000 05:03:42 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: How to turn off "Deep recursion" warnings?
Message-Id: <slrn8k0uq1.4pe.tjla@thislove.dyndns.org>
I was shocked! How could Larry Rosler <lr@hpl.hp.com>
say such a terrible thing:
>In article <slrn8jvlc7.r67.tjla@thislove.dyndns.org> on Thu, 08 Jun 2000
>17:16:36 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> says...
>
>...
>
>> If you call this with (say) arguments 3,8 then you get hundreds and
>> hundreds of "Deep recursion..." warnings. Is there any way to turn these
>> off for a situation like this when you know the algorithm terminates?
>
> $SIG{__WARN__} = sub { };
ta very much works fine :)
>> #!/usr/bin/perl -w
>
>Had you put 'use strict;' in here, you would have discovered that the
>array @vals and the scalar $vals have nothing to do with each other.
d'oh thanks for that. The reason I didn't was when I was fiddling round
with Benchmark I couldn't get the "timethese" sub's to see the $x and $y
variables, since they were delared with "my" I guess. I changed those to
"use vars" and it was fine.
--
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
Indecision is the true basis for flexibility.
------------------------------
Date: Fri, 09 Jun 2000 05:04:56 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: How to turn off "Deep recursion" warnings?
Message-Id: <slrn8k0usb.4pe.tjla@thislove.dyndns.org>
I was shocked! How could Abigail <abigail@arena-i.com>
say such a terrible thing:
>On Thu, 8 Jun 2000 14:00:23 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
>++ In article <slrn8jvlc7.r67.tjla@thislove.dyndns.org> on Thu, 08 Jun 2000
>++ 17:16:36 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> says...
>++
>++ ...
>++
>++ > If you call this with (say) arguments 3,8 then you get hundreds and
>++ > hundreds of "Deep recursion..." warnings. Is there any way to turn these
>++ > off for a situation like this when you know the algorithm terminates?
>++
>++ $SIG{__WARN__} = sub { };
>
>Or:
>
> no warnings 'recursion';
>
>which can be localized to the sub.
hmm I tried this just now in my Benchmark'ed version I still got the
warnings, whereas Larry's version hid them. Why was that?
--
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
Meekness: Uncommon patience in planning a revenge that is worth while.
-- Ambrose Bierce
------------------------------
Date: Fri, 09 Jun 2000 05:06:59 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: How to turn off "Deep recursion" warnings?
Message-Id: <slrn8k0v06.4pe.tjla@thislove.dyndns.org>
I was shocked! How could Larry Rosler <lr@hpl.hp.com>
say such a terrible thing:
>In article <slrn8jvlc7.r67.tjla@thislove.dyndns.org> on Thu, 08 Jun 2000
>17:16:36 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> says...
> $SIG{__WARN__} = sub { };
>
>Had you put 'use strict;' in here, you would have discovered that the
>array @vals and the scalar $vals have nothing to do with each other.
Here, this version terminates with a core dump. I'm using 5.6.0. If I
take out the 'memo' one it runs fine:
#!/usr/bin/perl -w
use strict;
use integer;
use Memoize;
use Benchmark;
$SIG{__WARN__} = sub { };
my @vals;
sub ack_memo {
my ($x, $y) = @_;
return $vals[$x][$y] if $vals[$x][$y];
return $vals[$x][$y] = $y + 1 if ($x == 0);
return $vals[$x][$y] = ack_memo($x - 1, 1) if ($y == 0);
return $vals[$x][$y] = ack_memo($x - 1, ack_memo($x, $y - 1));
}
sub ack {
my ($x, $y) = @_;
return $y + 1 if ($x == 0);
return ack($x - 1, 1) if ($y == 0);
return ack($x - 1, ack($x, $y - 1));
}
sub ack2 {
my ($x, $y) = @_;
return $y + 1 if ($x == 0);
return ack2($x - 1, 1) if ($y == 0);
return ack2($x - 1, ack($x, $y - 1));
}
memoize('ack');
use vars qw($x $y);
($x, $y) = @ARGV;
timethese(10, {
'memo' => '$result = ack($x, $y)',
'no-memo' => '$result = ack2($x, $y)',
'memoized' => '$result = ack_memo($x, $y)',
});
--
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
My, how you've changed since I've changed.
------------------------------
Date: Fri, 09 Jun 2000 06:13:52 GMT
From: "Chello" <stephane@siw.ch>
Subject: JPG img
Message-Id: <AW%%4.36905$yR.527694@news.chello.at>
Hi,
I'd like to know how to dispklay a JPG picture. I know how to do it with GIF
but not with JPG. Does anybody have a solution?
Thanks in advance.
Stéphane
------------------------------
Date: Thu, 8 Jun 2000 21:59:40 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <MPG.13aa1993fddd4cb598ab52@nntp.hpl.hp.com>
In article <MSY%4.106864$hT2.426465@news1.rdc1.ct.home.com>,
dan@tuatha.sidhe.org says...
> Larry Rosler <lr@hpl.hp.com> wrote:
>
> > Perl is defined by a single official open source. It is a deterministic
> > computer program. The most arcane DWIMmery is deterministic, hence
> > definable. Without looking, I'll bet there isn't a single call to
> > rand(3C) anywhere in the perl source.
>
> And you'd probably be wrong. (Depending on what Configure found, of
> course) How else do you think the rand operator generates its data? :)
I meant called by the compiler, of course, not made available as a pass-
through from user Perl code. But I think you knew what I meant. :-)
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 09 Jun 2000 05:43:34 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <slrn8k114q.4pe.tjla@thislove.dyndns.org>
I was shocked! How could Neil Kandalgaonkar <nj_kanda@alcor.concordia.ca>
say such a terrible thing:
>(Larry Rosler, speaking in the interview)
>
>>:LR: I believe that it does, in order to increase its acceptability.
>>:Many organizations either cannot or will not endorse the use of
>>:unstandardized languages in their business-critical activities.
>
>I am wondering how standardized things like Visual Basic are. (Maybe
>it is -- although I sincerely doubt it! Any independent implemenations
>of Visual Basic yet?) Yet many companies seem willing to trust it
www.realbasic.com (I think)
--
Gwyn Judd (tjla@guvfybir.qlaqaf.bet)
My return address is rot13'ed
Campus sidewalks never exist as the straightest line between two points.
-- M. M. Johnston
------------------------------
Date: Thu, 8 Jun 2000 22:41:53 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Larry Rosler interview on perl.com!
Message-Id: <MPG.13aa237db8d569bc98ab53@nntp.hpl.hp.com>
In article <8hpp08$t7i$1@newsflash.concordia.ca>,
nj_kanda@alcor.concordia.ca says...
> (Larry Rosler, speaking in the interview)
>
> >:LR: I believe that it does, in order to increase its acceptability.
> >:Many organizations either cannot or will not endorse the use of
> >:unstandardized languages in their business-critical activities.
>
> Pardon my ignorance of standardization but, which organizations are
> those?
>
> I am wondering how standardized things like Visual Basic are. (Maybe
> it is -- although I sincerely doubt it! Any independent implemenations
> of Visual Basic yet?) Yet many companies seem willing to trust it
> with their business-critical activities.
>
> I am not arguing that what Microsoft does is a model to follow, but
> I don't see many businesses carping about standardization.
Standardization may be 'de jure' or 'de facto'. Because of its
monopolistic clout, anything Microsoft promulgates by itself is de facto
standardized. They tried to subsume and subvert the de facto
standardization of Java to their own purposes, but have failed so far.
And I have been told that Visual C++ is a travesty of the C++ Standard.
Perl is in fact already de facto standardized (because of the single
official source), but the definition is vague and there is no corporate
clout to support it. That is why I believe a more formal, de jure
activity is required.
But the Open Source movemet may be creating a new paradigm for
standardization. We shall see!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 9 Jun 2000 06:08:01 GMT
From: dha@panix.com (David H. Adler)
Subject: Re: Linux/Perl classes
Message-Id: <slrn8k12e1.ssn.dha@panix6.panix.com>
On Thu, 08 Jun 2000 08:31:18 -0400, Drew Simonis
<care227@attglobal.net> wrote:
> Brian D. Foy.
Ahem.
http://www.brian-d-foy.com/style.html
Please observe. Thank you.
dha, Sergeant-at-arms
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
Trained Philosopher: Will Think For Food
- R. Dan Henry
------------------------------
Date: Fri, 09 Jun 2000 00:16:42 -0500
From: Sundar <cybertoast@nopoop.mindless.com>
Subject: logarithms
Message-Id: <39407DBA.A07E2950@nopoop.mindless.com>
The perl function log() is actually a natural log (base e). Is there
some way to get a base 10 log (a mathematical log, as opposed to ln)? I
looked at the Math modules, but don't see anything obvious - maybe I
missed something?
Thanks much.
------------------------------
Date: Fri, 09 Jun 2000 05:04:47 GMT
From: kumar1@home.com (Prasanth A. Kumar)
Subject: Re: logarithms
Message-Id: <m3wvjza1hv.fsf@C654771-a.frmt1.sfba.home.com>
Sundar <cybertoast@nopoop.mindless.com> writes:
> The perl function log() is actually a natural log (base e). Is there
> some way to get a base 10 log (a mathematical log, as opposed to ln)? I
> looked at the Math modules, but don't see anything obvious - maybe I
> missed something?
>
> Thanks much.
log10(x)=ln(x)/ln(10)
--
Prasanth Kumar
kumar1@home.com
------------------------------
Date: 9 Jun 2000 05:22:23 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: logarithms
Message-Id: <8hpuuf$mlt$1@newsflash.concordia.ca>
In article <39407DBA.A07E2950@nopoop.mindless.com>,
Sundar <cybertoast@nopoop.mindless.com> wrote:
>The perl function log() is actually a natural log (base e). Is there
>some way to get a base 10 log (a mathematical log, as opposed to ln)? I
>looked at the Math modules, but don't see anything obvious - maybe I
>missed something?
perldoc -f log
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: Fri, 09 Jun 2000 05:58:39 GMT
From: root@rady.zzn.com
Subject: Need a hand with this piece of code......
Message-Id: <8hq129$9l7$1@nnrp1.deja.com>
foreach $match (@matches){
($category,$item,$mfg) = split(/\|/, $match);
print Tr(td[$category, $item]);
}
Can anyone suggest a way I can create a hyperlink in line 3 so the
value of $item is returned to the browser as a link pointing to an URL?
Thanks in advance!
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 09 Jun 2000 04:09:28 GMT
From: sasprgmr@aol.com (SASprgmr)
Subject: Re: Newbie.. Sorry..
Message-Id: <20000609000928.26416.00002210@ng-fh1.aol.com>
Forget about Learning Perl by O'Reilly. I found the Perl Cookbook (the Ram
book) to be much more useful.
Jay
------------------------------
Date: Thu, 8 Jun 2000 22:53:24 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: No offense but Larry Wall should do the maths !!
Message-Id: <MPG.13aa262b43666a4c98ab54@nntp.hpl.hp.com>
In article <8hpi5h$i08$1@news3.isdnet.net>, TheEx0rcist@fanclub.org
says...
> > Yes, but there is no multiplication in the first example.
> >
> > Try it again with '+' instead of '*'. You will get a perhaps more
> > useful warning than the one with '*'. (Please don't tell me you posted
> > snippets like that without testing them with warnings on!).
> >
> > Hint for the truly lazy: Try it again with rand() instead of just rand.
>
>
> THANK YOU
>
> Now I understand my mistake
Good. That makes you and only one other of the many responders to this
thread (Jon Ericson) who understand what is happening here.
You owe an apology to Larry Wall, not that I think he is likely to care
about your presumptuous insults.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Fri, 09 Jun 2000 05:37:49 GMT
From: 309666@my-deja.com
Subject: perl and odbc
Message-Id: <8hpvrb$8sq$1@nnrp1.deja.com>
how do i write input to a table through a odbc link?
is it just write a script like if I was write to a flat file but instead
of say:
open (OUTPUT, ">>/whatever/file.txt");
i write the INSERT statement?
INSERT INTO blabla...
if you have a functioning example, Please send to me
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 09 Jun 2000 01:49:00 -0400
From: Matt <mck@iag.net>
Subject: Re: Perl vs Python for Numerical Analysis
Message-Id: <tm01ksg6pr4d851asadr6jfj9j10ifivvh@4ax.com>
On 02 Jun 2000 17:55:45 GMT, zenin@bawdycaste.org wrote:
> Convincing Python advocates that Perl is anything beyond the spawn
> of Satin is typically a lost cause...they typically just won't
> listen. :-(
Not all of us...some just prefer the Python route, for a variety of
reasons, but we can recognize that there is no one (and only one)
correct tool for any task. Perl did not gain it's wide acceptance
without being very capable, and the same can be said of Python's
increasing popularity.
The "truly evil" are those who attempt to force us to follow their
ways, because they "know better", when in reality they are only
protecting their position despite their narrow viewpoint or experience
range. Then there are those who make decisions because they have been
driven from the path of the righteous, by the demons of board-room
marketing ;)
------------------------------
Date: Fri, 09 Jun 2000 01:51:13 -0400
From: Matt <mck@iag.net>
Subject: Re: Perl vs Python for Numerical Analysis
Message-Id: <0b11kskojeb3442db3mp7nej7vk49stebg@4ax.com>
Have you considered posting this to comp.lang.python?
Naturally you will get some biased opinions, but I believe that there
is a good chance you will get some objective opinions as well.
On Fri, 2 Jun 2000 10:20:26 -0700, Larry Rosler <lr@hpl.hp.com> wrote:
>I have been considering joining a team that is heavily into numerical
>analysis, specifically image processing. The leader of the team (who
>considers himself a physicist, not a programmer) vigorously advocates
>Python,
[snip]
>I would appreciate help in understanding these issues. The 'Perl vs.
>Python' article
><URL:http://www.perl.com/pub/language/versus/python.html>
>was posted by Tom Christiansen on June 2, 1995 (Happy Fifth Birthday!),
>and can hardly be presumed to reflect current reality.
------------------------------
Date: Fri, 9 Jun 2000 14:26:10 +1000
From: "Russell Banks" <russellb@decideinteractive.com>
Subject: Recruiting for a perl CGI expert
Message-Id: <394071bc@pink.one.net.au>
If you fit the following job description, please contact us by email
Technical Director
Purpose of Role
To develop and implement the technical infrastructure so that Decide
Interactive can provide reliable, and efficient, internet marketing services
to their clients.
Direct Reports
? Search Engine Specialists
? Marketing Engineers
Reports to
CEO
Primary responsibilities
? Ultimate responsibility for the technical architecture of Decide
Interactive product sets
? Integration of affiliate marketing software into a common reporting
system, based on log file analysis
? Develop and implement a web enabled reporting system, with various levels
of secure access
? Development and supervision of the Decide Interactive Client Extranet for
online traffic reporting
? Supervise a team of technical marketing specialists, including search
engine specialists
? Development of disaster recovery procedures
? Provisioning of appropriate hardware, bandwidth and firewalling
? Evaluate product/enhancement suggestions and commission or develop a
business case for implementation where appropriate.
? Work to prioritise, plan and launch new features and products
? Fully document the techniques and strategies employed by the company in
all online marketing techniques and new techniques developed in the market
place.
? Build a corporate knowledge base of online marketing skills and techniques
and make this available to the Decide Interactive operations around the
world.
Secondary Responsibilities
? Run client development partner and test programs to validate new products
in the marketplace
? Keep abreast of new technologies to ensure Decide Interactive remains at
the leading edge and ahead of its competitors.
? Train personnel in sales, marketing and production areas in the features
and benefits of new products
? Assist in the development of technical architecture for all external
client marketing web sites including scripting, database design, and user
interface design.
? Manage the implementation, security and provision of externally hosted FTP
sites.
? Stay abreast of industry trends and all applicable technologies, including
scripting, security issues, authoring tools, graphic design tools, and new
languages.
? Manage and administer all aspects of provider billing.
? Participate in Corporate change control procedures and methodology.
? Recommend changes to this set of responsibilities as the company and your
position evolves.
Skills & Experience Required
? High level HTML skills, with extensive experience in log file and SQL
database analysis techniques, and queries.
? Programming experience in Java, Perl, Visual Basic, and similar
environments appropriate for Internet services and web development.
? Extensive experience with Internet-based services in general, such as
search engines, proxying, extranets and E-Commerce.
? Working knowledge and good understanding of IP Networking, , NT, MS
Exchange DNS, Firewalling and bandwidth provision.
? Knowledge of Active Server Pages(ASP), SQL Server, Dynamic HTML and other
similar Internet technologies
? Good interpersonal and communications skills
? Proven project management skills and excellent supervisory skills.
Work style and Attitude
? Ability to interact in a professional manner with a broad range of people
? Willing to take on challenges and to learn
? Commercial awareness
? Ability to manage multiple tasks and prioritise work
? Strong customer focus
? Self motivated
Location
Sydney, Australia
Start Date
ASAP
Duration
Permanent
------------------------------
Date: Fri, 09 Jun 2000 04:24:15 GMT
From: "Blair Heuer" <ab@cd.com>
Subject: windows -> perl = no longer work
Message-Id: <Pj_%4.31784$2X2.290742@newsread2.prod.itd.earthlink.net>
Recently my server admin changed the operating his server from Windows to
Linux. Hooray, right? Not exactly. All the little differences are making all
of my scripts, which are critical to operation, non-operational.
In one script I get a header error. Here is the start of the code:
<snippet>
#!/usr/bin/perl
print "Content-type: text/html\n\n";
</snippet>
Running the program from the command line if fine. But I get a 500 server
error from the web. Other scripts work fine with the same headers. What is
going wrong?
Any help appreciated.
------------------------------
Date: 9 Jun 2000 04:49:27 GMT
From: nj_kanda@alcor.concordia.ca (Neil Kandalgaonkar)
Subject: Re: windows -> perl = no longer work
Message-Id: <8hpt0n$6bv$1@newsflash.concordia.ca>
In article <Pj_%4.31784$2X2.290742@newsread2.prod.itd.earthlink.net>,
Blair Heuer <ab@cd.com> wrote:
>Recently my server admin changed the operating his server from Windows to
>Linux. Hooray, right? Not exactly. All the little differences are making all
>of my scripts, which are critical to operation, non-operational.
>
>In one script I get a header error. Here is the start of the code:
>
><snippet>
>
>#!/usr/bin/perl
>print "Content-type: text/html\n\n";
>
></snippet>
>
>Running the program from the command line if fine. But I get a 500 server
>error from the web. Other scripts work fine with the same headers. What is
>going wrong?
"Premature end of script headers" means that the program died before it
could print the headers. It doesn't have anything to do with the first lines
of your program, or the header you used (usually!).
Get the server error logs, they may be more informative. Or use this:
use CGI::Carp 'fatalsToBrowser';
And you *may* get the error message nicely reported in the browser.
See <http://www.perl.com/CPAN/doc/FAQs/cgi/idiots-guide.html>. Rather
old but still valid advice, especially if you're new to unix.
--
Neil Kandalgaonkar
neil@brevity.org
------------------------------
Date: Thu, 8 Jun 2000 23:00:06 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: windows -> perl = no longer work
Message-Id: <MPG.13aa27c2610b058b98ab55@nntp.hpl.hp.com>
In article <Pj_%4.31784$2X2.290742@newsread2.prod.itd.earthlink.net>,
ab@cd.com says...
> Recently my server admin changed the operating his server from Windows to
> Linux. Hooray, right? Not exactly. All the little differences are making all
> of my scripts, which are critical to operation, non-operational.
>
> In one script I get a header error. Here is the start of the code:
>
> <snippet>
>
> #!/usr/bin/perl
> print "Content-type: text/html\n\n";
>
> </snippet>
>
> Running the program from the command line if fine. But I get a 500 server
> error from the web. Other scripts work fine with the same headers. What is
> going wrong?
>
> Any help appreciated.
Possibly you transferred the file from Windows to Linux using FTP binary
mode (the default), and there is an invisible carriage-return ("\cM") at
the end of the first line, which is preventing the shell from finding
the perl executable.
Look at the file with 'vi' or 'od' or some other tool that will show
exactly what is there. Fixing it has been discussed here inordinately
many times.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 3299
**************************************