Why using use strict;

Hi all,

I know why I should use "use strict;"   but what happen if I use "use
strict;" then if the code is OK, I delete this line?


Shouldn't it work the same without this line if the code has no problems?

Thanks.

Teddy,
orasnita@home.ro


0
orasnita
6/4/2002 6:03:21 AM
perl.beginners.cgi 3838 articles. 0 followers. Follow

15 Replies
1418 Views

Similar Articles

[PageSpeed] 25

why would you want to do that Octavian?

"use strict" is a sanity safety net. What your saying is like "I know why I
should use safety belt whilst driving my car but what if I took it off?" -
of course you can do it but beware of the consequences.

joel

-----Original Message-----
From: Octavian Rasnita [mailto:orasnita@home.ro]
Sent: 04 June 2002 07:03
To: beginners-cgi@perl.org
Subject: Why using use strict;


Hi all,

I know why I should use "use strict;"   but what happen if I use "use
strict;" then if the code is OK, I delete this line?


Shouldn't it work the same without this line if the code has no problems?

Thanks.

Teddy,
orasnita@home.ro



--
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org



0
joel
6/5/2002 7:33:26 AM
Octavian Rasnita wrote at Tue, 04 Jun 2002 08:03:21 +0200:

> Hi all,
> 
> I know why I should use "use strict;"   but what happen if I use "use strict;" then if the code is
> OK, I delete this line?
> 

use strict has (e.g.) the benefit for checking for undef values.
They can come from the input.
(User typed only enter, the file was empty, didn't exist,
 a library couldn't found, ...)
That's no problem when your code works.
But anytime, anywhen, that will happen.

Without use strict; you will search many months for a simple error.
Why ? An undef value means 0, "", (), {}, empty file in the right context.
That means your script will at a random point recognise that the values
are crazy. So you'll search the error somewhere else where it occurs.

And even with use strict; your program won't really be slower. 
(Perhaps 0.1 %, but in the one week you're searching for errors,
 the processors have been become quicker (> 0.1 %)).

Cheerio,
Janek

0
bigj
6/5/2002 10:19:07 AM
> -----Original Message-----
> From: Janek Schleicher [mailto:bigj@kamelfreund.de]
> Sent: Wednesday, June 05, 2002 6:19 AM
> To: beginners-cgi@perl.org
> Subject: Re: Why using use strict;
> 
> 
> Octavian Rasnita wrote at Tue, 04 Jun 2002 08:03:21 +0200:
> 
> > Hi all,
> > 
> > I know why I should use "use strict;"   but what happen if 
> I use "use strict;" then if the code is
> > OK, I delete this line?
> > 
> 
> use strict has (e.g.) the benefit for checking for undef values.

Nope. That's one of the things "use warnings" (or -w) does.
0
Bob_Showalter
6/5/2002 12:51:31 PM
> -----Original Message-----
> From: Octavian Rasnita [mailto:orasnita@home.ro]
> Sent: Tuesday, June 04, 2002 2:03 AM
> To: beginners-cgi@perl.org
> Subject: Why using use strict;
> 
> 
> Hi all,
> 
> I know why I should use "use strict;"   but what happen if I use "use
> strict;" then if the code is OK, I delete this line?

Nothing happens.

> 
> 
> Shouldn't it work the same without this line if the code has 
> no problems?

Yep. And it won't run any faster.

A-L-W-A-Y-S "use strict". :)
0
Bob_Showalter
6/5/2002 12:52:52 PM
So, in post after post after post I see the comment "always use strict"..=
=2E

I have seen threads where people are insulted because they dont...

Every perl tutorial I've seen says you should always "use strict"...

It apparently doesnt slow down code execution...

If you dont "use strict", the perl monks will come and flay you...
=20
All of this begs the obvious question(s)...

Why the hell isnt "use strict" built into the language?  Why doesnt perl =
just=20
do all that automatically?


just a question

Cheers
J-


