[11936] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5536 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat May 1 15:07:15 1999

Date: Sat, 1 May 99 12:00:19 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sat, 1 May 1999     Volume: 8 Number: 5536

Today's topics:
        Autmatic form submission in perl script <mmelton@together.net>
    Re: Autmatic form submission in perl script <flavell@mail.cern.ch>
    Re: Can I get multiple line or cut/paste input? (Tad McClellan)
    Re: checking the existence of a directory (Bart Lateur)
    Re: checking the existence of a directory (Larry Rosler)
    Re: Fill out someone else's form? cindycrawford@my-dejanews.com
        HELP: Embedded SQL queries, How do you do it? <no_mail_please@nowhere.com>
        HTTP_REFERER (Steve MacLellan)
    Re: HTTP_REFERER <design@raincloud-studios.com>
    Re: I pay $$$ for simple perl routine cindycrawford@my-dejanews.com
    Re: Learning Perl for the first time <jbc@shell2.la.best.com>
    Re: Newsfeed and Local Weather (Larry Rosler)
        pattern matching bing-du@tamu.edu
    Re: pattern matching (Larry Rosler)
    Re: pattern matching (Jason)
    Re: RegEx for matching Mbx "From " delimeter (Ronald J Kimball)
    Re: RegEx for matching Mbx "From " delimeter <tchrist@mox.perl.com>
    Re: Sorting numbers (Bart Lateur)
    Re: Sorting numbers <tchrist@mox.perl.com>
    Re: Sorting numbers (Larry Rosler)
        Throw a person a fish... (Larry Rosler)
    Re: using perl to manage passwords? (Steve MacLellan)
    Re: using perl to manage passwords? (Tad McClellan)
    Re: Where is LWP: POP3Client.pm? <huymle@gis.net>
    Re: Won't write to file in the middle of CGI script (Michel Dalle)
    Re: Won't write to file in the middle of CGI script (Bart Lateur)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Sat, 1 May 1999 12:51:15 -0400
From: "Matt Melton" <mmelton@together.net>
Subject: Autmatic form submission in perl script
Message-Id: <372b3043@news.together.net>

In a standard html file, a form can be autmatically submitted via the
following:

<BODY onload="this.document.example.submit();">
<FORM NAME="example" ACTION="./checkid.cgi" METHOD=POST>
</FORM>

However, I have failed to get  this to work in a perl script.  Any
suggestions?

Thanks,
Matt




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

Date: Sat, 1 May 1999 19:28:42 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Autmatic form submission in perl script
Message-Id: <Pine.HPP.3.95a.990501190804.29750B-100000@hpplus01.cern.ch>

On Sat, 1 May 1999, Matt Melton wrote:

> In a standard html file, a form can be autmatically submitted via the
> following:
> 
> <BODY onload="this.document.example.submit();">
> <FORM NAME="example" ACTION="./checkid.cgi" METHOD=POST>
> </FORM>
> 
> However, I have failed to get  this to work in a perl script.

Your design consists of a (fragile) combination of some HTML with some
Javascript, which you're presumably sending to a client agent, which may
or may not decide to action your request.  Maybe you have some good
reason for putting yourself (or rather, your users) at risk of this
fragile design - let's not pursue that issue here and now. 

Where does Perl come into this? 

You don't say.  Maybe you're trying to generate the above WWW document
by executing some Perl at the server.  In which case, the point is that
the WWW client could not care a fig how you generated the WWW document: 
all that it gets over the network is whatever the server sent it,
irrespective of how it was actually created. 

So, what's the real question?  If you're asking how to design a CGI
script, then comp.infosystems.www.authoring.cgi is where you need to be. 
If you have a Perl language question, then it belongs here, after you've
consulted the available documentation. 

If you would only tell the group just what it is you're trying to
achieve, you'd give yourself the chance of a much better answer, maybe
even a much more effective approach to solving your unstated problem. 

