[19892] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2087 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 7 18:10:33 2001

Date: Wed, 7 Nov 2001 15:10:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1005174612-v10-i2087@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 7 Nov 2001     Volume: 10 Number: 2087

Today's topics:
        Unix executed thru CGI? <brian@jankoNOnet.SPAMcom.INVALID>
    Re: Unix executed thru CGI? <tintin@snowy.calculus>
    Re: Unix executed thru CGI? (John J. Trammell)
    Re: Unix executed thru CGI? <jurgenex@hotmail.com>
    Re: Unix executed thru CGI? <brian@jankoNOnet.SPAMcom.INVALID>
    Re: URGENT!  Please help me with this! (John J. Trammell)
    Re: URGENT!  Please help me with this! (Tad McClellan)
    Re: URGENT!  Please help me with this! (Tad McClellan)
    Re: URGENT!  Please help me with this! <msisto@chat.carleton.ca>
    Re: URGENT!  Please help me with this! <uri@stemsystems.com>
    Re: URGENT!  Please help me with this! <msisto@chat.carleton.ca>
    Re: URGENT!  Please help me with this! <uri@stemsystems.com>
    Re: using a variable in a subroutine name <mjcarman@home.com>
    Re: using a variable in a subroutine name <mjcarman@home.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 07 Nov 2001 21:14:47 GMT
From: "Brian Janko" <brian@jankoNOnet.SPAMcom.INVALID>
Subject: Unix executed thru CGI?
Message-Id: <avhG7.90189$U7.7311592@bin1.nnrp.aus1.giganews.com>

I'm running the latest version of Perl on a Unix server.

I'm creating an interface through a web browser.  Is there any way for the
user to create a file on the server, THRU the web browser.  In other words,
can Unix commands be executed through the CGI interface?

Thanks,
Brian




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

Date: Thu, 8 Nov 2001 08:31:47 +1100
From: "Tintin" <tintin@snowy.calculus>
Subject: Re: Unix executed thru CGI?
Message-Id: <AJhG7.4$V17.53301@news.interact.net.au>


"Brian Janko" <brian@jankoNOnet.SPAMcom.INVALID> wrote in message
news:avhG7.90189$U7.7311592@bin1.nnrp.aus1.giganews.com...
> I'm running the latest version of Perl on a Unix server.
>
> I'm creating an interface through a web browser.  Is there any way for the
> user to create a file on the server, THRU the web browser.  In other
words,
> can Unix commands be executed through the CGI interface?

Sure.

perldoc -f system
perldoc -f exec




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

Date: Wed, 7 Nov 2001 15:48:00 -0600
From: trammell@haqq.hypersloth.invalid (John J. Trammell)
Subject: Re: Unix executed thru CGI?
Message-Id: <slrn9ujb1i.roc.trammell@haqq.el-swifto.com>

On Wed, 07 Nov 2001 21:14:47 GMT, Brian Janko wrote:
> I'm running the latest version of Perl on a Unix server.
> 
> I'm creating an interface through a web browser.  Is there any way for the
> user to create a file on the server, THRU the web browser.  In other words,
> can Unix commands be executed through the CGI interface?

Not a Perl question.  comp.infosystems.www.authoring.cgi is thataway ==>

-- 
Rule #0: Spam is theft.


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

Date: Wed, 7 Nov 2001 14:01:33 -0800
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Unix executed thru CGI?
Message-Id: <3be9af5b$1@news.microsoft.com>

"Tintin" <tintin@snowy.calculus> wrote in message
news:AJhG7.4$V17.53301@news.interact.net.au...
> "Brian Janko" <brian@jankoNOnet.SPAMcom.INVALID> wrote in message
> news:avhG7.90189$U7.7311592@bin1.nnrp.aus1.giganews.com...
> > I'm creating an interface through a web browser.  Is there any way for
the
> > user to create a file on the server, THRU the web browser.  In other
> words,
> > can Unix commands be executed through the CGI interface?
>
> Sure.
> perldoc -f system
> perldoc -f exec