On Tuesday 04 June 2002 02:03 am, Octavian Rasnita wrote:
> Hi all,
>
> I know why I should use "use strict;"   but what happen if I use "use
> strict;" then if the code is OK, I delete this line?
>
>
> Shouldn't it work the same without this line if the code has no problem=
s?
>
> Thanks.
>
> Teddy,
> orasnita@home.ro

0
jwebster
6/5/2002 12:56:17 PM
On Wednesday, June 5, 2002, at 05:51 , Bob Showalter wrote:
>> -----Original Message-----
>> From: Janek Schleicher [mailto:bigj@kamelfreund.de]
>> Sent: Wednesday, June 05, 2002 6:19 AM
>> Octavian Rasnita wrote at Tue, 04 Jun 2002 08:03:21 +0200:
>>>
>>> I know why I should use "use strict;"   but what happen if
>>
>> use strict has (e.g.) the benefit for checking for undef values.
>
> Nope. That's one of the things "use warnings" (or -w) does.

Hence why the question really should be

	what if i drive down the street without the lap and
	shoulder belt on - the buzzer will finally go off....

The 'use strict' helps one with the stuff more protected
in 'refs' and 'vars'.....

Perchance not as important once one has

	a) opted to harden the code and never ever, ever, ever
		go with changing a line in it

	b) ported it completely to being a tomcat java servlet

The problem that we are protecting ourselves from is the
moment in the future when we have to take this piece of
code down for some maintanance.

ciao
drieux

---

ps: as for driving with safety equipage - its the time
that you THINK it is ok, that will be the night you
get to sit up in ER having a chat with the radiologist
as you look at the X-rays and say:

	"Damn.... I thought that part of the facial bone
		structure was designed to prevent cracking that
			part of the bone structure over the sinuses..."

Or should I park this story in the context of my LIFE NRA
member cousin who capped a 9mm round through his tigh one
evening from an unloaded handgun he was planning to clean
because, well, he'd cleaned enough of them... and now has
no problem understanding why we all consider all of them
LOADED and LEATHAL - PERIOD - no discussion, no debate.

UNPROTECTED PERL CODE CAN CREEP IN AND EAT YOU!!!!!


0
drieux
6/5/2002 1:39:15 PM
because Perl has evolved over time?

joel

-----Original Message-----
From: Jake [mailto:jwebster@olemiss.edu]
Sent: 05 June 2002 13:56
To: beginners-cgi@perl.org
Subject: Why do we even HAVE to... (was: Why using use strict;)


So, in post after post after post I see the comment "always use strict"...

I have seen threads where people are insulted because they dont...

Every perl tutorial I've seen says you should always "use strict"...

It apparently doesnt slow down code execution...

If you dont "use strict", the perl monks will come and flay you...

All of this begs the obvious question(s)...

Why the hell isnt "use strict" built into the language?  Why doesnt perl
just
do all that automatically?


just a question

Cheers
J-


On Tuesday 04 June 2002 02:03 am, Octavian Rasnita wrote:
> Hi all,
>
> I know why I should use "use strict;"   but what happen if I use "use
> strict;" then if the code is OK, I delete this line?
>
>
> Shouldn't it work the same without this line if the code has no problems?
>
> Thanks.
>
> Teddy,
> orasnita@home.ro


--
To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
For additional commands, e-mail: beginners-cgi-help@perl.org



0
joel
6/5/2002 2:08:57 PM
To all:

Okay, there have been a few comments about the merits of using strict, but I thought I would toss
up a meta-argument.

It's true that posters who post code without "strict" are generally reminded by several replies
that they should have used strict, but the respondents also usually try to answer the question. 
Personally, I would never think of dropping a note to Lincoln Stein for not using strict in CGI.pm
or Damian Conway for not using strict in anything.  People who are reminded to use strict are
usually (not always) people for whom strict would be an enormous benefit.

As for Perlmonks (brought up in one reply), the ones who have been around for a while are usually
very concerned not just about correctness (a program does what it should and no more), but also
about quality (a program that works can still be an unmaintainable piece of crud).  So, when I see
someone who failed to use strict and then typed $recieved, I'll point out the misspelling, but
I'll also point out that using strict would have caught that error *at compile time*, rather than
have them pull their hair out for hours trying to figure out what's buggy.  