HTH



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

Date: Sat, 1 May 1999 05:46:09 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Can I get multiple line or cut/paste input?
Message-Id: <1hieg7.v71.ln@magna.metronet.com>

Mitch (portboy@home.com) wrote:
: Okay, when my script is running, I need to prompt a user for input that
: contains multiple lines.  The user will probably only cut and paste into
: this portion.


: The user can either input or cut/paste in the stuff, and then on the
: final line hit three .'s and then the contents should be written to a
: file.  Can this be done in PerL?  If so, can somebody give me some
: direction on finding the solution to this question.


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

my $lines;

{ local $/ = "...\n";

  print 'type lines. Enter three dots (...) and return when done: ';
  chomp($lines = <STDIN>);
}

open(FILE, '>file') || die "could not open 'file'  $!";
print FILE $lines;
close(FILE);
---------------------


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


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

Date: Sat, 01 May 1999 16:57:54 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: checking the existence of a directory
Message-Id: <372c320e.1477976@news.skynet.be>

Paul Davies wrote:

>I wish to create a directory but only if it does not already exist.

Just go ahead and do it. If it already existed, nothing will have
happened. It only failed.

Or, you can check it's existence before trying to create it, using 
-d $directory.

	Bart.


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

Date: Sat, 1 May 1999 10:38:49 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: checking the existence of a directory
Message-Id: <MPG.1194dc02762f21c398998b@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <372c320e.1477976@news.skynet.be> on Sat, 01 May 1999 
16:57:54 GMT, Bart Lateur <bart.lateur@skynet.be> says...
> Paul Davies wrote:
> >I wish to create a directory but only if it does not already exist.
> 
> Just go ahead and do it. If it already existed, nothing will have
> happened. It only failed.

I've seen that advice before, but I don't think much of it.  If the 
mkdir fails, you don't know whether the directory already existed or 
couldn't be created.  So you have to either examine $! or do the -d test 
anyway.  So why not just test first and avoid the unnecessary mkdir 
system call?

> Or, you can check it's existence before trying to create it, using 
> -d $directory.

Yes.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 01 May 1999 17:15:51 GMT
From: cindycrawford@my-dejanews.com
Subject: Re: Fill out someone else's form?
Message-Id: <7gfcs5$5gt$1@nnrp1.dejanews.com>

no problem.. we can help you
check our site at:
http://cgi-shop.com
and contact us

cindy

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sat, 01 May 1999 14:48:47 -0400
From: User Host <no_mail_please@nowhere.com>
Subject: HELP: Embedded SQL queries, How do you do it?
Message-Id: <372B4C8F.AED601DF@nowhere.com>

I'm using Perl/CGI, interfacing SQL with Sybase for a school project.

In short, I have an SQL query that sends back all the tuples in a
certain table. Now, I then call a function that I wrote that does
another query based on a value from the intial one.  This is kinda like
a nested for-do loop in a sense.

ex.
 if (&dbi_dosql("select * from request")) {
  while (%row_req=&dbi_nextrow) {
print &GETNAME($row_req{'ssn'});
}
}