Only problem:  Usually CGI programs are run with a special user account and
very low privileges.
Chances are that Brian does not want his users to run the unix commands
under this account but a specific account for each user.
But in any case: this is a CGI or Unix question and not a Perl problem.

jue




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

Date: Wed, 07 Nov 2001 22:13:18 GMT
From: "Brian Janko" <brian@jankoNOnet.SPAMcom.INVALID>
Subject: Re: Unix executed thru CGI?
Message-Id: <2miG7.92763$tb2.7391962@bin2.nnrp.aus1.giganews.com>

This is for an intranet at work which any user can access web pages from.
The Unix command is a specific which I will set up.  As far as the user
knows, they just click a button.  On the OS, their button-pushing simply
copies the file to another file with a different name.  The user does not
know what goes on in the background.

Thanks,
Brian


> Only problem:  Usually CGI programs are run with a special user account
and
> very low privileges.
> Chances are that Brian does not want his users to run the unix commands
> under this account but a specific account for each user.
> But in any case: this is a CGI or Unix question and not a Perl problem.
>
> jue
>
>
>




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

Date: Wed, 7 Nov 2001 13:05:20 -0600
From: trammell@haqq.hypersloth.invalid (John J. Trammell)
Subject: Re: URGENT!  Please help me with this!
Message-Id: <slrn9uj1gh.q5s.trammell@haqq.el-swifto.com>

On 7 Nov 2001 18:15:37 GMT, Marianne Sisto <msisto@chat.carleton.ca> wrote:
> Hi, I have to get this working because it is for an assignment which is due
> on Fri! I have written code to store cookies. This appears to be working.
> Then I have some code to read the cookies.  I have used print statements to
> test this and it seems to be reading the cookies.  But, I am trying to
> compare a variable called $STU_NUM with the name of the cookies, and it just
> will NOT find them equal, even when they are.  This is what I have done:
> 
>     $cookieName=$STU_NUM;
>     $cookieData;
>     foreach $course(@validCourses){
>          $cookieData=$cookieData.$course."/t";
>     }
>     print "Set-Cookie:$cookieName=$cookieData;expires=Tue 11-12-2001
> 00:00:00 GMT\n";
> 
> This is supposed to take the data out of the validCourses array, bit by bit
> and concatenate it to the string cookieData, and it seems to work.  The data
> is separated by tabs.
> 
> Then, later on I read the cookies:
> 
> if($ENV{'HTTP_COOKIE'}){
> 
>           @cookies=split(/;/,$ENV{'HTTP_COOKIE'});
>            foreach $cookie(@cookies){
>                 ($name,$value)=split(/=/,$cookie);
>                 $crumbs{$name}=$value;
>           }
> 
>         foreach $key(keys%crumbs)
>         {
>               print "key is $key";
>               print "stu_num is $STU_NUM";   #testing
> 

Maybe try instead:

  print "key is '$key'\n";
  print "stu_num is '$STU_NUM'\n";

Things that look alike often are not (trailing spaces, etc.).

-- 
If you don't look at the fnord, it can't get you.


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

Date: Wed, 07 Nov 2001 20:09:08 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: URGENT!  Please help me with this!
Message-Id: <slrn9uj2li.fr0.tadmc@tadmc26.august.net>

Marianne Sisto <msisto@chat.carleton.ca> wrote:
>Hi, I have to get this working because it is for an assignment which is due
>on Fri! 


   1) No subject in the Subject

   2) "urgent" is a nonsense term in the context of Usenet

   3) and it's a homework problem

You sure are testing the limits...


>I am trying to
>compare a variable called $STU_NUM with the name of the cookies, and it just
>will NOT find them equal, even when they are.  
                                ^^^^^^^^^^^^^

Machines do not generally make mistakes. It is much more likely
that the you are mistaken about the _actual_ contents of the
values being compared.


>This is what I have done:
>
>    $cookieName=$STU_NUM;


And what is in $STU_NUM?


