[12020] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5620 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 10 16:07:19 1999

Date: Mon, 10 May 99 13: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           Mon, 10 May 1999     Volume: 8 Number: 5620

Today's topics:
    Re: ActivePerl under W95 <devans@radius-retail.kom>
    Re: email attachment <devans@radius-retail.kom>
    Re: FAQ "I still don't get locking ..." and use strict (Fuzzy Warm Moogles)
    Re: FAQ "I still don't get locking ..." and use strict <rick.delaney@home.com>
        File Uploading <ex5316@netvigator.com>
    Re: File Uploading <jtjuslin@spam.cc.hut.fi>
    Re: File::Find non-functional when passing arguments to (Andrew Allen)
    Re: File::Find non-functional when passing arguments to (Ilya Zakharevich)
        HASH references update... <keighvin@urjet.net>
    Re: How much RAM for Perl from CGI??? <jason.holland@dial.pipex.com>
    Re: how to setup cgi <mark@RemoveThismtwells.demonRemove.co.uk>
    Re: how to setup cgi <mark@RemoveThismtwells.demonRemove.co.uk>
    Re: how to setup cgi (Charles R. Thompson)
    Re: how to write the function that can change values of (Greg Bacon)
    Re: matching resource ID's <devans@radius-retail.kom>
    Re: Need a little looping help <devans@radius-retail.kom>
        OReilly bullshit.... Camel logo trademark <mkersey@metricom.com>
        Passing Args to script via web and command line <boss_derek_w@email.cat.com>
        Passing Args to script via web and command line <boss_derek_w@email.cat.com>
    Re: Passing Args to script via web and command line <jtjuslin@spam.cc.hut.fi>
        perlcc & dbi problems (Jason Garman)
    Re: Regular Expression Help (Larry Rosler)
    Re: spawn new browser window <jason.holland@dial.pipex.com>
    Re: Warnings about uninintialised variables despite use <devans@radius-retail.kom>
        why won't this cgi script work? <kidjustino@chesco.com>
    Re: why won't this cgi script work? (Charles R. Thompson)
    Re: why won't this cgi script work? (Bart Lateur)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Mon, 10 May 1999 14:55:53 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: ActivePerl under W95
Message-Id: <7h6rj6$2sem1@news.gomontana.com>

I think that's not a Perl problem, that's a web server problem.  Try a
newsgroup covering that area.

Arnaud Limbourg wrote in message <7h6lv6$1h524@norma.bull.net>...
>Each time i call a perl script i get a 405 method not allowed error.




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

Date: Mon, 10 May 1999 13:39:00 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: email attachment
Message-Id: <7h6n2r$2rh16@news.gomontana.com>

Quick and dirty, append to your message `uuencode myfile`, e.g.

print <<EOF . `uuencode $filename somefile`;
Subject: test

This is the body of the message.

EOF

David Craig wrote in message ...
>Does anyone know how to attach a file to an email from a perl script?
>
>I have a program which creates the file, and I want to be able to email it
>to an address.  I can get the email part ok, but how do I encode and send
>the attached file?
>
>Thanks
>David Craig
>david@icon-design.com
>
>



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

Date: Mon, 10 May 1999 18:02:50 GMT
From: tgy@chocobo.org (Fuzzy Warm Moogles)
Subject: Re: FAQ "I still don't get locking ..." and use strict
Message-Id: <37371ed0.4299640@news.oz.net>

On Mon, 10 May 1999 13:27:53 +0200, "Alan J. Flavell" <flavell@mail.cern.ch>
wrote:

>    use Fcntl;
>    sysopen(FH, "numfile", O_RDWR|O_CREAT, 0644) or die [...]
                            ^^^^^^
>causes the error 
>
>  Bareword "O_RWDR" not allowed while "strict subs" in use
             ^^^^^^

-- 
Fuzzy | tgy@chocobo.org | Will hack Perl for a moogle stuffy! =^.^=


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

Date: Mon, 10 May 1999 18:03:45 GMT
From: Rick Delaney <rick.delaney@home.com>
Subject: Re: FAQ "I still don't get locking ..." and use strict
Message-Id: <37371F25.58BFFEFC@home.com>

[posted & mailed]