GETNAME procedure looks like this:
$f_ssn='"'.$_[0].'"';
 if (&dbi_dosql(select * from patron where ssn=$f_ssn)) {
  if (local(%row)=&dbi_nextrow) {
   return "$row{'l_name'}, $row{'f_name'}";
  }
  else {
   return "Not Found";
  }
 }
 else {
  print('<P><b><font color="#0000cc">ERROR:</font> Function GETNAME
failed.</b><P>');
  return ERROR;
 }


When I do something like this, I get the following error message when
testing at the command line:
"DB-Library error: Attempt to initiate a new SQL Server operation with
results pending."

Does anyone have any idea how to get around this?  I need to do embedded
queries similar to this, a lot. I tried logging into the DB again for
each function call in order to create another i/o stream, but that
didn't work.

ANY help at all would be GREATLY appreciated. Thanks for reading this.




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

Date: Sat, 01 May 1999 17:00:25 GMT
From: maclell@col.ca (Steve MacLellan)
Subject: HTTP_REFERER
Message-Id: <372b40ef.6096909@news.tor.metronet.ca>

Some Perl scripts I am trying to install on Red Hat are looking for
the HTTP_REFERER variable. Theserver does not seem to support this.

Is there a work-around?

Regards,
Steve MacLellan
_______________________________________
	
	Dog BYTE FREE Classifieds
	Newsletter and discussion
	For Internet Marketers
	http://welcome.to/dogbyte
_______________________________________


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

Date: Sat, 01 May 1999 17:33:14 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: HTTP_REFERER
Message-Id: <uVGW2.184$iu1.313@news.rdc1.tn.home.com>

Steve MacLellan wrote in message
<372b40ef.6096909@news.tor.metronet.ca>...
>Some Perl scripts I am trying to install on Red Hat are looking
for
>the HTTP_REFERER variable. Theserver does not seem to support
this.


Ummm... yes it does work.

Opening the access_log for the server will show this. If it's
not there, then someone has messed with httpd.conf and messed up
the LogFormat. Either way, this should be working. Try one of
the redhat newsgroups and see if your configuration needs
fixin'. Make sure to post your version of RedHat and the server
you are running... they are picky about those sort of things.

CT




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

Date: Sat, 01 May 1999 17:13:03 GMT
From: cindycrawford@my-dejanews.com
Subject: Re: I pay $$$ for simple perl routine
Message-Id: <7gfcmt$5du$1@nnrp1.dejanews.com>

we can help you
check our website at :
http://cgi-shop.com

cindy

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 01 May 1999 17:58:51 GMT
From: John Callender <jbc@shell2.la.best.com>
Subject: Re: Learning Perl for the first time
Message-Id: <372b40db$0$220@nntp1.ba.best.com>

Mark Aguirre <taurean@pacbell.net> wrote:

> Can anyone please provide the necessary resources and/or tell me the easiest
> way to learning Perl and CGI in the shortest amount of time?
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Many of this group's regulars would prefer that you not try to do this.
They will instead map out a course of study that would take you several
years to complete. They will tell you to do things like beginning all
your Perl scripts with "use strict", on the theory that the roadblocks
this places in your way will teach you discipline. Some of them will
make arch observations to each other about how idiotic you are when you
ask beginner-level questions here, treating you as if you are the same
person who asked that question last week (and the week before that, and
the week before that), rather than recognizing you for what you are: a
newcomer who has no more psychic ability (which they seem to think you
will use to divine the answers they previously provided to others) than
those experts themselves, who like to make running gags about the
Net::ESP module that would let them fill in the gaps in novices'
questions. (All of these experts were, of course, born knowing all
there is to know about both Perl and the norms of Usenet in general and
comp.lang.perl.misc in particular.)

Don't let these people bother you. Perl is *your* language, too. Larry,
in his wisdom, created a tool that could be optimized for whatever you
choose to optimize it for: bondage and discipline for macho programmers
(via use strict), or ease of learning for rank beginners (via forgoing
use strict, and allowing enough Ways To Do It that a rookie has a
decent chance of stumbling onto one that works before being fired).

With that said, here are some suggestions:

* Limit your posting to comp.infosystems.www.authoring.cgi, at least
for those questions that have any CGI component to them at all. The
people there tend to be a bit less huffy about these issues.

* Pick up the O'Reilly books Learning Perl, Programming Perl, and the
Perl Cookbook. A lot of it will be gibberish, but there will be a
chapter or two in each that will make sense, and eventually the rest of
it will, too. In the meantime, they'll look impressive on your
bookshelf.

* Read the FAQs at www.perl.com.

* Before posting a question, use www.dejanews.com to see if someone has
already answered it. It's faster, and helps keep the obsessive types
from blowing a gasket.

* Visit my tutorial at:

http://www.lies.com/begperl/

Good luck!

-- 
John Callender
jbc@west.net
http://www.west.net/~jbc/


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

Date: Sat, 1 May 1999 08:58:13 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Newsfeed and Local Weather
Message-Id: <MPG.1194c46dac430f7e989987@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <372b1809@cs.colorado.edu> on 1 May 1999 09:04:41 -0700, Tom 
Christiansen <tchrist@mox.perl.com> says...
 ... 
> Gosh, that's hard to read.  Try it this way instead:
> 
>     Actually, I ignored the point.  I saw that it was a program to embed
>     man doc templates into Perl programs, showing that Larry liked
>     embedded man in Perl.  It was probably before pod was around as
>     his lack of use of perl5 stuff would indicate.  I just felt like
>     commenting on the actual Perl code anyway.  It did seem to need
>     critiquing, and if any hapless neophyte were to see it and assume
>     that just because Larry Wall wrote code like that, they should
>     copy that wrapman, then I would be irresponsible.  I hope Larry
>     (or anyone) doesn't use this as using pod will give you man formats
>     as well as others -- and be more legible to boot.  Having used very
>     old versions of roff (on RT-11!!) many years ago, I appreciate pod
>     for its readability and simplicity.  I would not want to write nroff
>     directly again if I could avoid it.

May I offer Version 0.01 of Uri::Filter  (or maybe that should be 
uri::filter, despite the conventions)?  I think I got everything except 
the missing commas, which are well beyond the scope of this exercise.  
:-)

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