>    $cookieData;
>    foreach $course(@validCourses){
>         $cookieData=$cookieData.$course."/t";
>    }
>    print "Set-Cookie:$cookieName=$cookieData;expires=Tue 11-12-2001
>00:00:00 GMT\n";
>
>This is supposed to take the data out of the validCourses array, bit by bit
>and concatenate it to the string cookieData, and it seems to work.  The data
     ^^^^^^^^^^^
>is separated by tabs.


I do not see where you concatenate anything to $cookieData (hint).


>              if($key eq $STU_NUM){
>                  print "FOUND IT!";
>              }

>It prints out the keys and the student numbers, and I can see that they are
                                                     ^^^^^^^^^

What if there are characters there that you *cannot* see?

You should print them out with delimiters to make sure there are
not space or newline characters in there:

   print "key is '$key'\n";

>equal, but it NEVER finds it - what am I doing wrong?


You haven't shown where $STU_NUM gets its value from, so we
are not going to be able to really help much.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Wed, 07 Nov 2001 20:31:33 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: URGENT!  Please help me with this!
Message-Id: <slrn9uj3u0.g36.tadmc@tadmc26.august.net>

Tad McClellan <tadmc@augustmail.com> wrote:
>Marianne Sisto <msisto@chat.carleton.ca> wrote:

>>         $cookieData=$cookieData.$course."/t";
                       ^^^^^^^^^^^

>I do not see where you concatenate anything to $cookieData (hint).


Doh! Now I see it. Never mind that part.

You could make things easier on yourself by making your code
easier to read:

   $cookieData .= $course . "/t";

or, probably better yet:

   $cookieData .= "$course/t";


Do you really want two chars (slash-tee) as a separator, or
did you want a tab and slant your slash the wrong direction?


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 7 Nov 2001 21:51:22 GMT
From: "Marianne Sisto" <msisto@chat.carleton.ca>
Subject: Re: URGENT!  Please help me with this!
Message-Id: <9scacq$jgh$1@bertrand.ccs.carleton.ca>

Hey thats not very fair, I have spent hours working on this thing, I've been
up all night doing it night after night and am getting no little to no from
my school, I have written all the code myself and I only wanted a little
advice from more experienced programmers.  If this is 'pushing the limits'
then its a very unfriendly place. I wont post here again dont worry.

"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrn9uj2li.fr0.tadmc@tadmc26.august.net...
> Marianne Sisto <msisto@chat.carleton.ca> wrote:
> >Hi, I have to get this working because it is for an assignment which is
due
> >on Fri!
>
>
>    1) No subject in the Subject
>
>    2) "urgent" is a nonsense term in the context of Usenet
>
>    3) and it's a homework problem
>
> You sure are testing the limits...
>
>
> >I am trying to
> >compare a variable called $STU_NUM with the name of the cookies, and it
just
> >will NOT find them equal, even when they are.
>                                 ^^^^^^^^^^^^^
>
> Machines do not generally make mistakes. It is much more likely
> that the you are mistaken about the _actual_ contents of the
> values being compared.
>
>
> >This is what I have done:
> >
> >    $cookieName=$STU_NUM;
>
>
> And what is in $STU_NUM?
>
>
> >    $cookieData;
> >    foreach $course(@validCourses){
> >         $cookieData=$cookieData.$course."/t";
> >    }
> >    print "Set-Cookie:$cookieName=$cookieData;expires=Tue 11-12-2001
> >00:00:00 GMT\n";
> >
> >This is supposed to take the data out of the validCourses array, bit by
bit
> >and concatenate it to the string cookieData, and it seems to work.  The
data
>      ^^^^^^^^^^^
> >is separated by tabs.
>
>
> I do not see where you concatenate anything to $cookieData (hint).
>
>
> >              if($key eq $STU_NUM){
> >                  print "FOUND IT!";
> >              }
>
> >It prints out the keys and the student numbers, and I can see that they
are
>                                                      ^^^^^^^^^
>
> What if there are characters there that you *cannot* see?
>
> You should print them out with delimiters to make sure there are
> not space or newline characters in there:
>
>    print "key is '$key'\n";
>
> >equal, but it NEVER finds it - what am I doing wrong?
>
>
> You haven't shown where $STU_NUM gets its value from, so we
> are not going to be able to really help much.
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas




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