Alan J. Flavell wrote:
> 
> On Mon, 10 May 1999, Eric Bohlman wrote:
> 
> > Are you sure you have it spelled correctly?
> 
> (Exits red-faced, waving a Supersedes: header).

Don't feel too embarrassed.  The message you should have received was

    Can't locate FCntl.pm in @INC

(or however you misspelled it), but you must be using an OS that ignores
case in file names.  So the file is found but the functions are not
imported.  This is pretty nutty, IMHO.

-- 
Rick Delaney
rick.delaney@home.com


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

Date: Mon, 10 May 1999 21:53:42 +0800
From: Alex <ex5316@netvigator.com>
Subject: File Uploading
Message-Id: <3736E4E6.BCEAB19B@netvigator.com>

Hi, please help,
When I upload a file to the server, I can only open and write to the
file that already exist in the server.

But how can I actually upload the file , i.e create the new uploaded
file in my own server.

Thank you

Alex





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

Date: Mon, 10 May 1999 22:03:41 +0300
From: Jukka Juslin <jtjuslin@spam.cc.hut.fi>
Subject: Re: File Uploading
Message-Id: <37372D8D.CCD6FB3C@spam.cc.hut.fi>

Alex wrote:
> 
> Hi, please help,
> When I upload a file to the server, I can only open and write to the
> file that already exist in the server.
> 
> But how can I actually upload the file , i.e create the new uploaded
> file in my own server.

#!/usr/bin/perl

$directory = "/home/httpd/html";
$filename = "test.txt";

open(OUTFILE,">$directory$filename") || &error($!);
       
while($bytesread=read($fileorig,$buffer,$ENV{'CONTENT_LENGTH'})) 		{
            binmode OUTFILE;
            print OUTFILE $buffer;
        }
close(OUTFILE);
`chmod 444 $directory$filename`;

Should work like this.

++Jukka


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

Date: 10 May 1999 18:58:06 GMT
From: ada@fc.hp.com (Andrew Allen)
Subject: Re: File::Find non-functional when passing arguments to &wanted
Message-Id: <7h7a7u$gue$1@fcnews.fc.hp.com>

M.J.T. Guy (mjtg@cus.cam.ac.uk) wrote:
: Ilya Zakharevich <ilya@math.ohio-state.edu> wrote:
: >>  perl -wde 0
: >  DB<1> sub foo {12 + shift}
: >
: >  DB<2> x \&foo(3)
: >0  SCALAR(0x20dd60)
: >   -> 15
: >
: >I think this should be considered a bug in Perl.  \&foo(3) should at
: >least produce a warning.

No, it's doing exactly what you want. How obvious would you need the
syntax to be before the warning is squelched? Would \(&foo(3))
suffice? Or would you insist upon \scalar(&foo(3)) (which should then
produce a warning that you're not getting a sub reference to
CORE::scalar ;)

: I consider more generally that \15 not warning is also a bug
: (misfeature?) in Perl.

Would you also consider \(15,16) warningable? [15]? +{16}?

: The \ operator ought to be applied only to variables.

Ahem. Anything can be \'ed. If you're using \ only for variables,
you're not really using it.

  local *PI=\(4*atan2(1,1));

  print "${\(4/7)}"

: But it's a bit late for that now.

It's always too late for supercilious warnings ;)

Andrew


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

Date: 10 May 1999 19:23:20 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: File::Find non-functional when passing arguments to &wanted
Message-Id: <7h7bn8$6ks$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to M.J.T. Guy
<mjtg@cus.cam.ac.uk>],
who wrote in article <7h6p1i$krg$1@pegasus.csx.cam.ac.uk>:
> >I think this should be considered a bug in Perl.  \&foo(3) should at
> >least produce a warning.
> 
> I consider more generally that \15 not warning is also a bug
> (misfeature?) in Perl.

You probably mean: use

  \do {my $foo = 15}

instead...  Not that pretty too...

> The \ operator ought to be applied only to variables.
> 
> But it's a bit late for that now.

If we could project our hindsight of today back in time ...  ;-)

Ilya


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

Date: Mon, 10 May 1999 12:05:50 -0600
From: "Paul L Tomlinson" <keighvin@urjet.net>
Subject: HASH references update...
Message-Id: <926359296.419.86@news.remarQ.com>

Hey ng -
    Just wanted to thank everyone for their input, info, & 2 cents on my