my %caps;
@caps{qw( i larry perl wall )} = ();

{ local $/; $_ = <DATA> }

s/^(.)/\u$1/;
s/\. +(.)/.  \u$1/g;
s/([a-z]+)(?!\d)/exists $caps{$1} ? "\u$1" : $1/eg;

print;
__END__
actually i ignored the point. i saw that it was a script to embed man
doc templates into perl scripts, showing that larry liked embedded man
in perl. it was probably before pod was around as his lack of use of
perl5 stuff would indicate. i just felt like commenting on the actual
perl code anyway. it did seem to need critiquing and if any hapless
newbie saw it an assume that if larry wall wrote code like that then
they should copy it, i would be irresponsible. i hope he (or anyone)
doesn't use this as using pod will give you man formats as well as
others and be more legible to boot. having used very old versions of
roff (on RT-11!!) man years ago, i appreciate pod for its readability
and simplicity. i would not want to write nroff directly again if i
could avoid it.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 01 May 1999 18:08:36 GMT
From: bing-du@tamu.edu
Subject: pattern matching
Message-Id: <7gffv3$80p$1@nnrp1.dejanews.com>

Greetings all...

I want to remove all the blank spaces before and after (but between 'a' and
'b') the comma ','. But the following code snippet did not work.

$test = 'a, b c';
$test =~ s/(\s+),(\s+)/,/;
print "test is $test\n";  # the output is still 'a, b c' but rather 'a,b c'.

Any ideas?

Thanks in advance,

Bing

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Sat, 1 May 1999 11:40:07 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: pattern matching
Message-Id: <MPG.1194ea57f6a693df98998d@nntp.hpl.hp.com>

[Posted and a courtesy copy sent.]

In article <7gffv3$80p$1@nnrp1.dejanews.com> on Sat, 01 May 1999 
18:08:36 GMT, bing-du@tamu.edu <bing-du@tamu.edu> says...
> I want to remove all the blank spaces before and after (but between 'a' and
> 'b') the comma ','. But the following code snippet did not work.
> 
> $test = 'a, b c';
> $test =~ s/(\s+),(\s+)/,/;
> print "test is $test\n";  # the output is still 'a, b c' but rather 'a,b c'.
> 
> Any ideas?