Quality, thus, tends to lead to correctness.  I could go on for hours as to why this is the case,
but really, who *doesn't* want correct programs?

I strongly recommend to every Perl programmer that they should hang out at Perlmonks.  Why? 
Because of a saying amongst mathematicians (which applies very strongly to programmers, too):

    First-rate mathematicians want to hang around first-rate 
    mathematicians.  Second-rate mathematicians want to hang
    around third-rate mathematicians.

The reason for that is left as an exercise for the reader :)

Cheers,
Curtis "Ovid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
0
poec
6/5/2002 3:40:59 PM
Im a bit worried that a few of my statements have been misconstrued, and =
I was=20
concerned that would happen when I first posted.  Let me try to clarify -=
 and=20
I should also preface this with I am primarily a C/C++ programmer (I'm=20
addicted to the Qt toolkit) who really uses perl only when he needs it.

I was not questioning whether one should or shouldn't "use strict".  In t=
he=20
brief time I have spent coding in perl, I have learned the hard way how=20
useful it is.  =20

my question is why the basic functionality of "use strict" isnt directly =
built=20
into the perl compiler/interpreter?  Why, for instance, isnt it simply=20
required by perl to use "my" or "our" or whatever when one first introduc=
es a=20
variable?  Sure, not using strict may save (advanced?) programmers a few=20
keystrokes, but is that really the only reason?  =20

I'm sure that somewhere along the line, the designers of perl had to have=
 at=20
least considered this...and I'm also sure that they had very good reasons=
 for=20
having "strict" remain a module that one can choose to use or not use.
I would simply like to know their reasons.

As for the perlmonks, as far as I'm concerned, that is one of the best=20
computer language websites/cultures that I have come across.  Almost=20
everything I know about perl has come from either that site or this list,=
 and=20
I admire the fact that you and your colleagues are willing to hang out in=
=20
newsgroups like this and patiently answer questions from hard headed newb=
ies=20
like myself :) =20

As for your remark about quality leading to correctness, I couldn't agree=
=20
more.  Jeez, I've read "Zen and the Art of Motorcycle Maintanance" 6 time=
s.

Respectfully,
Jake

On Wednesday 05 June 2002 11:40 am, Ovid wrote:
> To all:
>
> Okay, there have been a few comments about the merits of using strict, =
but
> I thought I would toss up a meta-argument.
>
> It's true that posters who post code without "strict" are generally
> reminded by several replies that they should have used strict, but the
> respondents also usually try to answer the question. Personally, I woul=
d
> never think of dropping a note to Lincoln Stein for not using strict in
> CGI.pm or Damian Conway for not using strict in anything.  People who a=
re
> reminded to use strict are usually (not always) people for whom strict
> would be an enormous benefit.
>
> As for Perlmonks (brought up in one reply), the ones who have been arou=
nd
> for a while are usually very concerned not just about correctness (a
> program does what it should and no more), but also about quality (a pro=
gram
> that works can still be an unmaintainable piece of crud).  So, when I s=
ee
> someone who failed to use strict and then typed $recieved, I'll point o=
ut
> the misspelling, but I'll also point out that using strict would have
> caught that error *at compile time*, rather than have them pull their h=
air
> out for hours trying to figure out what's buggy.
>
> Quality, thus, tends to lead to correctness.  I could go on for hours a=
s to
> why this is the case, but really, who *doesn't* want correct programs?
>
> I strongly recommend to every Perl programmer that they should hang out=
 at