question.
The erroneous results I was getting resulted from putting the "$i++" in the
wrong place and thereby creating a non-terminating while loop.  Silly
newbie, perl is for pros.  I learned a lot about hashes though!

    Paul




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

Date: Mon, 10 May 1999 20:14:20 +0000
From: Jason Holland <jason.holland@dial.pipex.com>
Subject: Re: How much RAM for Perl from CGI???
Message-Id: <37373E1C.94EA5DB2@dial.pipex.com>

Hello Ed,

Just a couple of thoughts...


Ed Eddington wrote:
> 
> How much RAM does a Perl interpretor require when called by a Perl CGI
> application?

It depends how big you're Perl program is I suppose, you could look at
the AUTOLOAD facilities to load functions on demand.

> 
> Since a A CGI process (and a perl interpreter) is started for each
> browser request, system RAM requirements would depend on how many
> simultaneous requests need to be handled. This is an important
> consideration!

If your Perl program does some kind of database interfacing, or other
memory intensive stuff, then you could perhaps write a large daemon Perl
program, with each of the CGI instances simply interfacing to the
daemon?

> 
> I show a Perl CGI process using around 1.3Mb of memory. Seemingly, this
> size would vary based on the modules used by the CGI. But can anyone
> tell me a minimum for the perl interpreter? Also, is there any way to
> minimize this?

What system is this on, Unix, Win, or Mac?

> 
> ANY help is appreciated. Thanks in advance!
> 
> Ed Eddington
> edatwork@REMSPAMinternethut.com
> (Please remove 'REMSPAM' from address when replying directly)

Get the Perl Cookbook, it has lots of stuff like this, I'll probably be
learning from it for years... heh.

Bye!

-- 
  Jason Holland - < "I could probably write a script for that..." >
 email: jason.holland@dial.pipex.com
   web: http://dspace.dial.pipex.com/jason.holland/
can do: Perl 5, html, JavaScript, Linux, Mac, Photoshop, everything
else...


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

Date: Mon, 10 May 1999 20:30:31 +0100
From: "Mark Twells" <mark@RemoveThismtwells.demonRemove.co.uk>
Subject: Re: how to setup cgi
Message-Id: <926364684.20270.0.nnrp-01.c3ad4005@news.demon.co.uk>


Kent Perrier <kperrier@blkbox.com> wrote in message
news:ysiogk8vhq4.fsf@blkbox.com...
> mk@best.com (mk) writes:
>
> This is not a perl related question.  The is a cgi/server configuration
related
> question.
Gee , thanks!


> comp.infosystems.www.authoring.cgi
> comp.infosystems.www.servers.*

Some of us don't get those ngs...and are left with the same problem.

How do we configure perl to work with MS PWS - I've put entries in the
registry which "look" correct, but the server hangs on these.
Could some kind soul please EMAIL me (since it's not a perl question we
MUSTn't clutter up this NG) the correct entries for the registry?







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

Date: Mon, 10 May 1999 20:31:33 +0100
From: "Mark Twells" <mark@RemoveThismtwells.demonRemove.co.uk>
Subject: Re: how to setup cgi
Message-Id: <926364747.26353.0.nnrp-07.c3ad4005@news.demon.co.uk>


David Efflandt <efflandt@xnet.com> wrote in message
news:slrn7il60d.jh.efflandt@efflandt.xnet.com...

> This subject is unrelated to Perl.  It sounds like a webserver
> configuation problem.  Please direct such questions to a newsgroup related
> to your webserver

Ta.
My ISP doesn't provide one.





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

Date: Mon, 10 May 1999 19:40:07 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: how to setup cgi
Message-Id: <MPG.11a1016b1521f618989685@news>

In article <926364747.26353.0.nnrp-07.c3ad4005@news.demon.co.uk>, Mark 
Twells says...
 
> Ta.
> My ISP doesn't provide one.

And I suppose your ISP blocks you from DEJAnews too, where you *can* get 
to the groups mentioned in earlier posts?

BTW.. as usual I find it hard to believe 
comp.infosystems.www.authoring.cgi is not available while this NG being a 
few steps up the information food chain is.

-- 
Charles R. Thompson
RainCloud Studios
"Opinions are like eyebrows. It's clearly evident from the start who has 
one and who has two. I think you'd be hard pressed to find a guy with two 
willing to shave one off to make a point."


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

Date: 10 May 1999 18:58:59 GMT
From: gbacon@itsc.uah.edu (Greg Bacon)
Subject: Re: how to write the function that can change values of Variables that is past to the fuction, see example -->
Message-Id: <7h7a9j$4bv$1@info2.uah.edu>

In article <MPG.11a0ad8c4e84cc68989a26@nntp.hpl.hp.com>,
	lr@hpl.hp.com (Larry Rosler) writes:
: Some programmers consider this kind of invisible side effect as poor 
: style.  Another approach would be to return the changed values from the 
: subroutine and assign them back to the original variables:
: 
:   ($var1, $var2) = change($var1, $var2);
:   
:   sub change{
:   	my ($var1, $var2) = @_;
:       ... # change $var1 and $var2 here ...
:       $var1, $var2
:   }

Right.  Part of the problem is that there's no way to tell whether a
particular value is read-only.  Well, I suppose it would be possible
to wrap the assignment in an eval.  Still, I think this is more an
issue of "don't do that". :-)

