[16254] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3666 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 14 11:05:30 2000

Date: Fri, 14 Jul 2000 08:05:17 -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: <963587117-v9-i3666@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Fri, 14 Jul 2000     Volume: 9 Number: 3666

Today's topics:
    Re: "Perl Bowling" revisited with an array question (Keith Calvert Ivey)
    Re: "Perl Bowling" revisited with an array question (Bernard El-Hagin)
    Re: "Perl Bowling" revisited with an array question <iltzu@sci.invalid>
    Re: "Perl Bowling" revisited with an array question <aqumsieh@hyperchip.com>
        A Newbie Perspective [Was Re: ATTENTION PERL MACHOES!!! <elaine@chaos.wustl.edu>
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! (Randal L. Schwartz)
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! p3rlc0dr@my-deja.com
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!! <uri@sysarch.com>
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!! (Daniel Winsor - HESE)
    Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!! (NP)
    Re: Bizarre BEGIN block problem <flavell@mail.cern.ch>
    Re: Bizarre BEGIN block problem (Tad McClellan)
        cookies <jaedma@yahoo.com>
        Creating a directory with perl on Solaris 2.6 <mesarch2@cs.com>
    Re: Creating a directory with perl on Solaris 2.6 <mesarch2@cs.com>
        different namespace for functions from a library? <samara_biz@hotmail.com>
    Re: Escaping strings. (Will England)
    Re: I want to use ? in CGI! <taboo@doofa.net>
    Re: I want to use ? in CGI! <arild@langtind.no>
    Re: Is there a limit for form of the number of input fi <amy@wirespeed.com>
    Re: Is this an application for PERL?? <mauldin@netstorm.net>
        local and use strict <bcaligari@shipreg.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Fri, 14 Jul 2000 13:17:05 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <3971128f.37528294@nntp.idsonline.com>

bernard.el-hagin@lido-tech.net (Bernard El-Hagin) wrote:

>Jim Kauzlarich <o1technospam@skyenet.nospam.net> wrote:
>
>>So, I guess my question is:  Is there any function that will shrink (at this
>>point I don't care which end it comes off of) an array, and return the newly
>>shrunken array.
>
>perldoc -f splice

Eh?  Like shift() and pop(), splice() returns the removed
elements, not the newly shrunken array.

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----


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

Date: Fri, 14 Jul 2000 14:14:16 GMT
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <slrn8mu7p5.9rf.bernard.el-hagin@gdndev25.lido-tech>

On Fri, 14 Jul 2000 13:17:05 GMT, Keith Calvert Ivey <kcivey@cpcug.org> wrote:
>bernard.el-hagin@lido-tech.net (Bernard El-Hagin) wrote:
>
>>Jim Kauzlarich <o1technospam@skyenet.nospam.net> wrote:
>>
>>>So, I guess my question is:  Is there any function that will shrink (at this
>>>point I don't care which end it comes off of) an array, and return the newly
>>>shrunken array.
>>
>>perldoc -f splice
>
>Eh?  Like shift() and pop(), splice() returns the removed
>elements, not the newly shrunken array.

Duh. But if you splice the array and return *it* wouldn't that solve the
problem? I was just pointing the guy in the right direction.

Bernard
--
perl -e'@x=(3,2,4,1,3,2,1,3,1,3,2,3,3,2,3,0,0,1,2,1,1,1,4,1,2,1,1,2,2,1,
2,1,2,1,2,1,2,1,1,1,2,1,0,0,3,2,3,2,3,2,1,1,1,1,1,2,4,2,3,2,1,2,1,0,0,1,
2,1,1,1,4,1,2,1,1,1,2,2,1,1,4,1,1,1,2,1,1,1,2,1,0,0,3,2,4,1,1,2,1,1,1,3,
1,1,1,4,1,1,1,2,1,1,3,0,0);sub x{print q x$xx$_;print q x x x shift@x};#
while(defined($_=shift @x)){s o0o\no;$_!=0?x:print}' #Symmetry yrtemmyS#


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

Date: 14 Jul 2000 14:11:11 GMT
From: Ilmari Karonen <iltzu@sci.invalid>
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <963583664.9274@itz.pp.sci.fi>

In article <3971128f.37528294@nntp.idsonline.com>, Keith Calvert Ivey wrote:
>Eh?  Like shift() and pop(), splice() returns the removed
>elements, not the newly shrunken array.

Ah, but it's all in the way you look at it..

  my @all_but_first = splice @array, 1;

  my @all_but_last = splice @array, 0, -1;

-- 
Ilmari Karonen - http://www.sci.fi/~iltzu/
"The screwdriver *is* the portable method."  -- Abigail
Please ignore Godzilla and its pseudonyms - do not feed the troll.



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

Date: Fri, 14 Jul 2000 14:34:03 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: "Perl Bowling" revisited with an array question
Message-Id: <7abt00kcgy.fsf@merlin.hyperchip.com>


"Jim Kauzlarich" <o1technospam@skyenet.nospam.net> writes:

> So, I guess my question is:  Is there any function that will shrink (at this
> point I don't care which end it comes off of) an array, and return the newly
> shrunken array.

Hmmm .. what's wrong with:

	my @all_except_last  = @array[0 .. $#array - 1];
	my @all_except_first = @array[1 .. $#array];

??

--Ala


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

Date: Fri, 14 Jul 2000 14:01:00 GMT
From: Elaine -HFB- Ashton <elaine@chaos.wustl.edu>
Subject: A Newbie Perspective [Was Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!]
Message-Id: <396F1D1B.79729234@chaos.wustl.edu>

Philip Lees wrote: 
> I'm struggling on with Perl, but I don't expect to get any help from
> this newsgroup.

You are a wise person. 

e.


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

Date: 14 Jul 2000 06:41:51 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <m1g0pckew0.fsf@halfdome.holdit.com>

>>>>> "Nnickee" == Nnickee  <nnickee@nnickee.com> writes:

Nnickee> And you won't, if you say stuff like that.  You'll get back from this
Nnickee> group what you put into it.  If you follow the conventions and
Nnickee> "standards", you'll be rewarded with all the help you need.

Nnickee> I don't think you (and many others, not just picking on you here)
Nnickee> realize what a terrific resource this newsgroup is.  Some of the very
Nnickee> best Perl coders in the world - *in the world*! - spend their valuable
Nnickee> free time reading this group and answering the same questions over and
Nnickee> over again.  These folks don't have to do this.  They do it to give
Nnickee> back to the Perl community.  They don't ask for a single solitary
Nnickee> penny for this (and they're worth far more than that, I assure you!).
Nnickee> The very least that we, the beginners, the askers, can do is to follow
Nnickee> the Guru's "rules" since we're asking them to give us for free what
Nnickee> they could very well charge us for (answers, advice, code snippets,
Nnickee> etc.).

Well said.  This is one of the clearest statements about the situation
that I've seen in a long time.  Thank you!

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Fri, 14 Jul 2000 14:00:16 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kn6d5$cgs$1@nnrp1.deja.com>

In article <slrn8mt0te.gt.sjs@john.sympatico.ca>,
  sjs@yorku.ca wrote:
>
> No, you come here to berate other regular contributors, now and then
> calling them chauvinists, or otherwise trying to lash stilts to your
> equine.

BECAUSE THEY ARE CHAUVENISTS AND ELITISTS AND YOU ARE THEIR KING.

> Perhaps this will, by extension, cure your affliction as well.

CAN YOU WRITE ME A GUESTBOOK PLEASE?

--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 14 Jul 2000 14:06:22 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kn6of$cli$1@nnrp1.deja.com>

In article <9fbrmsgq6igv6djequtk0geo526mpdo3bf@4ax.com>,
  Bart Lateur <bart.lateur@skynet.be> wrote:
> p3rlc0dr@my-deja.com wrote:
>
> >And never forget: MATT RULER!
>
> Maybe if you use it for some spanking.

BART YOU NEED A SPANKING WITH MATT RULER.

--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 14 Jul 2000 14:14:21 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kn77b$d2n$1@nnrp1.deja.com>

In article <m1g0pckew0.fsf@halfdome.holdit.com>,
  merlyn@stonehenge.com (Randal L. Schwartz) wrote:
>
> Well said.  This is one of the clearest statements about the situation
> that I've seen in a long time.  Thank you!

ASIDE FROM YOUR CLAIMS OF SELFLESSNESS AND SACRIFICE, WHAT HAVE YOU
DONE FOR THE PERL COMMUNITY TODAY?  HAND SHAKING, BEER MOOCHING,
DONATION TAKING, CROONING AND BEING FRIENDLY ON comp.lang.perl.misc
DOES NOT COUNT.  EXCLUDING THOSE THINGS, WHAT HAVE YOU DONE MISTER
RANDALLLL?

IF comp.lang.perl.misc IS A REPRESENTATIVE OF THE PERL COMMUNITY THEN
THE PERL COMMUNITY IS A SELFISH, SELF-SERVING AND BOORISH ONE.  OH, MAY
YOU ALL FEAR THE WRATH OF GANESH.

--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 14 Jul 2000 14:19:50 GMT
From: p3rlc0dr@my-deja.com
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <8kn7hi$de6$1@nnrp1.deja.com>

In article <m1g0pckew0.fsf@halfdome.holdit.com>,
  merlyn@stonehenge.com (Randal L. Schwartz) wrote:
>
> Well said.  This is one of the clearest statements about the situation
> that I've seen in a long time.  Thank you!
>

I SHOULD ALSO ADD THAT YOU SHOULD NOT CRAP ON THE PEOPLE WHO SUPPORT
YOU ... AND THIS INCLUDES SUPPORTING RUDENESS AND MEANNESS ON THIS
NEWSGROUP.

IF YOU DON'T LIKE THE QUESTIONS THAT YOU'RE BEING ASKED IN THIS
NEWSGROUP, DON'T ANSWER THEM.  IF YOU FIND THAT YOU STILL CAN'T DEAL
WITH PEOPLE WHO ARE LEARNING PERL (AND NOT PAYING YOU A PRETTY PENNY
FOR YOUR SERVICES) ... PLEASE LEAVE THIS GROUP AND DON'T COME BACK.
FOR THIS, I HAVE THE HIGHEST PRAISES FOR TOM CHRISTIANSEN.  INSTEAD OF
PERPETUATING THIS RUDENESS, HE OPTED TO NOT SUPPORT THIS BAD BEHAVIOR
AND CHOSE TO WRITE BOOKS AND HERD GOATS IN RURAL COLORADO INSTEAD.

--
Ganesha, p3rlc0dr and WEB MISTRESS
Guestbooks, hit counters, shopping carts: Get Matt's Script Archive


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Fri, 14 Jul 2000 14:40:40 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!!!!!
Message-Id: <x7sntcixlk.fsf@home.sysarch.com>

>>>>> "p" == p3rlc0dr  <p3rlc0dr@my-deja.com> writes:

  p> ASIDE FROM YOUR CLAIMS OF SELFLESSNESS AND SACRIFICE, WHAT HAVE YOU
  p> DONE FOR THE PERL COMMUNITY TODAY?  HAND SHAKING, BEER MOOCHING,
  p> DONATION TAKING, CROONING AND BEING FRIENDLY ON comp.lang.perl.misc
  p> DOES NOT COUNT.  EXCLUDING THOSE THINGS, WHAT HAVE YOU DONE MISTER
  p> RANDALLLL?

  p> IF comp.lang.perl.misc IS A REPRESENTATIVE OF THE PERL COMMUNITY THEN
  p> THE PERL COMMUNITY IS A SELFISH, SELF-SERVING AND BOORISH ONE.  OH, MAY
  p> YOU ALL FEAR THE WRATH OF GANESH.

oooh, our little troll seems to speak better english now. not asking for
help from your friends? now that youhave publicly been caught in a lie,
go away. you are not here to learn or talk about perl. flaming randal is
not on topic here. your petty diatribes are a waste of electrons.

i smell a moronzilla here.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 14 Jul 2000 14:33:59 GMT
From: dwinsor@Eng.Sun.COM (Daniel Winsor - HESE)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!
Message-Id: <8kn8cn$39d$2@eastnews1.east.sun.com>

In article 1@nnrp1.deja.com, p3rlc0dr@my-deja.com writes:
>In article <m1g0pckew0.fsf@halfdome.holdit.com>,
>  merlyn@stonehenge.com (Randal L. Schwartz) wrote:
>>
>> Well said.  This is one of the clearest statements about the situation
>> that I've seen in a long time.  Thank you!
>
>ASIDE FROM YOUR CLAIMS OF SELFLESSNESS AND SACRIFICE, WHAT HAVE YOU
>DONE FOR THE PERL COMMUNITY TODAY?  HAND SHAKING, BEER MOOCHING,
<snip>

Wait, wait, wait...  Beer Mooching?  I've only got one thing to say - 
where'd you get it?  I could really really use one now.  Jeez, it's only
10:30 and I want a beer...


---
Dan Winsor



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

Date: Fri, 14 Jul 2000 15:02:14 GMT
From: nvp@spamnothanks.speakeasy.org (NP)
Subject: Re: ATTENTION PERL MACHOES!!!!!!!!!!!!!!!
Message-Id: <WXFb5.36371$t91.437784@news4.giganews.com>

On 14 Jul 2000 14:33:59 GMT, Daniel Winsor - HESE <dwinsor@Eng.Sun.COM> wrote:
: 
: Wait, wait, wait...  Beer Mooching?  I've only got one thing to say - 
: where'd you get it?  I could really really use one now.  Jeez, it's only
: 10:30 and I want a beer...

"Ganesha" seems to be refering to "buy Randal a beer nights" that take
place periodically at various Perl Mongers groups in various
locations.  IIRC, "buy Randal a beer nights" have been a semi-regular
occurance for the last couple of years.

<kidding emphasis="REALLY">
Since I've bought all of Randal's books and I'm sure that he's loaded--
I personally wouldn't mind if he bought me a beer next time. :-)
</kidding>

-- 
Nate II



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

Date: Fri, 14 Jul 2000 15:50:33 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Bizarre BEGIN block problem
Message-Id: <Pine.GHP.4.21.0007141545160.20198-100000@hpplus03.cern.ch>

On Thu, 13 Jul 2000, Ed Foy wrote:

> I do not know if SGML is your employer or a pseudonym for your
> unemployment.

*giggle*

[...]
> doesn't, and who we conduct business with and who we don't. This facet
> makes up for being so stupid.

If I were in such a position, I would be ashamed of myself.  (Perhaps
that's one reason that I'm not in such a position ;-)

> save a lot of time and money to trash your resume as soon as it comes in
> the door. The same applies to your employer. Any company willing to
> tolerate childishness is not a company trustworthy to conduct business
> with.

Great, you just disqualified yourself as a potential employer.  I
doubt that I'm alone here in that assessment?

-- 

        "Mir ist es ein Rätsel wie man mit minimalem Verstand so einen 
         Unfug fabrizieren kann."   - Adrian Knoth




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

Date: Fri, 14 Jul 2000 09:39:38 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Bizarre BEGIN block problem
Message-Id: <slrn8mu60q.d6f.tadmc@magna.metronet.com>

On Thu, 13 Jul 2000 22:50:58 GMT, Ed Foy <ed@nospam.com> wrote:
>
>Tad McClellan wrote in message ...
>>On Thu, 13 Jul 2000 17:53:05 GMT, Ed Foy <ed@nospam.com> wrote:
>>>
>>>Does this comment mean SGML Consulting will only work with the "Latest
>>>and Greatest" implementation of something or reinvents the wheel
>because
>>>the original wheel doesn't use the latest set of bugs?
>>
>>
>>Ad hominem attack.
>>
>>I'm not feeling sorry anymore.
>>
>>*plonk*
>
>
>Hmmm...not very professional. 


Well yes, attacking a person instead of the person's ideas
_is_ unprofessional. You should try to avoid doing that in
a public, archived, forum.


Making a killfile entry is not unprofessional.

Suffering fools is not a requirement of "professionalism".


>In fact, the question was in earnest and
>consistent with your statement. 


No it isn't.

Here's my statement again:

>>I (and probably everybody else) have no interest in potential bugs
>>in two year old software.


There is nothing there regarding the technology that I
consult in, nor about how current the software that I use is.

If I decide to use unmaintained software, I realize that all
of its support is up to me. I don't like supporting OPC, and
so avoid using unsupported software whenever possible.

It does not make business sense to spend time fixing bugs
that have already been fixed. I just go get the patch.


>With new projects it is reasonable to
>start with a clean sheet and people who can work with currency. Those
>who are wedded to the "old ways" are fine for maintenance projects but
>useless for new projects.


So your ISP is fine for maintenance projects but useless 
for new projects!

At least we agree on that.



Find a better ISP, or live with the bugs.

It is your decision to stick with unsupported software. Don't
expect the Perl community to help you overcome the consequences
of *your* decision.

You've decided to go it alone, so you are, well..., alone.

Fix the bug yourself (or change your decision).


>FYI, apart from asking the occasional question in NGs, I follow the
>questions, response, the names of the players and their companies. 


Then you have doubtless seen the thousands of Perl questions
that I have answered here over the years.

Why would you want to exclude yourself from getting answers
to Perl questions that may come up in the future?

All you would have had to do was add an ".invalid" after the ".com",
and none of this would have happened!


>It is
>exceedingly useful to do so. 


Yes. You might even pick up on how to spam block effectively.

Or maybe not...


>Resumes are twitted out based on NG
>activity and companies are also similarly excluded.


I have used that approach myself many times while evaluating candidates.


>I do not know if SGML is your employer 


SGML Consulting is a _verb_, like the Perl programming also
listed in my .sig.

SGML is a technology ( comp.text.sgml ). It was used by the w3c
to define their markup language (HTML) and is the father of
the (stripped-down) XML technology.



I do not have an "employer".

Don't want one either.

I prefer having "clients".


>or a pseudonym for your
>unemployment. 


My periods of unemployment are by _design_.

I make more now working 25 weeks a year than I did working
46 weeks a year as a captive employee at a Fortune 50 company.

(Oh. They seem to have dropped in the ranking a bit, so make
 that a "Fortune 52" company then.
:-)


The well-worn "consulting is a euphemism for unemployment" joke
is nearly always invoked by captives.

Pardon me, but your jeolousy is showing...


>It matters not as both are now listed in the twit file.
                                              ^^^^

There you go with that "latin phrase" thingy again.

Name calling is still unprofessional.

And since you have decided to killfile the technologies I work with,
you should also make an entry for Perl.

(_that_ should cut down on the number of posts to read here
 in clp.misc.
)


>You complete childishness and lack of professionalism speak volumes.


I am completely comfortable with readers of this thread deciding
which of us fills those rolls.


>Alas, yes, I'm one of those stupid executive management types. 


Well that explains your not grasping the basics of spam blocking at least.

Nobody expects PHBs to understand the technologies that they use.


>But on
>the bright side, 


You seem (in this thread anyway) to be on the errr, ... "other" side.


>I'm on the top of the heap when it comes to who gets
>their next paycheck and who doesn't, who gets a contract and who
>doesn't, and who we conduct business with and who we don't. 


Congratulations!


>This facet
>makes up for being so stupid.


So says you.

Those suffering under your stupidity may be of a differing opinion.


>For others in the NG take heed. It is common practice for management and
>human resources types to follow NGs for the purpose of establishing
>competency in professional fields. 


Too true.


>Those who cannot conduct themselves
>in a professional manner in a professional forum will behave the same
>way in the work environment. So if you don't mind limiting your
>horizons, by all means, get out in public and be a complete jerk 


Conforming to netiquette is not being a jerk, it is being clueful.

You should try it.


>The same applies to your employer. 


But I don't have one of those.


>Any company willing to
>tolerate childishness is not a company trustworthy to conduct business
>with.


Right.

So avoid conducting business with Ed's 'nospam.com' company.


-- 
    Tad McClellan                          SGML Consulting
    tadmc@metronet.com                     Perl programming
    Fort Worth, Texas


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

Date: Fri, 14 Jul 2000 09:07:12 -0500
From: "Jim" <jaedma@yahoo.com>
Subject: cookies
Message-Id: <396f1ef4$0$8316$7f8943f3@newsreader.visi.com>

I have done cookies before and had no trouble--But for some reason when I
put

my $cookname='favorite';
my $packedcookie=cookie(-NAME=>$cookname,
                    -VALUE=>$favo,
                         );
print header(-COOKIE=>$packedcookie);

it prints the cookie code on a HTML page.  Its the same code I used in the
past with no trouble...Any Ideas why it's not generatating a cookie??  Why
is it generating a page like this(which is what the cookie code should look
like-but it comes up on an HTML page):???

Set-cookie:
favorite=1.%3Ca%20href%3D%22http%3A%2F%2Fwww.ej-ses.com%2Fsunglass%2Fcgi%2Fs
how%2Fangel%2FINV%2Fgidget.inv%22%3Eangel%20gidget%3C%2Fa%3E2.%3Ca%20href%3D
%22http%3A%2F%2Fwww.ej-ses.com%2Fsunglass%2Fcgi%2Fshow%2Fangel%2FINV%2Fspryt
e.inv%22%3Eangel%20spryte%3C%2Fa%3E%3CBR%3E3.%3Ca%20href%3D%22http%3A%2F%2Fw
ww.ej-ses.com%2Fsunglass%2Fcgi%2Fshow%2Fangel%2FINV%2Fpurrr.inv%22%3Eangel%2
0purrr%3C%2Fa%3E%3CBR%3E4.%3Ca%20href%3D%22http%3A%2F%2Fwww.ej-ses.com%2Fsun
glass%2Fcgi%2Fshow%2Fangel%2FINV%2Fpurrr.inv%22%3Eangel%20purrr%3C%2Fa%3E;
path=/cgi-bin/ Date: Thu, 13 Jul 2000 18:04:32 GMT Content-type: text/html

Thanks for any help








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

Date: Fri, 14 Jul 2000 10:22:06 -0400
From: "Mike Mesarch" <mesarch2@cs.com>
Subject: Creating a directory with perl on Solaris 2.6
Message-Id: <8kn7kp$g7e$1@sshuraaa-i-1.production.compuserve.com>

I'm trying to use perl to create a directory and then set the correct
ownership and permissions.  The problem is that depending on who runs the
script not everyone gets the correct permissions.  If root runs it than they
all get set fine, but if an ordinary user runs the script the the other
group gets nothing set.  Other than that nothing has changed.  Any thoughts?
-Mike




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

Date: Fri, 14 Jul 2000 10:34:23 -0400
From: "Mike Mesarch" <mesarch2@cs.com>
Subject: Re: Creating a directory with perl on Solaris 2.6
Message-Id: <8kn8bp$rq5$1@sshuraac-i-1.production.compuserve.com>

What's even stranger is that other times the permissions don't get set to
anything remotely like what was issued.
<snip>
($dev,$ino,$mode,$nlink,$uid,$gid) = stat($dir);
$mode = sprintf"%04o", $mode & 07777;
$finaldir = "$dst"."$dir";
unless (-r $finaldir) {
    mkdir("$finaldir",$mode) || die "Could not create $finaldir\n";
    print "mkdir $finaldir $mode\n";
}
<snip>

For my curiosity I printed out what should be happening: mkdir
/home/mmesarch/temp/test/home 0755
But, when I do an ls on the directory this is what I get.

sxl4haaa:pts/1:~/> ls -l
d-wxr----x   3 root     other         96 Jul 14 10:26 home

Any ideas?
Thanks!
Mike

"Mike Mesarch" <mesarch2@cs.com> wrote in message
news:8kn7kp$g7e$1@sshuraaa-i-1.production.compuserve.com...
> I'm trying to use perl to create a directory and then set the correct
> ownership and permissions.  The problem is that depending on who runs the
> script not everyone gets the correct permissions.  If root runs it than
they
> all get set fine, but if an ordinary user runs the script the the other
> group gets nothing set.  Other than that nothing has changed.  Any
thoughts?
> -Mike
>
>




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

Date: Fri, 14 Jul 2000 09:34:05 -0400
From: "Alex T." <samara_biz@hotmail.com>
Subject: different namespace for functions from a library?
Message-Id: <396F16CD.D5EC0D50@hotmail.com>

Hi,
I have a question and I really hope someone can give me the right
asnwer.

I had a script, which was working just right:

my %Replacements;
$Resplacements{TEST} = '<p>test</p>;
 ...
sub displayPage{
 ...
 while( $line = <FILE> ){
  foreach my $name (keys %Replacements) {
   $line =~ s/<!-- REPLACE.$name -->/$Replacements{$name}/i;
  } #foreach
  $Response->Write($line);
 } #while
 ...
}

After I moved displayPage() into a library called asp.pl, this function
stopped working correctly.

my script now looks like:

require "/some/path/to/asp.pl";

my %Replacements;
$Resplacements{TEST} = '<p>test</p>;
 ....
&displayPage('apage.html');

If I remove "my" from "my %Replacements" it works ok again. Could
someone explain what difference it makes? Does it have anything to do
with namespaces? I thought functions from a library are imported into
the main namespace.., so "my ..." should have worked just fine.

Thanks!!!

Alex



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

Date: Fri, 14 Jul 2000 13:56:16 GMT
From: will@mylanders.com (Will England)
Subject: Re: Escaping strings.
Message-Id: <slrn8mu73d.149.will@mylanders.com>

On Fri, 14 Jul 2000 02:15:04 -0700, chuckw 
<chuckwNOchSPAM@silverlink.net.invalid> wrote:
<snip>
>My question: How do I accept input with these characters (", ', `
>etc) without escaping them? Is there a way to render the string
>"inert" so that when it is evaluated in my SQL statement, the
>errant characters don't clog the works???
>

In the <snipped> bit, you mentioned that you do *not* have control
over the apps that pull data from the database.  Without
control over that, you are SOL.

1) Talk to the folks who write the apps that pull data from the
   database.  See if they un-escape special characters.  If they
   have 1/2 of a clue, they should be.  

2) If they don't, won't or aren't; or you can't talk to them,
   you can just remove the offending characters.  I've had to 
   do this before.  It sucks, but thats the way it is.  

HTH.

Will

-- 
  "If Al Gore invented the Internet, then I invented spellcheck!"
      Dan Quayle, quoted at the National Press Club, 8/3/1999 
         pgpkey at http://will.mylanders.com/pub_pgp.asc 
  Recovery page: http://will.mylanders.com/    will@mylanders.com 


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

Date: 14 Jul 2000 11:27:49 +1000
From: "Kiel Stirling" <taboo@doofa.net>
Subject: Re: I want to use ? in CGI!
Message-Id: <396e6c95$1_2@nexus.comcen.com.au>


"langtind" <arild@langtind.no> wrote:
>How do I make a cgi-script that understand script.cgi?something
>I have made to make: script.cgi something by using ARGV[0)
>
>Trond Aage
>
Look at perldoc CGI

#!/usr/bin/perl
use CGI 'param';
$input=param('input');
print "Content-Type: text/html\n\n";
print $input;

this will read in input from the query string ie,
http://www.your.com/cgi-bin/script.cgi?input=woohaa
it would print woohaa

Kiel Stirling



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

Date: Fri, 14 Jul 2000 14:54:34 GMT
From: "langtind" <arild@langtind.no>
Subject: Re: I want to use ? in CGI!
Message-Id: <KQFb5.2853$Dxe.183631872@news.telia.no>

I just want to thank you for all the help I got, i really made it (this
time)!

Thanx!
Trond Aage

"Kiel Stirling" <taboo@doofa.net> wrote in message
news:396e6c95$1_2@nexus.comcen.com.au...
>
> "langtind" <arild@langtind.no> wrote:
> >How do I make a cgi-script that understand script.cgi?something
> >I have made to make: script.cgi something by using ARGV[0)
> >
> >Trond Aage
> >
> Look at perldoc CGI
>
> #!/usr/bin/perl
> use CGI 'param';
> $input=param('input');
> print "Content-Type: text/html\n\n";
> print $input;
>
> this will read in input from the query string ie,
> http://www.your.com/cgi-bin/script.cgi?input=woohaa
> it would print woohaa
>
> Kiel Stirling
>




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

Date: Fri, 14 Jul 2000 08:53:18 -0500
From: "Amy" <amy@wirespeed.com>
Subject: Re: Is there a limit for form of the number of input fields?
Message-Id: <smu6lojnd6105@corp.supernews.com>

You are right.  After I changed the get to post, the next page is not blank
anymore.  Thanks for the help.

Amy

Gmo <admin@overdoos.dhs.org> wrote in message
news:fltb5.136964$xe3.968443@nlnews00.chello.com...
> I thought the get methode of forms where limited in length of characters
> input  and the post methode can contain more characters input to the cgi
it
> that makes sence. if im right on this that might be it .. or the next page
> that was totally blank html was a script that didnt work right.
>
> Me =]
>
> --
> ________________________________________
>
> Cuurent Project: Linking Directory
> http://www.overdoos.com/
> ________________________________________
> Amy <amy@wirespeed.com> wrote in message
> news:smsc3dp7nd6128@corp.supernews.com...
> > I am using Perl to write a webpage and let the user to enter information
> for
> > many topics, each topic has 8 input fields.  I gradually increased the
> > number of topics all the way to 7, they all works fine after I submitted
> and
> > the data were saved.  but when I used 8 or larger number, the next page
> > after the submitted button totally blank.
> >
> > I wonder, is there a limit for form of the # of input fields? Can
somebody
> > tell me about this?  If there isn't one, I guess I have to find out why
> this
> > happens to me.
> >
> > Thanks!
> >
> > Amy!
> >
> >
> >
> >
>
>




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

Date: Fri, 14 Jul 2000 14:02:38 GMT
From: James Mauldin <mauldin@netstorm.net>
Subject: Re: Is this an application for PERL??
Message-Id: <396F1CCD.5EA9F374@netstorm.net>

Abigail wrote:

> What you are asking is fairly trivial, and that indicates you hardly have any
> Perl knowledge (confirmed by the fact you don't know how to spell Perl). It's
> much better to stick to a language you know.
>

Why?  What's wrong with learning Perl?  I would have thought that would be a Good
Thing.  Everybody has to start somewhere ...

-- Jim



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

Date: Fri, 14 Jul 2000 16:58:02 +0200
From: "Brendon Caligari" <bcaligari@shipreg.com>
Subject: local and use strict
Message-Id: <8kn96f$gor$1@news.news-service.com>

Trying to figure out how to make correct use of 'local' variables using
'strict'

Am i on the right track?
1) delcaring the variable with say....  use vars ('$z');

and say..having code as in

#!/usr/bin/perl -w
use strict;

use vars ('$z');


$z = "Donkey\n";
two();
one();
two();
exit(0);


sub one {
 local( $z );
 $z = "Ass\n";
 two();
 return(1);
}

sub two {
 print($z);
 return(1);
}
---------------------

is it good practice to 'localise' $_ , etc?

Brendon
++++





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

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


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