> Perlmonks.  Why? Because of a saying amongst mathematicians (which appl=
ies
> very strongly to programmers, too):
>
>     First-rate mathematicians want to hang around first-rate
>     mathematicians.  Second-rate mathematicians want to hang
>     around third-rate mathematicians.
>
> The reason for that is left as an exercise for the reader :)
>
> Cheers,
> Curtis "Ovid" Poe
>
> =3D=3D=3D=3D=3D
> "Ovid" on http://www.perlmonks.org/
> Someone asked me how to count to 10 in Perl:
> push@A,$_ for reverse q.e...q.n.;for(@A){$_=3Dunpack(q|c|,$_);@a=3Dspli=
t//;
> shift@a;shift@a if $a[$[]eq$[;$_=3Djoin q||,@a};print $_,$/for reverse =
@A
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com

0
jwebster
6/5/2002 3:42:51 PM
--- Jake <jwebster@olemiss.edu> wrote:
> Im a bit worried that a few of my statements have been misconstrued, and I was 
> concerned that would happen when I first posted.

Jake,

No worries, I didn't misconstrue your comments.  I deliberately changed the subject in hopes that
no one would think I was directly replying to what you asked.  Unfortunately, by making a
reference to something you wrote, *I* was possibly misconstrued.  I was just trying to make a
general statement to the effect that "we improve by understanding best practices", though perhaps
I was a bit ham-handed in getting the point across.

In fact, I deliberately did not answer your question since I was trying to make that other point,
so I guess I'll go ahead and answer the question now.

> my question is why the basic functionality of "use strict" isnt directly built 
> into the perl compiler/interpreter?

If you check out some of my modules on the CPAN, you find that I regularly need to disable
portions of strict in my code.  Some programmers (Damian Conway springs to mind) do this with such
frequency that it would be annoying to turn strict off, then on, then off, then on again, etc. 
Personally, I'll take the annoyance.

It's not the default because many who use Perl are just using it for a lightning quick tool to get
things done.  They want to focus on the task and not on "am I having a scoping issue here?"  Many
disagree with this (I have my reservations), but this is so prevalent that it was decided to
retain this feature.

Cheers,
Curtis "Ovid" Poe

=====
"Ovid" on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
0
poec
6/5/2002 5:11:19 PM
On Wednesday, June 5, 2002, at 08:40 , Ovid wrote:
[..]
>
>     First-rate mathematicians want to hang around first-rate
>     mathematicians.  Second-rate mathematicians want to hang
>     around third-rate mathematicians.
>
> The reason for that is left as an exercise for the reader :)
>
> Cheers,
> Curtis "Ovid" Poe


First let us address the logic fault in your opening premise.

The reason that many Perl Module Writers do not impose 'use strict'
and/or 'use warning' - is precisely because of their obligation to
'backward compatibility' - and is done with a clear understanding
that a core tenant of Perl Orthodoxy is that while we do not wish
folks to rummage around in one's living room - we are not planning
to put up trip mines to keep them out.

Hence whining at any of the 'canonical' perl module writers for
following Orthodoxy over 'good advice' - would be less than useful.

Let us now move onto the problem of resolving 'ranking of programmers'
as a concept in itself - and specifically SILLY in the perl environment
to begin with.... Perchance the pinnacle of FOLLY in the cgi/mod_perl
space - since this is a place where we have to deal with the fact that
the 'standards committee' was functionally clueless to begin with
when they ginned up the HTTP/HTML "standards" from the gitGo - and have
compounded that folly by openly admitting their total cluelessness
with XHTML - the 'we have no hope of formalization at all'!

How exactly were we planning to rank programmer's who are great
kernel hackers - but write, well, lame perl code? My old sense
who is now in the bowels of VxWork based solutions for 802.11
work - had that coffee break moment that he had to actually 'work it'
to understand some of the new perl tricks i use.... is he better than
me or worse than me????

Or put the other way around - if the requirements are for this OS
and to hit these performance numbers for the OLTP system - is it 'better'
to dodge the whole 'portability' game - and get those XS's tied tightly
to this OS's implementation of their unique wonders - for the speed...
knowing that were we to change platforms we have some serious porting
issues to address down the road??? But at least we have the basic perl
inteface into the OLTP exposed in a reasonable way???

I can appreciate for the devotee's of the academic world - there is the
clear moral imperative to having 'ranking and orders' - since without
them how would one know if one had to write the valedictorian speach,
or be the person working the 'back up strategy' incase the valedictorian
takes a bullet.... But what about out here in the real world???

You know, where code gets generated by folks who are not worrying about
the inter-departmental politics of how their pious posturing will be
perceived one way or the other??? The 'dumb grunts' who merely have to
get it to work.

But clearly - if i felt that Perl were a specific field of mathematics,
then I would of course find your argument so compelling - If I were
worried at all about how I 'ranked' in the academic world to begin with.

But what if 12 years in the industry helped me better understand how
frighteningly silly that Degree in Computer Science really was to begin 
with?

What if the process is really about seeing how others solve problems?
Or finding interesting problems to solve for real people with real
concerns about how to really do FOO????

What if the best thing to happen to the Shaolin Monasteries was that
they were sacked and burned - and allowed them to find the same level
of 'friar' { that old english phrase for 'free monk' } that helped
them get in touch with their 'ronin' ways???

What if wandering the lanes with nothing more than a rice bowl
was a great way to see the world and actually do good?

Or would this be the wrong place to propose that if only Larry Wall
had been a team player and been willing to do what needed to be done
to make things in sed/awk more ellegant - and be a 'real first water'
programmer rather than someone out to impress the 3rd tier wankers...

But the same would also apply to the fact that those CERN wankers
really should have been content with telnet and ftp - since clearly
this whole skank with the lame, lame, lame HTTP protocol was merely
there because those were so clearly lame types who were never going
to be 'real programmers'....

But barring that, we so clearly agree that providing best practices
and something like a standard is probably the best that we will be
able to do - since most RealProgrammers[tm] will wind up doing things
in ways we might not have expected - just like RealEndUsers[tm] tend
to do with the code we wrote things we hadn't thought about....

God, if Only we had been First Water Wonders...

Rather than merely Perl Coders....

ciao
drieux

---

0
drieux
6/5/2002 5:32:26 PM
--0-1013564303-1023305335=:97444
Content-Type: text/plain; charset=us-ascii


 Does anyone know how to capture the carriage return to prevent a user from accidentally submitting the form by pressing 'return' before they actually finish completing the form?
-Rob



---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup
--0-1013564303-1023305335=:97444--
0
r_roudebush
6/5/2002 7:28:55 PM
If your as lazy as I am and hate to type you wouldn't have this debate.......I can't remember ever
writing a script that I started from scratch for years now. I almost always start with an existing
script cause 9 times out of 10 it has something in it I'll need anyway.......and I am the cut 'n'
paste king of all times. I even have an array of smart key shortcuts on all of my computers.

But even still I don't think it would bug me to type in 2 little words :o)

Charles

PS I am know as the slopiest programmer in the world just for your edufication but I beleive it's the
end results that gets me by :o)

Ovid wrote:

> To all:
>
> Okay, there have been a few comments about the merits of using strict, but I thought I would toss
> up a meta-argument.
>
> It's true that posters who post code without "strict" are generally reminded by several replies
> that they should have used strict, but the respondents also usually try to answer the question.
> Personally, I would never think of dropping a note to Lincoln Stein for not using strict in CGI.pm
> or Damian Conway for not using strict in anything.  People who are reminded to use strict are
> usually (not always) people for whom strict would be an enormous benefit.
>
> As for Perlmonks (brought up in one reply), the ones who have been around for a while are usually
> very concerned not just about correctness (a program does what it should and no more), but also
> about quality (a program that works can still be an unmaintainable piece of crud).  So, when I see
> someone who failed to use strict and then typed $recieved, I'll point out the misspelling, but
> I'll also point out that using strict would have caught that error *at compile time*, rather than
> have them pull their hair out for hours trying to figure out what's buggy.
>
> Quality, thus, tends to lead to correctness.  I could go on for hours as to why this is the case,
> but really, who *doesn't* want correct programs?
>
> I strongly recommend to every Perl programmer that they should hang out at Perlmonks.  Why?
> Because of a saying amongst mathematicians (which applies very strongly to programmers, too):
>
>     First-rate mathematicians want to hang around first-rate
>     mathematicians.  Second-rate mathematicians want to hang
>     around third-rate mathematicians.
>
> The reason for that is left as an exercise for the reader :)
>
> Cheers,
> Curtis "Ovid" Poe
>
> =====
> "Ovid" on http://www.perlmonks.org/
> Someone asked me how to count to 10 in Perl:
> push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
> shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
> For additional commands, e-mail: beginners-cgi-help@perl.org