Greg
-- 
Bluto: Grab a brew. Don't cost nothin'.


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

Date: Mon, 10 May 1999 14:47:43 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: matching resource ID's
Message-Id: <7h6r3t$2s899@news.gomontana.com>

[mailed+posted]

Read perldoc perlre (or man perlre, or perlre.htm), paying special attention
to the concept of "greediness".  Then follow through what parts each of the
".*" s in your pattern are going to match against.  Also learn about "\s"
and "\w" and consider using it in this instance.

Read, digest, ponder, and then you will fully understand the following:

/IDNAME\w+\s+(\w+)/

David Stiff wrote in message <7h6jrc$gdc$1@news2.symantec.com>...
>I am trying to create a pattern match to separate resource names in a
header
>file with their ID number. Unfortunately some of the ID numbers have
>comments after them which is causing a problem. Here is some sample data
>
>@idList = ( '#define NOTRANS_WFXPGR_REGKEYROOT_NAME          1',
>   '#define IDNAME_ENTRY_NAME             28722',
>   '#define IDNAME_VIEWER_SECTION          0x3035',
>   '#define IDNAME_MSG_RESET        0x0007 // why doesnt this work',
>   '#define IDNAME_MSG_RESET        0x0007 /* comments cause problems
>*/'
>    );
>
>and here is the match:
>
>if ( $id =~ m/IDNAME.* ([0-9x0-9a-zA-Z]*) .*/ ) {
>
>    $idName   = $1;
>
>}
>
>In the first three cases the match works correctly for either decimal or
hex
>values. The last two fail. My understanding was the brackets () would force
>the match to be placed in the $1. But for some reason if the comment exists
>after the ID number, $1 is the entire line.
>
>Any help?
>
>Thanks,
>Dave Stiff
>Symantec
>
>



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

Date: Mon, 10 May 1999 17:00:22 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: Need a little looping help
Message-Id: <7h72sf$2s9m2@news.gomontana.com>

Jeez, if you can't be bothered to respond to a particular query, then don't!
At least rebuff nicely.

Tad McClellan wrote in message <1rb6h7.mkc.ln@magna.metronet.com>...
>Jonathan Feinberg (jdf@pobox.com) wrote:
>: todd_b_smith@my-dejanews.com writes:
>
>: > I'm copying from sight, so please forgive typos:
>
>
>   I immediately translated that to:
>
>      "You are not looking at the code that I am looking at"
>
>
>   The action corresponding to such a statement is:
>
>      stop reading, go to next article
>
>
>: That's silly.  Does your OS not support copy & paste?
>
>
>   If you want to be taken seriously, you must contrive some
>   method of delivering the code that you need help with to
>   the folks that you want help from.
>
>
>--
>    Tad McClellan                          SGML Consulting
>    tadmc@metronet.com                     Perl programming
>    Fort Worth, Texas



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

Date: Mon, 10 May 1999 14:09:46 -0500
From: Michael Kersey <mkersey@metricom.com>
Subject: OReilly bullshit.... Camel logo trademark
Message-Id: <37372EFA.DF9A1306@metricom.com>

Before taking this too personally, why don't you email the O'Reilley
lawyer and ask if there is some way you can modify your page so that
    a) they are happy and
    b) you can keep your page essentially as it is?