Date: Wed, 07 Nov 2001 22:19:27 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: URGENT!  Please help me with this!
Message-Id: <x7bsiete8w.fsf@home.sysarch.com>

>>>>> "MS" == Marianne Sisto <msisto@chat.carleton.ca> writes:

  MS> Hey thats not very fair, I have spent hours working on this thing,
  MS> I've been up all night doing it night after night and am getting
  MS> no little to no from my school, I have written all the code myself
  MS> and I only wanted a little advice from more experienced
  MS> programmers.  If this is 'pushing the limits' then its a very
  MS> unfriendly place. I wont post here again dont worry.

no, it is a place to discuss perl and not to do homework. if you have a
problem with your code you can post it here. you didn't show enough of
you code or data for anyone to figure out what is wrong.


  >> >I am trying to
  >> >compare a variable called $STU_NUM with the name of the cookies, and it
  MS> just
  >> >will NOT find them equal, even when they are.


that is not a useful statement. how do we know what is in either
variable? how can we tell why the comparison fails? do you see the
problem with your original post?

also as tad said, the subject is annoying and useless. nothing on usenet
is ever urgent. that is the usenet culture. some people won't see your
post for days.

so if you think this group is an unfriendly place, i suggest you don't
take any programming classes. you are obviously not skilled in the
logical arts required. 

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: 7 Nov 2001 22:30:47 GMT
From: "Marianne Sisto" <msisto@chat.carleton.ca>
Subject: Re: URGENT!  Please help me with this!
Message-Id: <9sccmn$ljl$1@bertrand.ccs.carleton.ca>

Firstly it is pathetic that u bothered to send me a copy directly to make
sure i read ur silly comments! U have no right to say I am not skilled in
logic for programming, u do not know anything about me - there is not need
to be unpleasant.  You are obviously not skilled in the necessary fields of
having a little patience and understanding when dealing with other people
and thats a sad way to be.  I did NOT ask anyone to do my homework, I simply
posted code that I had a problem with!!  If u feel annoyed enough about that
to go to the trouble to write a stroppy reply, rather than just ignore my
original post then I feel sorry for you!  You obviously have not much going
on in ur life.  I did not post all of my code because I was not asking
people to look over my entire assignment and like I said I isolated where
the problem was - I only wanted a little advice, it is sad that you have to
have be this way, I do not believe I did anything wrong by posting my
original method.  I will not be reading any reply u send to this so u really
needn't bother, I have better things to do and I really hope that nobody
else comes here hoping for a little encouragement or advice!  ( Thank you to
the person who did infact give me some advice)


wrote in message news:x7bsiete8w.fsf@home.sysarch.com...
> >>>>> "MS" == Marianne Sisto <msisto@chat.carleton.ca> writes:
>
>   MS> Hey thats not very fair, I have spent hours working on this thing,
>   MS> I've been up all night doing it night after night and am getting
>   MS> no little to no from my school, I have written all the code myself
>   MS> and I only wanted a little advice from more experienced
>   MS> programmers.  If this is 'pushing the limits' then its a very
>   MS> unfriendly place. I wont post here again dont worry.
>
> no, it is a place to discuss perl and not to do homework. if you have a
> problem with your code you can post it here. you didn't show enough of
> you code or data for anyone to figure out what is wrong.
>
>
>   >> >I am trying to
>   >> >compare a variable called $STU_NUM with the name of the cookies, and
it
>   MS> just
>   >> >will NOT find them equal, even when they are.
>
>
> that is not a useful statement. how do we know what is in either
> variable? how can we tell why the comparison fails? do you see the
> problem with your original post?
>
> also as tad said, the subject is annoying and useless. nothing on usenet
> is ever urgent. that is the usenet culture. some people won't see your
> post for days.
>
> so if you think this group is an unfriendly place, i suggest you don't
> take any programming classes. you are obviously not skilled in the
> logical arts required.
>
> uri
>
> --
> Uri Guttman  ------  uri@stemsystems.com  --------
http://www.stemsystems.com
> -- Stem is an Open Source Network Development Toolkit and Application
Suite -
> ----- Stem and Perl Development, Systems Architecture, Design and
Coding ----
> Search or Offer Perl Jobs  ----------------------------
http://jobs.perl.org




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