0
cfaris
6/5/2002 8:13:18 PM
I don't think that "use strict" is necessary in a finished script. I think
anything that takes up machine cycles and isn't needed in the finished script
should remain mobile and this is probably the main reason they keep it
mobile........you might say "but how many macine cycles could it possibly eat up"
when you should really say "why not keep it an option".

good practice is to make things available that are not absolutely needed as
mobile functions.

Charles

Jake wrote:

> Im a bit worried that a few of my statements have been misconstrued, and I was
> concerned that would happen when I first posted.  Let me try to clarify - and
> I should also preface this with I am primarily a C/C++ programmer (I'm
> addicted to the Qt toolkit) who really uses perl only when he needs it.
>
> I was not questioning whether one should or shouldn't "use strict".  In the
> brief time I have spent coding in perl, I have learned the hard way how
> useful it is.
>
> my question is why the basic functionality of "use strict" isnt directly built
> into the perl compiler/interpreter?  Why, for instance, isnt it simply
> required by perl to use "my" or "our" or whatever when one first introduces a
> variable?  Sure, not using strict may save (advanced?) programmers a few
> keystrokes, but is that really the only reason?
>
> I'm sure that somewhere along the line, the designers of perl had to have at
> least considered this...and I'm also sure that they had very good reasons for
> having "strict" remain a module that one can choose to use or not use.
> I would simply like to know their reasons.
>
> As for the perlmonks, as far as I'm concerned, that is one of the best
> computer language websites/cultures that I have come across.  Almost
> everything I know about perl has come from either that site or this list, and
> I admire the fact that you and your colleagues are willing to hang out in
> newsgroups like this and patiently answer questions from hard headed newbies
> like myself :)
>
> As for your remark about quality leading to correctness, I couldn't agree
> more.  Jeez, I've read "Zen and the Art of Motorcycle Maintanance" 6 times.
>
> Respectfully,
> Jake
>
> On Wednesday 05 June 2002 11:40 am, Ovid wrote:
> > To all:
> >
> > Okay, there have been a few comments about the merits of using strict, but
> > I thought I would toss up a meta-argument.
> >
> > It's true that posters who post code without "strict" are generally
> > reminded by several replies that they should have used strict, but the
> > respondents also usually try to answer the question. Personally, I would
> > never think of dropping a note to Lincoln Stein for not using strict in
> > CGI.pm or Damian Conway for not using strict in anything.  People who are
> > reminded to use strict are usually (not always) people for whom strict
> > would be an enormous benefit.
> >
> > As for Perlmonks (brought up in one reply), the ones who have been around
> > for a while are usually very concerned not just about correctness (a
> > program does what it should and no more), but also about quality (a program
> > that works can still be an unmaintainable piece of crud).  So, when I see
> > someone who failed to use strict and then typed $recieved, I'll point out
> > the misspelling, but I'll also point out that using strict would have
> > caught that error *at compile time*, rather than have them pull their hair
> > out for hours trying to figure out what's buggy.
> >
> > Quality, thus, tends to lead to correctness.  I could go on for hours as to
> > why this is the case, but really, who *doesn't* want correct programs?
> >
> > I strongly recommend to every Perl programmer that they should hang out at
> > Perlmonks.  Why? Because of a saying amongst mathematicians (which applies
> > very strongly to programmers, too):
> >
> >     First-rate mathematicians want to hang around first-rate
> >     mathematicians.  Second-rate mathematicians want to hang
> >     around third-rate mathematicians.
> >
> > The reason for that is left as an exercise for the reader :)
> >
> > Cheers,
> > Curtis "Ovid" Poe
> >
> > =====
> > "Ovid" on http://www.perlmonks.org/
> > Someone asked me how to count to 10 in Perl:
> > push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
> > shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail: beginners-cgi-unsubscribe@perl.org
> For additional commands, e-mail: beginners-cgi-help@perl.org