That way, you both win, we win too, and you learn how to deal with this
kind of encounter.
I know its a PITA,
Good Luck,
Michael D. Kersey



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

Date: Mon, 10 May 1999 13:48:21 -0500
From: Derek Boss <boss_derek_w@email.cat.com>
Subject: Passing Args to script via web and command line
Message-Id: <373729F5.28147EFF@email.cat.com>


I am a newbie to perl and was wondering whether this can even be done.

Can a perl cgi script, which gets it data from a webpage, also be set up
to accept input from a command line??

The cgi script I have been playing with is using the GET method.  I have
been able to hard code the QUERY STRING into the script, but that really
isn't flexible.

Any information or thoughts would be appreciated.
--

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

 Derek W. Boss
 Engineering Data Systems
 Caterpillar, Inc.

 work:  Boss_Derek_W@cat.com
 home:  boss@csc.uis.edu
_______________________________________________________________________________





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

Date: Mon, 10 May 1999 13:48:54 -0500
From: Derek Boss <boss_derek_w@email.cat.com>
Subject: Passing Args to script via web and command line
Message-Id: <37372A16.3AC78AC8@email.cat.com>


I am a newbie to perl and was wondering whether this can even be done.

Can a perl cgi script, which gets it data from a webpage, also be set up
to accept input from a command line??

The cgi script I have been playing with is using the GET method.  I have
been able to hard code the QUERY STRING into the script, but that really
isn't flexible.

Any information or thoughts would be appreciated.
--

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

 Derek W. Boss
 Engineering Data Systems
 Caterpillar, Inc.

 work:  Boss_Derek_W@cat.com
 home:  boss@csc.uis.edu
_______________________________________________________________________________





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

Date: Mon, 10 May 1999 22:00:01 +0300
From: Jukka Juslin <jtjuslin@spam.cc.hut.fi>
Subject: Re: Passing Args to script via web and command line
Message-Id: <37372CB1.5FB04C10@spam.cc.hut.fi>

Derek Boss wrote:
> 
> I am a newbie to perl and was wondering whether this can even be done.
> 
> Can a perl cgi script, which gets it data from a webpage, also be set up
> to accept input from a command line??
> 
> The cgi script I have been playing with is using the GET method.  I have
> been able to hard code the QUERY STRING into the script, but that really
> isn't flexible.
> 
> Any information or thoughts would be appreciated.
> --

While running the script in offline mode from command line you can for
sure give arguments and the press ctrl+d.

++Jukka


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

Date: Mon, 10 May 1999 19:53:12 GMT
From: jgarman@sso.sytexinc.com (Jason Garman)
Subject: perlcc & dbi problems
Message-Id: <3737379a.1450616@news.clark.net>


How can you use perlcc with modules?  We are trying to use perlcc to
compile a perl script which uses the DBI and DBD::mysql modules.  The
script will compile and create an executable program, however when you
try and run it, it gives this error:

Can't locate object method "connect" via package "DBI".

I don't know how to proceed from here.  Any ideas?

-- jason


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

Date: Mon, 10 May 1999 11:36:51 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Regular Expression Help
Message-Id: <MPG.11a0c71c1f797f2989a28@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <7h74mg$25o@news.service.uci.edu> on Mon, 10 May 1999 
10:28:50 -0700, Gabe <grichard@uci.edu> says...
> I'd like to know if the following pattern matching code will do what I
> expect it to, it doesn't appear to when I run it.

One cannot 'run' code with syntax errors.  The perl compiler won't allow 
it.

>                                                   I'm new and not so good
> with regular expressions, but I'm reading the right stuff I think...
> 
> if ($type =~ /"(.+)"/) { &phrasesearch} #Will this match anything between
> two quotes and assign it to $1?

Not quite.  It will match as many characters that are not newlines as 
possible that follow the first '"' in the string and are terminated by 
the last '"' in the string.  /"(.+?)"/ will match as few characters as 
possible (i.e., up to the next succeeding '"'); adding the /s modifier 
will include newlines.

> elsif ($type =~ /\w+/sor) { &orsearch} #Will this match any word that has
> whitespace and an "or" after it?

No.  It is a syntax error.  Did you try it before posting?  Did you type 
this into your post instead of copying and pasting it?

