Click here to get back home

Need help with a simple (I think) Perl script

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Need help with a simple (I think) Perl script Dick Sutton 05-28-2008
Get Chitika Premium
Posted by Ted Zlatanov on May 29, 2008, 3:53 pm
Please log in for more thread options

>>
>> First of all, I did declare $Year and $Month in my original post.
>>
LS> No, you did not.

>> # get the parameters...
>> $year = param('Year');

LS> Here you define $year. Not $Year.

>> $month = param('Month');

LS> Ditto.

>> I do not need help from such as you.

LS> Welcome to the world of killfiles.

Did it perhaps occur to you that not everyone knows Perl variable names
are case-sensitive, and that not every programming language is like
Perl?

You and A. Sinan Unur are being nasty when a quick look at the original
script would have been sufficient to understand the miscommunication.

This obstinate need to insult someone because they don't know your
particular shibboleth reflects badly on the Perl community.

Ted

Posted by A. Sinan Unur on May 29, 2008, 5:05 pm
Please log in for more thread options

> On 29 May 2008 12:08:32 -0500 Lawrence Statton
>
>>>
>>> First of all, I did declare $Year and $Month in my original post.
>>>
> LS> No, you did not.
>
>>> # get the parameters...
>>> $year = param('Year');
>
> LS> Here you define $year. Not $Year.
>
>>> $month = param('Month');
>
> LS> Ditto.
>
>>> I do not need help from such as you.
>
> LS> Welcome to the world of killfiles.
>
> Did it perhaps occur to you that not everyone knows Perl variable
> names are case-sensitive, and that not every programming language is
> like Perl?
>
> You and A. Sinan Unur are being nasty when a quick look at the
> original script would have been sufficient to understand the
> miscommunication.

No.

In the original script, there is a

use strict;

line. Had that line actually been in the script rather than pasted into
the post as an after-thought, the typo would have been caught by the OP.

Hence, my belief that the poster intentionally misrepresented the
contents of the script. That is, he lied.

Sinan

--
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Posted by Ben Bullock on May 29, 2008, 5:50 pm
Please log in for more thread options
On Thu, 29 May 2008 21:05:15 +0000, A. Sinan Unur wrote:

> Hence, my belief that the poster intentionally misrepresented the
> contents of the script. That is, he lied.

Why you (and John Bokma, and others) endlessly insult and harass newcomers to
this newsgroup I don't know, but I don't enjoy reading it, and I wish you'd
stop it.



Posted by Bill H on May 29, 2008, 6:19 pm
Please log in for more thread options
> On Thu, 29 May 2008 21:05:15 +0000, A. Sinan Unur wrote:
> > Hence, my belief that the poster intentionally misrepresented the
> > contents of the script. That is, he lied.
>
> Why you (and John Bokma, and others) endlessly insult and harass newcomers=
to
> this newsgroup I don't know, but I don't enjoy reading it, and I wish you'=
d
> stop it.

Hear Hear!

Many an interesting topic has been killed by the need to disect a
post. Remember, perl is a programming language, programmers are
people. Try to keep them distinct and apply some people skills where
appropriate, and by all means, share with us your programming skills
which the vast majority of you have in excess of mine.

I was hesitant to answer the orginal post with my recommendation of
using print "location.." for fear of getting sent through the read the
faq and perldoc this and that wringer, but felt I should at least
offer my 2 cents.

Going off the ranch: I have noticed in my few years of reading this
group on a daily basis that a majority (whether large or slim) of the
questions seem to be concerning using perl in a cgi environment, but a
many of the answers to these questions seem to present solutions that
will not work in a cgi environment. For example the simple "die"
statement. If you use that in a cgi and call the perl from a web
browser you will get (or it has at least been my experience, I could
be wrong (and probably am)) a 500 internal server error.

The other suggestion of installing this or using that module, not
everyone who is programming in perl for cgi has their own server or
has the ability of adding new modules to the server (fortunatly I do)
and have to work within the capabilities of the system they are
running on. So if they post a problem and there is a solution that
wouldn't require them installing a module, recommend it, instead of
just saying use blah::blah.

Another 2 cents, makes 4 cents for the day. If I post another 198
times I will have paid for a gallon of gas.

Bill H

PS: feel free to rip this apart - but keep in mind I am a "people".

Posted by Gunnar Hjalmarsson on May 29, 2008, 7:16 pm
Please log in for more thread options
Bill H wrote:
> I have noticed in my few years of reading this
> group on a daily basis that a majority (whether large or slim) of the
> questions seem to be concerning using perl in a cgi environment, but a
> many of the answers to these questions seem to present solutions that
> will not work in a cgi environment. For example the simple "die"
> statement. If you use that in a cgi and call the perl from a web
> browser you will get (or it has at least been my experience, I could
> be wrong (and probably am)) a 500 internal server error.

While I agree that questions on programs aimed to run as CGI programs
are often and unnecessarily twisted by some regulars, the example you
give is not a good one. If you develop a Perl program in a CGI
environment, you'd better make it a habit to

use CGI::Carp 'fatalsToBrowser';

It will make the browser display more meaningful error messages.

> The other suggestion of installing this or using that module, not
> everyone who is programming in perl for cgi has their own server or
> has the ability of adding new modules to the server (fortunatly I do)
> and have to work within the capabilities of the system they are
> running on. So if they post a problem and there is a solution that
> wouldn't require them installing a module, recommend it, instead of
> just saying use blah::blah.

Sometimes when people say "can't" install this or that module, they
actually mean "don't know how to". For instance, I have never heard of a
situation when a pure Perl module can't be installed, in one way or
another. So encouraging people to learn how to make use of modules is
usually the right thing to do.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Similar ThreadsPosted
How to call a simple perl script from HTML without need of HTTPS but simple HTTP ? May 11, 2006, 4:37 am
Newbie wants a simple script in perl April 5, 2008, 3:41 pm
Perl equivalent of simple awk script November 12, 2008, 4:01 pm
Can someone write me a simple Perl script for a few bucks? February 3, 2006, 11:20 pm
Improving performance of a simple Perl script July 28, 2006, 5:20 pm
launch simple perl script from browser January 15, 2007, 6:35 pm
simple perl script for file uploads ? September 11, 2008, 1:32 am
need simple perl script to do secure data transmission July 28, 2004, 4:43 am
simple perl script for automatic form submission. November 12, 2004, 6:03 pm
"Convert" perl command line to simple script June 28, 2007, 11:44 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap