[12302] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5902 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jun 6 01:07:18 1999

Date: Sat, 5 Jun 99 22:00:16 -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, 5 Jun 1999     Volume: 8 Number: 5902

Today's topics:
    Re: A poor man's perl shell (Abigail)
    Re: Copying any files (Kai Henningsen)
    Re: Defining array names according to loop (Tad McClellan)
    Re: Does $' return the previous regexp's $' ? <laurens@bsqaure.com>
    Re: File upload/download Web app. (David Efflandt)
        filehandles in Win95 <chrisw@wt.net>
    Re: filehandles in Win95 (Sam Holden)
    Re: filehandles in Win95 <cassell@mail.cor.epa.gov>
        How do I ensure that the regexp DOESN'T conatin a strin <k1001@netzero.net>
    Re: How do I ensure that the regexp DOESN'T conatin a s (Sam Holden)
    Re: Issuing remote commands without Telnet... (David Efflandt)
    Re: know Perl to maintain Perl (Kai Henningsen)
    Re: Looking for special upload script (David Efflandt)
    Re: Parameter passing <derek@realware.com.au>
    Re: Parameter passing <derek@realware.com.au>
    Re: split strings (Larry Rosler)
    Re: split strings <All@n.due.net>
        Struggling with FORMAMAIL.PL <mlikvan@home.com>
    Re: UserAdmin (fwd) <walton@frontiernet.net>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 5 Jun 1999 21:03:10 -0500
From: abigail@delanet.com (Abigail)
Subject: Re: A poor man's perl shell
Message-Id: <slrn7ljm43.k0l.abigail@alexandra.delanet.com>

Steven Elliott (elliotsl@mindspring.com) wrote on MMCIV September
MCMXCIII in <URL:news:375958EF.788FD751@mindspring.com>:
|| Just for my own amusement I wrote a VERY simple perl shell that consists
|| of a script that prints a prompt and runs perl:
|| ----------------
|| #!/bin/bash
|| 
|| while :
|| do
||     echo -n "perl>"
||     perl
|| done
|| ----------------


I prefer a simple:  perl -nlwe 'eval'



Abigail
-- 
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))


  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----


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

Date: 06 Jun 1999 01:49:00 +0200
From: kaih=7IN0nxW1w-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: Copying any files
Message-Id: <7IN0nxW1w-B@khms.westfalen.de>

Alar@mtk.ut.ee (Alar Pandis)  wrote on 05.06.99 in <7jbjk0$enl$1@kadri.ut.ee>:

> # KAT is directory and FAIL is file; ARHKAT is dest. dir.
>
> open LXHFILE, "<$kat$fail";
> copy LXHFILE, $arhkat.$fail || print $!."-".$arhkat.$fail;
> close LXHFILE;
>
> == No such file or directory.
>
> If both of files opened then same result (one for reading, othe for
> writing).
>
> If just
>
> copy $kat.$fail, $arhkat.$fail;
>
> it works, but binary files is corrupted and timestamps etc. is wrong. Result
> is the same if I just open and then writing (print).

Hmm. Maybe the problem is that you are missing a "." in your open line?  
You might want to change that line to read

         open LXHFILE, "<$kat.$fail" or die "can't open $kat.$fail: $!";

to see if the open succeeds.


Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sat, 5 Jun 1999 17:25:30 -0400
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Defining array names according to loop
Message-Id: <ak4cj7.bal.ln@magna.metronet.com>

James Stewart (james@britlinks.co.uk) wrote:
: In article <Pine.GSO.4.02A.9906051523021.1103-100000@user2.teleport.com>,
: Tom Phoenix <URL:mailto:rootbeer@redcat.com> wrote:

: > The perlref manpage (and perllol and
: > perldsc) may be of some help. Good luck!

: thanks. I'm grabbing the files at the moment.
              ^^^^^^^^^^^^^^^^^^


   No need to "grab" them.

   They *come with* Perl.

   If you have a properly installed perl, then you already 
   have them on your hard disk somewhere...


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


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

Date: Sat, 5 Jun 1999 20:36:03 -0700
From: "Lauren Smith" <laurens@bsqaure.com>
Subject: Re: Does $' return the previous regexp's $' ?
Message-Id: <7jcqb7$aur$1@brokaw.wa.com>


Tom Phoenix wrote in message ...
>(Trust me on this: For wonderful and subtle reasons, this is a feature
>and not a bug.)


Funny, the people who make this OS say the same thing... ;-)

lauren




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

Date: Sat, 05 Jun 1999 21:59:31 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: File upload/download Web app.
Message-Id: <slrn7ljlmj.2f2.efflandt@efflandt.xnet.com>

On Sat, 05 Jun 1999 22:17:03 GMT, Jen <jenmei@my-dejanews.com> wrote:
>We have a situation at work where peopl want to send and receive
>e-mail messages with huge attachments. We really want to prevent
>people from doing this (so that the mail servers don't get stuffed),
>but we want to provide a good alternative. FTP is apparently too hard
>for people to use.
>
>What I was thinking of doing is creating a Web site (using Perl) where
>employees and customers could upload and download files from. However,
>if something like this is available somewhere, I'd rather get it than
>create something new from scratch. Does something like this exist?
>
>Thanks!
>
>Jen
>jenmei@my-dejanews.com

CGI.pm module can handle file upload (and create the form to do it).
See 'perldoc CGI'.

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: Sat, 05 Jun 1999 22:15:36 -0700
From: Steven & Christine Borgfeld <chrisw@wt.net>
Subject: filehandles in Win95
Message-Id: <375A03F8.6DFBFDC1@wt.net>

I'm learning perl to run CGI scripts on a unix server, but I'm running
practice programs on Win95.  I'm reading "Learning Perl" which is unix
based.  I'm having trouble writing to an output file (under Win95).
This is the code:

open (OUT,"output") || die;
print OUT "table #",$i,"\n";

I'm getting the message:
Filehandle main::OUT opened only for input at circle.bat line 39.

Any suggestions or links in the right direction are appreciated.

Thanks
Christine



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

Date: 6 Jun 1999 03:22:34 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: filehandles in Win95
Message-Id: <slrn7ljqbq.k6r.sholden@pgrad.cs.usyd.edu.au>

On Sat, 05 Jun 1999 22:15:36 -0700,
	Steven & Christine Borgfeld <chrisw@wt.net> wrote:
>I'm learning perl to run CGI scripts on a unix server, but I'm running
>practice programs on Win95.  I'm reading "Learning Perl" which is unix
>based.  I'm having trouble writing to an output file (under Win95).
>This is the code:
>
>open (OUT,"output") || die;
>print OUT "table #",$i,"\n";
>
>I'm getting the message:
>Filehandle main::OUT opened only for input at circle.bat line 39.
>
>Any suggestions or links in the right direction are appreciated.

You could read the documentation that comes with perl about the open
function. You can find it in the perlfunc documentation, which should
be viewable with the command 'perldoc perlfunc'. 

You can access the function you are interested in with the command
'perldoc -f open'.

The second paragraph gives you your answer.

You can also write the print line as :

print OUT "table #$i\n";

It is also extremely useful to make your die error as informative as possible
in this case :

open(OUT,">output") || die "Unable to open 'output' for writing: $!";

Damn... I gave the answer - please look it up yourself anyway since learning
to use the documentation is more important than solving this one problem.

-- 
Sam

Fifty years of programming language research, and we end up with C++ ???
                --Richard A. O'Keefe


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

Date: Sat, 05 Jun 1999 21:45:09 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: filehandles in Win95
Message-Id: <3759FCD5.EF91A70D@mail.cor.epa.gov>

Steven & Christine Borgfeld wrote:
> 
> I'm learning perl to run CGI scripts on a unix server, but I'm running
> practice programs on Win95.  I'm reading "Learning Perl" which is unix
> based.  I'm having trouble writing to an output file (under Win95).
> This is the code:
> 
> open (OUT,"output") || die;
> print OUT "table #",$i,"\n";
> 
> I'm getting the message:
> Filehandle main::OUT opened only for input at circle.bat line 39.
> 
> Any suggestions or links in the right direction are appreciated.

Sam just gave a good answer, but there are two other points
I want to make.  First, this isn't a unix-vs-win32 problem.
Rather, it has to do with how to use the open() function.
And second, if you really feel that there are unix-vs-win32
problems with translating the llama book into useful code for
your use, then you might want to try to take it back and
exchange it for the gecko book: "Learning Perl on Win32
Systems".

Whether you're on a unix or win32 system, Perl itself comes
with a load of good documentation, which will often answer
your question a *lot* faster than waiting for some Perlite
to stop drinking Jolt and go look at his newsreader.
Make sure you know how to look through the FAQ, and how to
use perldoc.  [Hint: type 'perldoc perldoc' at a command
prompt to get a help screen.]

HTH,
David
-- 
David Cassell, OAO                     cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician


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

Date: Sun, 06 Jun 1999 00:14:30 -0400
From: CY <k1001@netzero.net>
Subject: How do I ensure that the regexp DOESN'T conatin a string? 
Message-Id: <3759F5A6.23D04FA4@netzero.net>

What to do if you want to match 

/$stringA.*?(no $stringB).*?$staringC/

in one line of regexp?  (In English, that's a string with stringA,
stringC in the beginning and the end without $stringB inbetween. 
Thanks.


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

Date: 6 Jun 1999 03:28:33 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: How do I ensure that the regexp DOESN'T conatin a string?
Message-Id: <slrn7ljqn1.k6r.sholden@pgrad.cs.usyd.edu.au>

On Sun, 06 Jun 1999 00:14:30 -0400, CY <k1001@netzero.net> wrote:
>What to do if you want to match 
>
>/$stringA.*?(no $stringB).*?$staringC/
>
>in one line of regexp?  (In English, that's a string with stringA,
>stringC in the beginning and the end without $stringB inbetween. 
>Thanks.

I'd use :

/$stringA(.*?)$stringC/ && $1!~/$stringB/

It's one line... but not one regex...

If you actually want what the english says then you will need to add a ^ to
the start and a $ to the end.

-- 
Sam

Perl is the Cliff Notes of Unix.
	--Larry Wall


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

Date: Sat, 05 Jun 1999 22:09:25 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Issuing remote commands without Telnet...
Message-Id: <slrn7ljm96.2f2.efflandt@efflandt.xnet.com>

On Sat, 5 Jun 1999 16:28:10 +0100, Thurley <thurley@globalnet.co.uk> wrote:
>I need to issue commands on my ISPs servers to "make" Perl modules etc.  The
>problem is that they don't support Telnet.
>Is there any way around this?  Can I make the modules without Telnet?
>
>Cheers,
>James.

One thing that probably hasn't been mentioned yet is that if you upload
the modules to your own directory, you will need to point to it with 'use
lib' in your scripts, for example:

use lib '/home/thurley/myperlmods';

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: 06 Jun 1999 01:38:00 +0200
From: kaih=7IN0njsXw-B@khms.westfalen.de (Kai Henningsen)
Subject: Re: know Perl to maintain Perl
Message-Id: <7IN0njsXw-B@khms.westfalen.de>

tchrist@mox.perl.com (Tom Christiansen)  wrote on 05.06.99 in <375903f5@cs.colorado.edu>:

> How much Perl is considered off-limits to a Perl virtuoso
> because Visual BASIC immigrants would be confused?

Depend on the situation, surely.

> How much English is considered off-limits to an English virtuoso
> because Polish immigrants would be confused?

Depends on the situation, surely. (Specifically, how probable is it that  
someone with limited English skills will be trying to understand it, and  
how important is it that she succeeds?)

> How much Liszt is considered off-limits to a piano virtuoso
> because harmonica immigrants would be confused?

I don't see how that question would make sense, but then I don't claim to  
be an expert on music.

> Here's a piece that this topic reminded me of:

[snip a piece that, at least to me, sounds exceedingly awkward - but then  
I'm not a native English speaker - and seems to mix good and bad arguments  
in wild abandon]

> I don't intend to read overly much on the occasionally strained metaphor
> above.  It just struck something of a resonant chord, read in the context
> of the current topic.

Well, there's a parallel in that this thread, also, mixes good and bad  
arguments without discrimination.

You might remember that someone made a rather far jump from "knows a  
little Perl" to "knows nothing about Perl". I don't know about you, but to  
me, that's a fairly huge difference.

Kai
--
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery (rra@stanford.edu)


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

Date: Sat, 05 Jun 1999 22:19:11 -0400
From: efflandt@xnet.com (David Efflandt)
Subject: Re: Looking for special upload script
Message-Id: <slrn7ljmrg.2f2.efflandt@efflandt.xnet.com>

On Sun, 6 Jun 1999 00:22:52 +0200, Martin <MeinAlias@T-Online.de> wrote:
>Hello,
>befor starting to hack my own: anybody knows of an file upload script which
>offers a preview function for Gifs and Jpegs to be uploaded via the browser?
>Tips are greatly appreciated.
>Regards from Heidelberg
>Martin
>--
>__________________________
>Martin Knapp
>martin.knapp@adf.de

CGI.pm module can handle file upload.  You can preview text by reproducing
it as html from the CGI along with the filled out form for further
editing, but previewing images may not be easy because they would need to
be uploaded and stored on the server in order to be viewed, and by then,
you already have them whether you want them or not.  Of course you could
have a field to erase (unlink) the image file if they change their mind.

-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/


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

Date: Sun, 06 Jun 1999 12:34:33 +1000
From: Derek Lavine <derek@realware.com.au>
Subject: Re: Parameter passing
Message-Id: <3759DE38.AEAC5D1F@realware.com.au>

Ala,

Thanks for your input. It was something else that was not working. My newness
to Perl caused me to over look a simple error and assume there was one where
there was not. Thanks for the explination of certain assigments/bindings and
docs.

Cheers

Derek




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

Date: Sun, 06 Jun 1999 12:35:05 +1000
From: Derek Lavine <derek@realware.com.au>
Subject: Re: Parameter passing
Message-Id: <3759DE59.38A2CC32@realware.com.au>

Ala,

Thanks for your input. It was something else that was not working. My newness
to Perl caused me to over look a simple error and assume there was one where
there was not. Thanks for the explination of certain assigments/bindings and
docs.

Cheers

Derek




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

Date: Sat, 5 Jun 1999 17:55:41 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: split strings
Message-Id: <MPG.11c366e33bca8ca3989b77@nntp.hpl.hp.com>

In article <qmnbj7.n7l.ln@magna.metronet.com> on Sat, 5 Jun 1999 
13:44:58 -0400, Tad McClellan <tadmc@metronet.com> says...
 ...
>    split(' ') is much more similar to split(/\s+/) than it is
>    to split / +/.

I think the difference in semantics is important, and worth repeating 
here.  From `perlfunc -f split`:

A split() on /\s+/ is like a split(' ') except that any leading 
whitespace produces a null first field.  

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


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

Date: Sat, 5 Jun 1999 21:54:03 -0400
From: "Allan M. Due" <All@n.due.net>
Subject: Re: split strings
Message-Id: <Xwk63.80$tr.622@nntp1>


Tad McClellan <tadmc@metronet.com> wrote in message
news:qmnbj7.n7l.ln@magna.metronet.com...
: Allan M. Due (All@n.due.net) wrote:
:
: : Tad McClellan <tadmc@metronet.com> wrote in message
: : news:ce4bj7.94l.ln@magna.metronet.com...
: : : Kevin (mpajot@club-internet.fr) wrote:
: : :
: : : : I just want to split a string on the "space" ((...)=split(/ /,
: : $string,2)),
: : : : but there is a problem when 2 paces follows themselves ("toto  toto
: : toto"
: : : : for exemple).
: : :
: : :    (...)=split(/ +/, $string,2);
: : :                  ^
: : :                  ^ split on one or more space characters
:
: : Actually, for this I prefer
:
: : (...)=split(' ',$string,2);
:
: : In no way better, but since someone went to the trouble of making this
an
: : option it somehow just seems more perlish to me.  Thankfully TIMTOWTDI.
:
:
:    It does not do the same thing in general, only in the
:    specific case presented.
:
:    You use the one that has the semantic that you want.
:
:    He didn't make any mention of tab characters, for instance,
:    so my solution does not split on tab characters whil yours does.
:
:    split(' ') is much more similar to split(/\s+/) than it is
:    to split / +/.

Point well taken, by the post spec. you are perhaps more correct.  I
inferred a desire for whitespace which may, indeed, be incorrect.  Was just
trying to offer alternatives.  Nothing ventured nothing gained.

AmD

--
$email{'Allan M. Due'} = ' All@n.Due.net ';
--Random Quote--
Numbers are tools, not rules.
  Ashley-Perry Statistical Axioms[0]





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

Date: Sun, 06 Jun 1999 02:22:53 GMT
From: Mike Likvan <mlikvan@home.com>
Subject: Struggling with FORMAMAIL.PL
Message-Id: <3759F72E.13E0820D@home.com>

This is a multi-part message in MIME format.
--------------FFEA48359401C2C777382000
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I've downloaded the FORMMAIL.PL from Matt's Script Archive (attached)
and I'm having problems when referring to it in some HTML I'm writing.  

The complete part of the HTML that I'm having problems with is listed
below "ATTACHMENT B".
-------
Here is what I know about the Matt's FORMMAIL.PL.

- I have to indicate where the SENDMAIL is on the web server
  where I'm hosting my HTML.
- I also have to put the hosting servers domain name in the 
  @referes section of the Perl.

According to Matt, this is where I have to configure these things in the
FORMMAIL.PL
##############################################################################
# Define
Variables                                                           #
#	 Detailed Information Found In README File.                          #
# $mailprog defines the location of your sendmail program on your
unix       #
#
system.                                                                   
#

$mailprog = '/usr/lib/sendmail';

# @referers allows forms to be located only on servers which are
defined     #
# in this field.  This security fix from the last version which
allowed      #
# anyone on any server to use your FormMail script on their web
site.        #

@referers = ('worldwidemart.com','206.31.72.203');

#
Done                                                                      
#
##############################################################################

For some reason, the @referers doesn't seem to work.  Here is why I
think this.

As part of my HTML page I have these two lines.  

<FORM ACTION="http://www.networkscr.com/assets/cgi-bin/formmail.pl"
METHOD="POST">
<input type=hidden name="recipient" value="mlikvan@cyberconnect.com">

What they are saying is that I want to run the FORMMAIL.PL located on 
WWW.NETWORKSCR.COM in the ASSETS/CGI-BIN directory. Then I want the
results 
of the form to be mailed to me (mlikvan).  I did get FORMMAIL.PL to 
work once...

Here are three scenarios I played with, one worked, two didn't.

THIS ONE WORKED
===============
Here are the statements I used in the HTML. (Notice I changed the
FORMMAIL server)

<FORM ACTION="http://www.ICOM.com/cgi-bin/formmail.pl" METHOD="POST">
<input type=hidden name="recipient" value="mlikvan@cyberconnect.com">

When I opened up the HTML from the C: drive of my computer and ran it
with my
Netscape browser, it found the FORMMAIL.PL and sent the results of my
form input
to my e-mail.

THIS ONE DID NOT WORK
=====================
When I moved the HTML to the WWW.NETWORKSCR.COM server and tried to run
these
same commands from there, it told me I was not authorized to use the
FORMMAIL.PL.

<FORM ACTION="http://www.ICOM.com/cgi-bin/formmail.pl" METHOD="POST">
<input type=hidden name="recipient" value="mlikvan@cyberconnect.com">

THIS ONE ALSO DID NOT WORK
==========================
Then I moved the HTML AND the FORMMAIL.PL to the WWW.NETWORKSCR.COM.  (I
put
the FORMMAIL.PL in the /ASSETS/CGI-BIN/ folder and added EXECUTE to its
attributes.)  I also changed the "@referers" command to be:

	@referers = ('www.networkscr.com');

The error I got was "The requested method POST is not allowed for the
URL
/assets/cgi-bin/formmail.pl."

I got the same error even if I changed the @referers statement to these:

	@referers = ('www.networkscr.com/assets/cgi-bin/formmail.pl');
	@referers = ('/assets/cgi-bin/formmail.pl');

Any ideas why I can't run the FORMMAIL.PL on the WWW.NETWORKSCR.COM
server?

I did not change the SENDMAIL statement in FORMMAIL.PL.  Might that have
something to do with the authority thing?

Thanks.  Mike

=============================================================================
================================== ATTACHMENT B
=============================
=======================  COMPLETE HTML FOR THE FORMMAIL
=====================
<FORM ACTION="http://www.networkscr.com/assets/cgi-bin/formmail.pl"
METHOD="POST">
<input type=hidden name="recipient" value="mlikvan@cyberconnect.com">
<input type=hidden name="subject" value="Comments / Need for Services">
<TABLE>
<TR>
        <b>Choose Your Area(s) of Interest:</b>
</TR>
<TR>
<P><INPUT TYPE="checkbox" NAME="Interested in" VALUE="Professional
Services">Professional Services</P>
<P><INPUT TYPE="checkbox" NAME="Interested in" VALUE="Application
Development">Application Development</P>
<P><INPUT TYPE="checkbox" NAME="Interested in" VALUE="Database
Administration">Database Administration</P>
<P><INPUT TYPE="checkbox" NAME="Interested in" VALUE="Web
Development">Web Development</P>
<P><INPUT TYPE="checkbox" NAME="Interested in" VALUE="Network
Services">Network Services</P>        
</TR>
<TR>
        <TD><b>Company Name:</TD></b>
        <TD><input type="text" size="35" name="Company"></TD>
</TR>
<TR>
        <TD><b>Your Name:</TD></b>
        <TD><input type="text" size="35" name="Name"></TD>
</TR>
<TR>
        <TD><b>Telephone:</TD></b>
        <TD> <input type="text" size="35" name="Phone">
</TD>
</TR>
<TR>
        <TD><b>E-mail Address:</TD></b>
        <TD> <input type="text" size="35" name="E-mail"></TD>
</TR>


</TABLE>

        <P><b>Questions or Comments:</b><br>        
        <textarea name="Questions or Comments"
            rows="14" cols="51"></textarea>
        <p>

            <input type="submit" name="Action"
            value="Send"> <input type="reset" name="B2"
            value="Clear"></p>
</form>
--------------FFEA48359401C2C777382000
Content-Type: application/x-perl;
 name="formmail.pl"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="formmail.pl"

Subject: perl
Date: Sat, 05 Jun 1999 17:34:24 -0500
From: Mike Likvan <mlikvan@home.com>
To: mlikvan@home.com

The requested method POST is not allowed for the URL
/assets/cgi-bin/formmail.pl.

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

   FORMMAIL.PL3.txtName: FORMMAIL.PL3.txt
                   Type: Plain Text (text/plain)

--------------FFEA48359401C2C777382000--



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

Date: Sat, 05 Jun 1999 22:04:40 -0400
From: Bob Walton <walton@frontiernet.net>
To: michel@enter.it
Subject: Re: UserAdmin (fwd)
Message-Id: <3759D737.4BF86CE4@frontiernet.net>

See comments below.

ZioBudda wrote:

> Hi, I need to use HTTPD::UserAdmin for open/read/write the file .htpasswd
> of my site (LinuxBox/Apache). I can (in this moment) store a new user,
> delete it and see if he exist, but I have a problem with the "fetch"
> functions. It does not work for me.
> My code (only a piece) is:
>
>         @arr = ('utente', 'passwd','dir');
>           $fetch2=$user2->fetch($utente,@arr);

In the line above, $fetch2 is a scalar

>
>           print $arr{0};
>           foreach (keys %fetch2) { print "$_ => $fetch2{$_}\n"; }

In the line above %fetch2 is a hash.  Scalars and hashes have different
namespaces, so %fetch2 is not defined by your code above.  You probably want

%fetch2=$user2->fetch($utente,@arr);

in the first line I commented upon (note:  I know nothing about
HTTPD::UserAdmin -- just a guess)

>
>
> I have tried also:
> foreach (keys %fetch2) { print "$_ => $fetch2->{$_}\n"; }
> but with the same result: no work.
> why ?
>
> Ah, $user2 is:
> @DBM = (DBType => 'Text',
>         DB     => $file,
>         Server => 'apache',
>         Mode   => '7755',
>         #Auth   => '/home/httpd/home/.htpasswd.PERL5'
>         );
>
> $user2 = new HTTPD::UserAdmin @DBM;
>
> ciaoz
>
> Ho sentito urla di sudore... che schifo...
> --
> Michel <ZioBudda> Morelli                 michel@michel.enter.it
>                                         http://ziobudda.enter.it
> Italian Linux FAQ                  http://ziobudda.enter.it/FAQ/



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

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

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