0
cfaris
6/5/2002 9:01:43 PM
On Wednesday, June 5, 2002, at 08:40 , Ovid wrote:
[..]
>
>     First-rate mathematicians want to hang around
first-rate
>     mathematicians.  Second-rate mathematicians want
to hang
>     around third-rate mathematicians.
>
> The reason for that is left as an exercise for the
reader :)

   So, ignoring for the moment drieux's eloquent case
for calling this a bogus distinction (if I understood
what he said, which isn't always easy), if we assume
for the sake of argument that a newbie is a third-rate
Perl programmer (although granted s/he may be first
rate in another pond), what does that make you
experienced people hanging around with us? :-)  
[Besides wonderful and nice people, of course?]
   
And then drieux said:
> But what if 12 years in the industry helped me
better understand how
> frighteningly silly that Degree in Computer Science
really was to begin 
> with?

  Au contraire. I know it is fashionable to wonder
what all that education was good for, but after about
10 years myself, I find that I have repeatedly been
able to pick up new languages and packages at a faster
rate than many of my peers in the corporate IT world,
and I credit the value of the more conceptually
abstract 4-year CS degree as compared to the very
concrete and limited 2-year business programming
degree of some of my colleagues. Having learned
abstractly about algorithms, operating system
internals, compilers, and so on may not be something I
use everyday (not to even mention functional
programming and CS theory, much of which I've no doubt
forgotten), but it's given me a higher framework in
which to categorize and relate new knowledge, which is
what learning is all about. The tradeoff is that I
actually graduated knowing nothing about how to use
any particular commercial databases, for instance, but
I knew about tree structures and hash tables, and once
you know the concepts and theory, it's easy to pick up
specific commercial implementations.

  But then, I never went to grad school or into
academia, so perhaps I'm really just one of the
middle-tier people myself! :-)
    
> Or would this be the wrong place to propose that if
only Larry Wall
> had been a team player and been willing to do what
needed to be done
> to make things in sed/awk more ellegant - and be a
'real first water'
> programmer rather than someone out to impress the
3rd tier wankers...
> 
> But the same would also apply to the fact that those
CERN wankers
> really should have been content with telnet and ftp
- since clearly
> this whole skank with the lame, lame, lame HTTP
protocol was merely
> there because those were so clearly lame types who
were never going
> to be 'real programmers'..

Hey, for that matter, what was so wrong with assembly
language?  ;-)

- John

=====
"Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still alive, and there's nothing I want to do." - They Might Be Giants, http://www.tmbg.com

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
0
john_brooking
6/5/2002 10:03:48 PM
Reply:

Similar Artilces:

why to use 1)use CGI,2)use Strict ,3)use Carp in script
hi why we r using 1)use CGI, 2)use Strict, 3)use Carp in the begining of script sometimes. What is the use of it.Is the files CGI.pm,Strict.pm,Carp.pm default with PERL. Thnx __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com On Thu, 2004-11-04 at 09:31, supriya devburman wrote: > hi Hi > why we r using > 1)use CGI, We only use CGI when we want to use methods from that module (usually on web pages); see `perldoc CGI` for more information on what you...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...

cannot use other packages when using CGI
Hi all, I am using CGI package in my script. When i try to use other packages like LWP::UserAgent inside the same script, it is not working in the web environment. But when i run the script from the command prompt it is working fine. Anyone please do solve my problem. Thanks +ACY- Regards, wilson. ...

PROBLEM WITH THE USES OF USE STRICT
Hello Team, Can someone please tell me why the below code does not work correctly? Here is the problem: Once I run the program and type in a couple of wrong answers and then type in the correct answer I still get the wrong response (e.g "No that is wrong! Try again.") But if I type in the correct answer first I get the correct response. I also should add that if I don't use "use strict" and rename my variable without "my". The code then works as it should. regards, Jaimee #!/usr/bin/perl -w use strict; print (&q...