/(\w+)\s+or\b/
 
> elsif ($type =~ /\w+/sand) { &andsearch} #Will this match any word that has
> whitespace and an "and" after it?

No.  It is a syntax error.  Did you try it before posting?  Did you type 
this into your post instead of copying and pasting it?

/(\w+)\s+and\b/

> else { &defaultsearch}
> 
> I've programmed a little search program to go through a scholarship
> database. I want to add more functionality to it by allowing specific phrase
> searches, and/or logic searches, and the +/- stuff they have on major search
> engines. Is the above correct?

Often the OR and AND are required to be in upper-case.  And I don't see 
your +/- logic.

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


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

Date: Mon, 10 May 1999 20:17:17 +0000
From: Jason Holland <jason.holland@dial.pipex.com>
Subject: Re: spawn new browser window
Message-Id: <37373ECD.F8AC5380@dial.pipex.com>

BLUESRIFT wrote:
> 
> There are, of course, several HTML methods to spawn a new browser window and
> probably several client side script languages also. What would the Perl method
> be?
> 
> Thank you,
> Rob Bell

Hello bluesrift,

Assuming you are writing a CGI, simply include JavaScript instructions
in the returned HTML...

Bye!

-- 
  Jason Holland - < "I could probably write a script for that..." >
 email: jason.holland@dial.pipex.com
   web: http://dspace.dial.pipex.com/jason.holland/
can do: Perl 5, html, JavaScript, Linux, Mac, Photoshop, everything
else...


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

Date: Mon, 10 May 1999 13:29:39 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: Warnings about uninintialised variables despite use strict
Message-Id: <7h6mhl$2riq5@news.gomontana.com>

[mailed+posted]

%ENV is initialised - or at least it exists, which is good enough.
$ENV{'REQUEST_METHOD'} might not be though - i.e. if there is no such
environment variable.

IIRC "use of uninitialised value" means you're not testing for "undef"
values, and an undef value has just been used where it's not allowed (in
this case, the "eq" operator).

Without "use strict" variables do not have to be declared using "my" - you
can just name them and they spring into existence.  However using this
method they will not be local to the enclosing block (what "my" does).

tertullian@my-dejanews.com wrote in message <7h6gr8$tlb$1@nnrp1.deja.com>...
>Use of uninitialized value at lib.pl line 36, <IN> chunk 1.
>        main::ReadParse called at sub004.cgi line 34
>
>line 36 of lib.pl (just a general sub-routine file at the moment - not a
>package or module as I haven't got those sussed yet!) is ...
>
>      if ( $ENV{'REQUEST_METHOD'} eq "GET" ) {
>
>So either perl is confused and line 36 isn't the one it's complaining
>about
>or I'm confused because surely $ENV doesn't need declaring.




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

Date: Mon, 10 May 1999 18:22:34 GMT
From: "Justin S." <kidjustino@chesco.com>
Subject: why won't this cgi script work?
Message-Id: <KtFZ2.469$O35.19731@newshog.newsread.com>

i've been working on this counter script, but i can't get it to work, why?

#!/usr/bin/perl

open(COUNT, "count.dat");
$count = <COUNT>;
close (COUNT);
open(COUNT, "> count.dat");
$count += 1;
print COUNT "$count";
close (COUNT);

print "$count";




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

Date: Mon, 10 May 1999 18:34:18 GMT
From: design@raincloud-studios.com (Charles R. Thompson)
Subject: Re: why won't this cgi script work?
Message-Id: <MPG.11a0f202bc920322989684@news>

In article <KtFZ2.469$O35.19731@newshog.newsread.com>, Justin S. says...
> i've been working on this counter script, but i can't get it to work, why?

http://language.perl.com/newdocs/pod/perlfaq5.html#I_still_don_t_get_lock
ing_I_jus

-- 
Charles R. Thompson
RainCloud Studios
"Opinions are like eyebrows. It's clearly evident from the start who has 
one and who has two."


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

Date: Mon, 10 May 1999 18:44:05 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: why won't this cgi script work?
Message-Id: <373c28d4.34310054@news.skynet.be>

Justin S. wrote:

>i've been working on this counter script, but i can't get it to work, why?

Is this intended as a CGI? It doesn't print a http header.

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

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