Date: Wed, 07 Nov 2001 22:47:33 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: URGENT!  Please help me with this!
Message-Id: <x74ro6tcxy.fsf@home.sysarch.com>

>>>>> "MS" == Marianne Sisto <msisto@chat.carleton.ca> writes:

  MS> Firstly it is pathetic that u bothered to send me a copy directly
  MS> to make sure i read ur silly comments! U have no right to say I am
  MS> not skilled in logic for programming, u do not know anything about
  MS> me - there is not need to be unpleasant.  You are obviously not
  MS> skilled in the necessary fields of having a little patience and
  MS> understanding when dealing with other people and thats a sad way
  MS> to be.  I did NOT ask anyone to do my homework, I simply posted
  MS> code that I had a problem with!!  If u feel annoyed enough about
  MS> that to go to the trouble to write a stroppy reply, rather than
  MS> just ignore my original post then I feel sorry for you!  You
  MS> obviously have not much going on in ur life.  I did not post all
  MS> of my code because I was not asking people to look over my entire
  MS> assignment and like I said I isolated where the problem was - I
  MS> only wanted a little advice, it is sad that you have to have be
  MS> this way, I do not believe I did anything wrong by posting my
  MS> original method.  I will not be reading any reply u send to this
  MS> so u really needn't bother, I have better things to do and I
  MS> really hope that nobody else comes here hoping for a little
  MS> encouragement or advice!  ( Thank you to the person who did infact
  MS> give me some advice)

first, it is pathetic that you top post. read these pages to learn how
to quote properly

http://www.btinternet.com/~chiba/sbox/topposters.html
http://www.uwasa.fi/~ts/http/quote.html
http://www.geocities.com/nnqweb/nquote.html


secondly, UR is correctly spelled you're. u is spelled you. it helps to
write proper english in usenet. it makes you look like you have a neuron
or two functioning.

thirdly, your original post had code BUT NOT ENOUGH INFORMATION to debug
it. that is the bottom line. saying why doesn't this work:

	if ( $foo eq $bar )

is USELESS without example data and context. your post provided neither.

fourthly, i cc'ed you to make sure you saw this. i doubt you have the
skills to be a programmer since you can't even take logical
criticism. the comments about the missing information in your post are
legitimate. since you can't handle that feedback i doubt that you will
be able to learn from other technical types. that makes for a bad
programmer. hence, without knowing you personally, i doubt you will
become a good programmer. good luck.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
-- Stem is an Open Source Network Development Toolkit and Application Suite -
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Wed, 07 Nov 2001 13:37:54 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: using a variable in a subroutine name
Message-Id: <3BE98D92.CA0C4CA6@home.com>

Mark Jason Dominus wrote:
> 
> In article <3BE8672B.1D651035@home.com>,
> Michael Carman  <mjcarman@home.com> wrote:
>
> >Dominus:
> > >
> > > What's the problem?
> >
> >  a) I should have gone into more detail, as you do in
> >     http://perl.plover.com/varvarname.html
> 
> I think a close examination of that series of articles will show that
> none of the reasons presented apply to this situation.  (I might be
> wrong, of course, in which case I would be grateful if you would point
> it out.)

There isn't. I had skimmed through them before posting, just to be
refresh my memory, and saw nothing about this situation. Even so I find
them applicable in a general sense.

> >  b) I should have said that it won't work under 'use strict',
> >     which all non-trivial programs should have.
> 
> If you take as an article of absolute doctrine that "all non-trivial
> programs should work under 'use strict'", then yes, I see that there
> is a problem.  But it would seem to me that the problem was in the
> doctrine, not the code.