The '+' quantifiers each ask for at least one white-space character 
before and after the comma, but there isn't any before it, so the regex 
doesn't match and nothing happens.

The parentheses are superfluous, because you aren't trying to capture 
anything.  And you might want to do this for every comma on the line, 
not just the first.  So:

  $test =~ s/\s*,\s*/,/g;

Now go read perlre a few more times!

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 1 May 1999 18:51:19 GMT
From: robobob@blech.mindwell.com (Jason)
Subject: Re: pattern matching
Message-Id: <slrn7imj96.8pr.robobob@blech.mindwell.com>

On Sat, 01 May 1999 18:08:36 GMT, bing-du@tamu.edu <bing-du@tamu.edu> wrote:
>Greetings all...
>
>I want to remove all the blank spaces before and after (but between 'a' and
>'b') the comma ','. But the following code snippet did not work.
>
>$test = 'a, b c';
>$test =~ s/(\s+),(\s+)/,/;
\s+ means "one or more spaces", there is no space between a and the comma.

>print "test is $test\n";  # the output is still 'a, b c' but rather 'a,b c'.
>


-- 
        Jason Kohles -- jason@mediabang.com
        http://www.mediabang.com/

          "This is as bad as it can get, but don't bet on it."


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

Date: Sat, 1 May 1999 12:33:19 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: RegEx for matching Mbx "From " delimeter
Message-Id: <1dr4kbj.p02djv49sz3aN@[207.60.170.250]>

Nicholas Brenckle <nicholas.brenckle@yale.edu> wrote:

> Not exactly. Becase I need the data that may (or may not) be in the line.
> There may (or may not) be an email address in all of its many forms followed
> by a date. (or is it the other way around? Can your email address get a date
> without you?) And so I need to not only match ( /^From /) but then need to
> pull the data, if its there, from it. So how do I do that? Remember that some
> of the data is optional. Can I use || in a RegEx?

Yes.  /part1||part2/ means match part1, or the null string, or part2.
But that's not really what you meant.  ;)


I think you would want to do this in separate steps.  Find the From line
first, then parse out the pieces...

while (<>) {
  if (/^From /) {    # new mail message
    ($email, $date) = split(' ', $_, 2);
    # do other stuff
  }
}


This works for my mail, but I believe that my MUA regenerates the From
lines in a single, standard format.  If you can find the description of
acceptable formats for the From line, we can tell you how to parse them.
:)


-- 
 _ / '  _      /       - aka -
( /)//)//)(//)/(   Ronald J Kimball      rjk@linguist.dartmouth.edu
    /                                http://www.tiac.net/users/chipmunk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: 1 May 1999 11:11:36 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: RegEx for matching Mbx "From " delimeter
Message-Id: <372b35c8@cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

A deli-meter is something you use to weigh cold cuts.
You want a de-limit-er.

--tom
-- 
 He who hasn't hacked assembly language as a youth has no
 heart. He who does so as an adult has no brain.


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

Date: Sat, 01 May 1999 17:01:42 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Sorting numbers
Message-Id: <372e3340.1783689@news.skynet.be>

Bas van Reek wrote:

>eg. The sorted result looks like this :
>10
>110
>21
>2200
>300 

Try

	@sorted = sort { $a $<=> $b } @ary;

instead of a plain

	@sorted = sort @ary;

	Bart.


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

Date: 1 May 1999 11:06:40 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Sorting numbers
Message-Id: <372b34a0@cs.colorado.edu>

In comp.lang.perl.misc, 
    "Bas van Reek" <basvreek@xs5all.nl> writes:
 ...
:As you can see, the sorting routine sorts on the first number.
 ...
:This works fine, but isn't there a simpler solution  ?

Of course.  It's in the sort entry of the perlfunc manpage.

:(if you reply by email change the 5 into 4)

I think not.  Your post was illegal.  I'm not going out of my way to
cope with your hacks.  Don't appease the spammers.  Fight them.

--tom
-- 
    "I will always write it the second way, so if you're optimizing for
    contrariness, it's obviously better to do it the second way."
    	--Larry Wall


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

Date: Sat, 1 May 1999 10:42:02 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Sorting numbers
Message-Id: <MPG.1194dcc3ae55ebb898998c@nntp.hpl.hp.com>

In article <7gf810$hev$1@weber.a2000.nl> on Sat, 1 May 1999 17:53:49 
+0200, Bas van Reek <basvreek@xs5all.nl> says...
+ I wrote a search script that gives points to the search results,
+ after that it (reverse) sorts the results by the points. 
+ But now comes the problem :
+ 
+ eg. The sorted result looks like this :
+ 10
+ 110
+ 21
+ 2200
+ 300 
+ 
+ As you can see, the sorting routine sorts on the first number.
+ 
+  I have found a work-around to solve this by adding 
+ underslashes _ to the lower numbers
+ 
+ in the example the sorted result now looks like this.
+ 
+ __10
+ __21
+ _110
+ _300  
+ 2200
+ 
+ This works fine, but isn't there a simpler solution  ?

Yes.  Much simpler.

You can find out all about it by executing the following command:

perldoc -f sort

+ (if you reply by email change the 5 into 4)

If you want a reply by email change the 5 to 4.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 1 May 1999 09:55:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Throw a person a fish...
Message-Id: <MPG.1194d1ce84b7251198998a@nntp.hpl.hp.com>

Esteemed colleagues,

This just came to me by email.  I've left off the signature, because I 
didn't ask for permission to publish it.

I am sharing it with the newsgroup, because it is nice to get one's 
methodology affirmed, even anecdotally.

<QUOTE>

Some time ago I post a need for help in sorting in Perl. You responded 
with a recommendation that I consult the PERLFAQ4:

I was working on a good size website for a mortgage company, I merrily 
went on to other parts of the projects until now. 

Being a returning programmer (worked on CPM systems in the 80's) I was 
rather intimidated by some the newer languages. Hence my post for help 
sorting. 

I write to thank you for your recommendation, especially for not sending 
to code. With the information from Perlfaq4, I was able to solve the 
problem in less than 2 minutes. 

I also found other useful information for which I am very grateful

Thank you.

</QUOTE>

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Sat, 01 May 1999 16:58:08 GMT
From: maclell@col.ca (Steve MacLellan)
Subject: Re: using perl to manage passwords?
Message-Id: <372b3fa2.5763796@news.tor.metronet.ca>

On 1 May 1999 12:54:38 -0000, Jonathan Stowe <gellyfish@gellyfish.com>
wrote:

(he-he)

PLEEZE, do it.

>OK just for all you tin users out there please append this to your
>~/.tin/filters file :
>
>group=*
>type=0
>case=0
>score=kill
>from=*maclell@col.ca*
>#####
>
>I believe that this would probably the safest thing to do.  Someone who
>gets out of their pram like that has got to be a fire hazard.
>
>/J\
>-- 
>Jonathan Stowe <jns@gellyfish.com>

The dogs BARK but the Caravan moves on!

from SAM
>Congratulations on getting yourself plonked by the very people that might
>be able to answer any future questions you have.

Could but didn't. Don't need help of that nature.

Regards,
Steve MacLellan
_______________________________________
	
	Dog BYTE FREE Classifieds
	Newsletter and discussion
	For Internet Marketers
	http://welcome.to/dogbyte
_______________________________________


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

Date: Sat, 1 May 1999 09:16:40 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: using perl to manage passwords?
Message-Id: <orueg7.ia1.ln@magna.metronet.com>

Steve MacLellan (maclell@col.ca) wrote:
: On Fri, 30 Apr 1999 11:52:10 -0400, tadmc@metronet.com (Tad McClellan)
: wrote:

: >Dan Baker (dtbaker@bus-prod.com) wrote:
: >: I need to implement some password protected areas of a website... can
: >
: >: I'm sure the group would all learn a lot!
: >
: >
: >   I'm sure many in the group would not want to see how to do
: >   that because they do not care about the WWW.

: I'm new here; 


   And to Usenet in general, it would appear, since you do not
   seem to know the helpful tips posted regularly to:

      news.announce.newusers


: new to Perl. 

   You do not need to state what was already obvious.


: You must be the leader?


   There is no leader.

   Usenet is anarchy.


: Hmmm! Excuse my newbie foolishness. 


   OK.


: I assumed the World Wide Web
: consisted of things like a graphical fromat, Usenet, Telnet, E-mail,
: gohers. I thought the WWW encompassed the whle meal deal here, but I
: guess not...not as far as your little corner of the WWW. 


   You assume wrong.

   The _Internet_ encompasses all of those things.

   Most of them are internet "services".

   They each speak a different protocol.

      WWW - HTTP - HyperText Transfer Protocol

      email - SMTP - Simple Mail Transfer Protocol

      Usenet - NNTP - Network News Transfer Protocol

      etc...


   The WWW is just one of the many services available on
   the Internet.


: And you are
: the leader right? I know, I can tell by the BIG mouth.


   I'm not the one stepping on everybody's toes here.

   The well socialized response to finding out that you have
   committed a faux pas is more along the lines of

      "Sorry. I didn't know that."


: >   This is the Perl newsgroup. We talk about Perl type stuff here.
: (he-he)
: I knew that is why you were the leader, besides the BIG mouth you are
: a bright boy.


   Disparaging folks is not very intellectual.

   I didn't call you names, even though you were being rude by
   posting off-topic.

   You are not very effective at controlling yourself.


: >   Perl is not equivalent to the WWW.

: My, my, you are just too clever.


   But you did not know that, since you posted your WWW question
   to the Perl newsgroup.

   Letting you know that will enable you to get more from Usenet
   by realizing that you are more likely to get your WWW question
   answered in a newsgroup that has some connection to the WWW.

   Whether you know it or not, my advice would have helped you get
   answers to this and all of your future questions.


: >   In fact, most Perl programming has nothing to do with the WWW.
: >
: You must be related to Alan over at CIWAH


   It appears that you have been spreading your rudeness around then.

   Very democratic of you.


   But it isn't _you_ who is wrong, it is everybody else.

   Seems a strange conclusion since you have admitted that you
   are new to all of this, and everybody else has been doing
   it for some years.


: >   WWW type stuff is discussed in the comp.infosystems.www.*
: >   newsgroups.
: >
: >   Please do not have a WWW discussion in the Perl newsgroup,
: >   have it in a WWW newsgroup.

: Tad, you might realize that for us newbies who don't have a handle on
: all this but not be EXACTLY sure of where to post questions to. 


   Yes, I am aware of that.

   So I pointed out where to post your question.

   You seem to have gotten upset and being told where you could
   get your question answered. Strange response...


: But
: lucky for us there are a few of you BIG mouths in every group who
: loudly like to DOMINATE over the newbies and set them straight.


   You are getting tiresome.


: Let's get one thing straight. I'm a forty year old man 


   Spring chicken.


: who isn't going
: to let some snot nose pompous asshole tell me what I can post and what
: I can't.


   If you persist in posting off-topic questions, all of the
   regular question answeres will eventually make a killfile
   entry for you, which may have a negative effect on getting
   answers to future questions.

   It is in your best interests to try and fit in to how things
   are done on Usenet, as it is unlikely that you will be able
   to convert everybody else to your way of doing it.


: I'll tell you what....You see a message with my signature on it, just
: don't bother reading it. OK?


   OK.

   I have configured my news software so that I will not be
   seeing any more of your posts.


: Good good. I'm glad we got that cleared up. Now that we are on
: friendly terms Tad 


   We are not on friendly terms.


: perhaps you would like to choke out the answer to
: the question:
: >: I need to implement some password protected areas of a website... can...

: Don't know it? 


   Yes I do.

   Had you asked your WWW question in a WWW newsgroup I would
   have answered it.


   Although that would not have been necesary had you checked
   the Perl FAQ before posting to the Perl newsgroup.

   Perl FAQ, part 9:

      "How do I put a password on my web pages?"


: Gee...and here I mistook you for the leader.


   I just answer a question here from time to time (about 5000
   the last time I checked).

   I have been Usenetting for several years. 

   Thought I would help you get the lay of the land.

   I will not make that mistake again.


   Good luck!


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


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

Date: Sat, 01 May 1999 14:52:25 -0400
From: Huy Le <huymle@gis.net>
Subject: Re: Where is LWP: POP3Client.pm?
Message-Id: <372B4D69.CD4B8A33@gis.net>

Thanks Alastair and Jonathan.  I have it working now.

Huy



Huy Le wrote:

> I'm try to run the getmail source code I download from perlnow.com but I
> get this error message:
>
> Can't locate Mail/POP3Client.pm in @INC (@INC contains:
> /usr/local/lib/perl5/i86
> pc-solaris/5.00401 /usr/local/lib/perl5
> /usr/local/lib/perl5/site_perl/i86pc-sol
> aris /usr/local/lib/perl5/site_perl .) at getmail.cgi line 5.
> BEGIN failed--compilation aborted at getmail.cgi line 5.
>
> How can I download and install POP3Client.pm so the itT fix the above
> problem?  The @INC above has three directories, can I just install
> POP3Client.pm on the /usr/local/lib/perl5 directory?  TIA.
>
> Huy



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