use Strict and using module
Hello, Purpose: I am trying to understand the reason for the following error. Error: "Bareword "NetCDF::READ" not allowed while "strict subs" in use..." Actions already taken: 1. Searched Google --> Perl Bareword not allowed while "strict subs" Most of the hits I have looked at deal with just an OPEN Perl command in a subroutine. I am trying to understand why the module call NetCDF::READ results in similar behavior. Not understanding the parallel between the OPEN explanations and how to apply it to NetCDF::READ. 2. Searched http:...

How to use the arguments to use() in the package being used
Howdy,=20 The subject says it all believe it or not :) What I'm trying to figure out is how to pass an argument=20 (pragma I believe is the proper term) to use() and do=20 sonethign in the package based on it. I've looked at CGI.pm source but can't seem to track it down.=20 (Similar idea as to CGIs -oldstyle_urls -newstyel_urls) http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS What I'd like to do is something like this: # for old time's sake we'll just use our favorite module use Foo::Monkey qw(:Foo :Bar -doamazingthings); #then in Foo::Monkey...

Pragmas use strict and use warnings
------=_Part_1657_33307736.1193755179713 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Whats the exact purpose of use strict and use warnings Pragmas in the Perl Programming Language. I know use warnings turns on all useful warnings. Thanks and Regards Kaushal ------=_Part_1657_33307736.1193755179713-- On 10/30/07, Kaushal Shriyan <kaushalshriyan@gmail.com> wrote: snip > Whats the exact purpose of use strict snip The strict pragma has three effects (unless modified by arguments): 1. most var...

RE: Why do we even HAVE to... (was: Why using use strict;)
because it would reek havoc on all the perl one liners. And deter many beginners that are touching perl for the first time. And would annoy those who have to write a quick 5 line script in 3 seconds that forget a my for $line. > -----Original Message----- > From: Jake [mailto:jwebster@olemiss.edu] > Sent: Wednesday, June 05, 2002 8:56 AM > To: beginners-cgi@perl.org > Subject: Why do we even HAVE to... (was: Why using use strict;) > > > So, in post after post after post I see the comment "always > use strict"... > > I have seen thr...

use Getopt::Std; and use strict;
Hi everyone, I have a problem using Getopt::Std. I depend on use strict for all my code, and when I use Getopt::Std all the variables it creates (to hold the command line option values) are flagged by strict because they have not been scoped. I get errors like this: Line 70: Global symbol "$opt_m" requires explicit package name If I don't use strict the program runs fine. Is there anything I can do about this? Does anyone use both together? Thanks for the help. -Hans Yes you can say our $opt_m; or use vars qw($opt_m); at the top of your progra...

[moonbuzz@gmail.com: Re: Help using cgi]Re: Help using cgi
On Mon, Apr 11, 2011 at 04:05:31AM -0700, prashant kaushal wrote: > Hi Di, > > Yesterday i tried a "Hello world" program in perl using cgi script on a windows platform. The steps i followed were: > > 1. Made a directory in "C:" and named it "cgi-bin" > 2. Wrote my source code file and saved it with "test.cgi" > That won't do, you need to configure a webserver to execute that code. There are 2 ways to go about it: 1: install Apache, you can find a ready-to-go distribution at http://apachefriends.org 2: configure...

Using Use:CGI to process form variables
Hi all, As a Perl Newbie I just felt more comfortable processing form variables using the method I'm most comfortable with As Jenda pointed out in a previous post that this is not the best method. > #read STDIN, $PostData, $ENV{'CONTENT_LENGTH'}; > > #print "post data =$PostData<br>"; > > #postdata will look like this > #txtEmailAddr=colin.johnstone@det.nsw.edu.au&radAction=unsubscribe&rad > #Format=html&Submit=Submit I need to extract from this string the > #fields and their values > my @fields = split( /\&a...

I used to use Firefox until...
Name: Dan Product: Firefox Summary: I used to use Firefox until... Comments: Firefox takes forever to load now, even the absolute newest version. It has become clunky and everyone I know has moved on to another browser. I prefer Chrome. I suggest adding some sort of configuration optimization tool as well as toolbar/add-on install/hijack prevention. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a re...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

Web resources about - Why using use strict; - perl.beginners.cgi

Resources last updated: 12/17/2015 1:18:19 AM