Understandable, but even if there's nothing harmful in using a symref in
this situation, there's no compelling reason to do so, either. I think
that the doctrine is sound:

  1) In general, symrefs are bad and dangerous.
  2) 'strict refs' stops you from using symrefs; ergo it's good.
     All non-trivial programs should use it.
  3) If you can't do something under 'strict refs', you probably
     shouldn't be doing it anyway. Look for a better way.
  4) If you know why using symrefs is good/necessary for a
     particular situation, go ahead and disable 'strict refs'
     locally.

Any time I find myself operating in (4), I feel vaguely dirty. ;)

You seem interested in the philosophy behind the use/avoidance of
symrefs. I think that's an admirable pursuit. For my part, I'm less
philosophical and more pragmatic.
 
> >My first thought was to put the subrefs directly into the loop:
> >
> >    foreach my $x (\&_send_email_zip, \&_send_email_txt,
> >                   \&_send_cp_txt, \&_send_cp_txt) {
> >       # ...
> >    }
> 
> [...]
> 
> >but I felt that that might be unclear to the OP and that using
> >a hash as a dispatch table might be more easier to understand.
                                       ^^^^^^^^^^^
Yikes! I have lousy grammar. :O

> I'd be interested to hear why you thought so.

It was a feeling, mostly, and as such not necessarily logical. :)

Something in the back of my mind said that a beginning programmer (who
is used to looping over strings and numbers) might be shocked at the
thought of looping over code references. Using the dispatch table seemed
like a good way to break the problem into smaller and simpler chunks.

I could be wrong of course; maybe the shorter solution is the clearer
one, even to novices.

-mjc


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

Date: Wed, 07 Nov 2001 14:42:43 -0600
From: Michael Carman <mjcarman@home.com>
Subject: Re: using a variable in a subroutine name
Message-Id: <3BE99CC3.C2ADD82C@home.com>

Mark Jason Dominus wrote:
> 
> In article <x7ofmetr3p.fsf@home.sysarch.com>,
> Uri Guttman  <uri@stemsystems.com> wrote:
> >
> > the specific case here may show hardwired sub names. but that
> > is rarely the case and the problem could be solved with multiple
> > methods.
> 
> I'm not sure what your point is here.  So what if it's rarely the
> case?  All programming problems are 'rarely the case'.  You have to
> program for the problem you have, not some other problem that someone
> on another continent is trying to solve.

If this question had been asked and answered in private correspondance,
I would agree, but this is a public forum.

Long before I ever started posting here, I lurked. I didn't have any
particular questions, but I was a Perl novice and was interested in
learning more. (I didn't even know about -w, use strict, or perldoc.
Those three things were probably the most valuable of everything I've
learned here.) So I followed threads that I found interesting, tried to
glean some useful information from them, and then tried to apply that
newfound knowledge to the tasks I had.

If I had read a thread with a symref question and a symref answer, I
might have thought to myself "Wow! I can do all sorts of cool stuff with
that!" I shudder to think what sort of atrocities I might have created
with that little bit of dangerous knowledge. I had a hard enough time
making my early forays into Perl -w and 'strict' clean.

So while I agree that the main focus of any thread should be answering
the specific question asked, I also feel that we must consider the
larger picture. Some people treat this newsgroup as a helpdesk, others
as a classroom.

> >showing a symref solution which may be ok here will potentially
> >influence others to use it where it is dangerous. that is a prime
> >reason never to show any symref solutions, especially here where
> >there are many newbie eyes.
> 
> I think that's a crappy philosophy.  We should encourage better
> understanding of real problems, not superstitious avoidance of certain
> techniques.

Well, it's easier to tell a newbie to never use symrefs and let them
learn of the exceptions later than to throw it all at them at once. Of
course, then you're doing a disservice to the mid-level programmers who
are ready to learn about those exceptions.

Ideally those of use who respond to questions would always give accurate
and *full* answers, but that just doesn't happen. We get tired, or we
want to help but don't have time to present the whole picture so we omit
the finer points.

I think we have a tendancy to assume that anyone asking a symref
question doesn't know enough Perl to be using them yet. Answering that
question is kind of like giving someone a driver's license without
making them take the test first.

-mjc


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 2087
***************************************


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