Date: Sat, 01 May 1999 16:59:22 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: Won't write to file in the middle of CGI script
Message-Id: <7gfbro$a4k$1@xenon.inbe.net>

In article <7gf5pa$stm$1@newsfeeds.rpi.edu>, "Steve Horne" <hornes@rpi.edu> wrote:
>Hi --
>
>I am having a very strange and inexplicable (to me) problem. I have a cgi
>script where if I run it from the prompt, it runs fine and will output the
>files it should, but if I run it from a webpage as a CGI, it keeps having a
>problem creating a file.
>
>The following line is the one that creates the problem:
>
>open (FILE, ">$fn") || print "Problemo!";
>
>where $fn is the filename. Like I said, it works fine from the prompt, it
>just won't work when I run it from the web. When I did "print `pwd`", the
>current directories are the same for both cases. I am new at Perl, so I'm
>sorry if this is something that is blatantly obvious. Thanks in advance!!

If it is "blatantly obvious", it's in the FAQ. Oh, it is !
Good luck hunting,

Michel.

--
aWebVisit - extracts visitor information from WWW logfiles and shows
the top entry, transit, exit and 'hit&run' pages, the links followed
inside your website, the time spent per page, the visit duration etc.
For more details, see http://gallery.uunet.be/Michel.Dalle/awv.html


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

Date: Sat, 01 May 1999 17:00:09 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: Won't write to file in the middle of CGI script
Message-Id: <372d32cb.1666644@news.skynet.be>

Steve Horne wrote:

>open (FILE, ">$fn") || print "Problemo!";
>
>where $fn is the filename. Like I said, it works fine from the prompt, it
>just won't work when I run it from the web. When I did "print `pwd`", the
>current directories are the same for both cases. I am new at Perl, so I'm
>sorry if this is something that is blatantly obvious. Thanks in advance!!

Try 

	open (FILE, ">$fn") || print "Problemo: $!";

It's probably a file permissions problem, i.e. user "nobody" (the CGI
script) isn't allowed to create or write to files in that directory.

	Bart.


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

Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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.misc (and this Digest), send your
article to perl-users@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.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

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 V8 Issue 5536
**************************************

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