Re: uninitialized value?

2002-06-27 Thread Felix Geerinckx

on Wed, 26 Jun 2002 22:56:23 GMT, [EMAIL PROTECTED] (Drieux) wrote:

 We keep tossing around these 'map' tricks -
 and I was wondering why we do not put them up in
 the
 
  BEGIN {
   %in = map { $_ = 1} qw(h eh hd p c);
   
  }
 
 So that we compile them once?

Just curious, what makes you think that code is compiled more than 
once, unless you put it in a BEGIN block (or did you mean 'compile' in 
the classical sense instead of the CS sense?)

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Extract numbers from in between parentheses with regex

2002-06-27 Thread Kristofer Hoch

Brain,
  Thanks for the direction! I really need to learn more about regex. I will 
certainly read those!

Kristofer


Original Message Follows
From: Brian [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Extract numbers from in between parentheses with regex
Date: Wed, 26 Jun 2002 12:21:32 -0500

Kristofer,
you might want to check out the man page's perlrequick and perlre- I found
them pretty useful when I was first learning regex (the man page perlretut
isn't bad either).

Either way, try this;
my $string = '(608)-555-1234';
$string =~ /\((\d+)\)-(\d+)-(\d+)/;
this results in $1=608, $2=555, $3=1234;

For extracting a match in a regex, you just enclose it in parenthesises...
perl dumps it then to var's $[1-9].
One thing to consider is if a match isn't found- unless I'm mistaken, perl
won't do anything to the $[1-9] match variables leaving the variables with
there previous values.  Something to watch/test for...
~Brian


On Wednesday 26 June 2002 11:21, Kristofer Hoch wrote:
  Hi all,
Please forgive the simple nature of this question. I have never really
  used regular expression extensivly.
 
Here goes. I am trying to extract a number from in between two
  parenthesis. I want the first value I find (from right to left) in a
  string. These numbers could be phone number area codes, or comments.
 
  Could someone please help, so that I can shamelessly use it all over the
  place?
 
  Thank you
  Kristofer.
 
 
 
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread Scot Robnett

Picky, picky. :)
You're right, my bad.

use CGI;
my $q = new CGI;
my %params = $q-Vars;


SR




-Original Message-
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:16 AM
To: [EMAIL PROTECTED]
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett) 
wrote:

 Its pretty hard to make it more simple than:
 use Form;
 my %input = Form();
 
  Let me try.
 
  
  use CGI;
  %params = $q-Vars;
  

Try again. Your code throws the following error:

Can't call method Vars on an undefined value ...

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: text/plain versus text/html

2002-06-27 Thread drieux


On Wednesday, June 26, 2002, at 07:11 , Octavian Rasnita wrote:
[..]

I'm not sure I get what your real problem here is:

 if I use:

 use LWP::Simple;
 print head(http://localhost/index.shtml);

 This prints:
 text/plain; charset=ISO-8859-1Apache/2.0.36 (Win32)

 I have problems because of this fact with a web crawler.
[..]

If you were trying to parse in what you got from

LWP::Simple::head()

then wouldn't it be best to get that into an array?

you may want to think in terms of say:

[jeeves:~] drieux% perl -MLWP::Simple -e 'my @array = 
head(http://www.wetware.com/drieux;); print $_\n for @array;'
text/html



Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_jk mod_ssl/2.6.6 OpenSSL/0.9.5a 
PHP/4.1.2 mod_perl/1.24 FrontPage/4.0.4.3
[jeeves:~] drieux%

since I would HEAD that as:

[jeeves:~] drieux% HEAD http://www.wetware.com/drieux
200 OK
Connection: close
Date: Thu, 27 Jun 2002 14:50:34 GMT
Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) mod_jk mod_ssl/2.6.6 OpenSSL/
0.9.5a PHP/4.1.2 mod_perl/1.24 FrontPage/4.0.4.3
Content-Type: text/html
Client-Date: Thu, 27 Jun 2002 14:50:34 GMT
Client-Response-Num: 1
X-Powered-By: PHP/4.1.2

[jeeves:~] drieux%


ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: uninitialized value?

2002-06-27 Thread drieux


On Thursday, June 27, 2002, at 12:07 , Felix Geerinckx wrote:

 on Wed, 26 Jun 2002 22:56:23 GMT, [EMAIL PROTECTED] (Drieux) wrote:

 We keep tossing around these 'map' tricks -
 and I was wondering why we do not put them up in
 the

  BEGIN {
   %in = map { $_ = 1} qw(h eh hd p c);
   
  }

 So that we compile them once?

 Just curious, what makes you think that code is compiled more than
 once, unless you put it in a BEGIN block (or did you mean 'compile' in
 the classical sense instead of the CS sense?)


Good Point... we visit the 'BEGIN block' each time the code
is executed - but I was thinking in terms of stuff like the
fastcgi - and daemons - were we visit the 'BEGIN block' once
on invokation - and will not come that way again

The 'fear' I was imagining was

sub doFoo {
my ($arg) = @_;
my %in = map { $_ = 1} qw(h eh hd p c);
return($in{$arg});
}

and the potential of going through the 'map' sequence
each time that the function was called... but that
shouldn't happen??? since the 'mapping' is 'static'
in nature hence would be 'distilled to a Data Structure'
once at 'compile time' and not need to be 'distilled to opCode' and 
executed to
generate the static data structure on each invokation...

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd

The difference is, the efficiency and data structure CGI.pm returns.  Mine came to 
I think 72
times faster when not uploading images, and 2.5 times faster when uploading images.  
I'm not saying
CGI.pm is written poorly or anything, I am saying that it is a little bit bloated and 
has a lot of
functionality that is not needed (especially if the only thing you are doing with it 
is receiving
input).

Well personally, I've always used
print Content-type:text/html\n\n;
but somebody told me this was not the spec, so I read through the spec and looked up 
how CGI.pm was
doing it and what I found was
${CRLF}${CRLF}
as the \n\n replacement.  I of coarse should have looked a little higher where they 
defined $CRLF,
or at least tested what I had read before posting it, but oh well.  From here on out, 
I'll stick
with what I've known to work instead.

Like I've said before, it doesn't make much sense to make a wrapper for CGI.pm so 
that I can
have things the way I want them, because this is doubling the work necessary.  I'm not 
making my lib
to prove superior, or to say anything like mine is better.  I have simply found a very 
positive
solution for me (quick and in a structure that works well for me).  If others like my 
solution, and
it works well for them too, more power to them.  I will post mine on CPAN, if nobody 
else in the
world feels it is a good solution for them, that's just fine with me.  If people like 
my solution,
but have a few suggestions of how to improve it, I welcome that.


One thing I am open to after posting my lib to CPAN is suggestions.  I'm not 
exactly close
minded here, I'm just the type of person who if I'm not perfectly happy with the way 
something works
(whether programming or in the real world), I determine whether I can fix it, if I can 
I do.
Because this lib puts the received values in a structure that I like to work with, in 
my mind it
fixes things.

David



- Original Message -
From: Todd Wade [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 26, 2002 11:12 PM
Subject: CGI.pm v/s roll-your-own [WAS:] Displaying Problems



[EMAIL PROTECTED] wrote in message
008d01c21c73$aa978a30$d381f6cc@david">news:008d01c21c73$aa978a30$d381f6cc@david...

.. snip
 I'm sure I'll get lots of hate mail from CGI.pm die hard's, but my
other choice is to just not

Not trying to post hate mail, just reasoning on the subject.

 post this at all.  What I hope for is several people telling me how to
make it slightly more
 efficient or compatible with other OS's (you see I've only had opportunity
to test it on Linux and
 Win2000, though I've been testing it on Linux for about 2 1/2 years).

Lincoln Stein (the original author of CGI.pm) already has (lots of) people
doing this for him, and his module has been maintained for around 10 years.
Its been tested on scores of OS's. Ive read four of his books. There is a
book dedicated to CGI.pm. My point is his module has been rigorously
debugged and you are just now here asking people for help debugging yours.

 Its pretty hard to make it more simple than:
 use Form;
 my %input = Form();


But something else has already made it that easy.

Im not knocking your module. Im just explaining why people like us trust
people like Lincoln Stein's module over yours. For example, Ive seen alot of
hand rolled CGI parameter parsers, most of them have a line that says:

@pairs = split(//, $ENV{QUERY_STRING}); # WRONG!!

This works when the user agent uses an  as a delimeter, but some user
agents use ; (a semicolon) which is perfectly valid. program chokes. Then
people are in the newsgroups trying to get others to help track down a very,
VERY difficult-to-track bug. But at the end of the post they say, I dont
want to use CGI.pm! Floors me. Really floors me. And this is just one of
several examples I've seen.

So I know, when I say:

print $q-header();

Its going to get it right.

BTW, I find the source to CGI.pm very easy to read and makes alot of sence.
Ive seen suggestions from you in this thread that are either wrong or wont
even work. (What does this do- print Content-type:
text/html${CRLF}${CRLF};) Which tells us again Mr. Stein has a thorough
understanding of the HTTP protocol, while you stll have a little to learn.

Again, this is NOT a flame. I suggest accepting the constructive criticism
professionally.

Todd W.





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Displaying Problems

2002-06-27 Thread perl-dvd

You make a very good point fliptop, I did forget the nature of this mailing list.  As 
far as CGI.pm
debating, I will step down in this mailing list.

David



- Original Message -
From: fliptop [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Bob Showalter [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 26, 2002 6:24 PM
Subject: Re: Displaying Problems




On Tue, 25 Jun 2002, [EMAIL PROTECTED] opined:

: CGI.pm--a threat to our way of life! Down with the troglodytes! :)
:Well, not exactly my point, but ok :)   Just kidding
:I just think there are too many who close their minds to anything but CGI.pm, 
:including potentially
:more efficient customized solutions.

i would guess that, for the purposes of this mailing list, most who
recommend using CGI.pm do so because this list is aimed at beginners, and
they most definitely should be using it to parse query strings.

other available solutions, and the semantics of using them, probably
wouldn't be a good place for a beginner to learn about cgi programming.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd

my point stands :)

So out of curiosity, what kind of data structure do you get back with this?  If its as 
I would
imagine, then its very close to my own.

%hash = (
'a_name' = 'value',   # for single name value pairs
'b_name' = [multiple, values, for, this],   # for single name muli-value 
sets
'c_name' = {
 'original_name' = 'filename.jpg',
 'size' = '23554',
 'location' = 
'/tmp/fileupload/tmpfile-10028983-88.57.192.3-2783-298374-927837'
 } # for files
);

Of coarse I know the image information is not in there the same way.

David


- Original Message -
From: Scot Robnett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Felix Geerinckx [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 8:29 AM
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


Picky, picky. :)
You're right, my bad.

use CGI;
my $q = new CGI;
my %params = $q-Vars;


SR




-Original Message-
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:16 AM
To: [EMAIL PROTECTED]
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett)
wrote:

 Its pretty hard to make it more simple than:
 use Form;
 my %input = Form();

  Let me try.

  
  use CGI;
  %params = $q-Vars;
  

Try again. Your code throws the following error:

Can't call method Vars on an undefined value ...

--
felix

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread Scot Robnett

I haven't seen the rest of your module, so I'm not so sure that the point
really stands. It might. But, adding one line to initialize the CGI object
is really not that big a deal considering the kind of power you have
associated with that object. How much extra work do I have to do to utilize
the keys and values in your hash vs. the CGI.pm hash?

The data structure you get back from CGI.pm is:

- Called in a scalar context, a tied hash reference.

- Called in a list context, a standard hash
  containing key/value pairs.

- Keys/params with multiple values are returned
  as a packed string separated by \0.


Scot R.
inSite



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 10:44 AM
To: Scot Robnett; [EMAIL PROTECTED]
Cc: Felix Geerinckx
Subject: Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


my point stands :)

So out of curiosity, what kind of data structure do you get back with this?
If its as I would
imagine, then its very close to my own.

%hash = (
'a_name' = 'value',   # for single name value pairs
'b_name' = [multiple, values, for, this],   # for single name
muli-value sets
'c_name' = {
 'original_name' = 'filename.jpg',
 'size' = '23554',
 'location' =
'/tmp/fileupload/tmpfile-10028983-88.57.192.3-2783-298374-927837'
 } # for files
);

Of coarse I know the image information is not in there the same way.

David


- Original Message -
From: Scot Robnett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Felix Geerinckx [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 8:29 AM
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


Picky, picky. :)
You're right, my bad.

use CGI;
my $q = new CGI;
my %params = $q-Vars;


SR




-Original Message-
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:16 AM
To: [EMAIL PROTECTED]
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett)
wrote:

 Its pretty hard to make it more simple than:
 use Form;
 my %input = Form();

  Let me try.

  
  use CGI;
  %params = $q-Vars;
  

Try again. Your code throws the following error:

Can't call method Vars on an undefined value ...

--
felix

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd

by the way, :) is a smiley, it means I'm joking with you. (reference the last email)

With mine, there is nothing beyond what I described.  The hash structure I gave you 
below, that's
it.  Form.pm takes the input, makes a hash with it, and if you understand how to use a 
hash and
array ref, your set.  Its just a hash, no objects, no functions, just a hash.

So you use:

use Form.pm
my %input = Form();

and your done.  All the data is sitting in the hash %input.  You can at that point do 
anything you
want to with it.

Like I say, simple and efficient.

If you decide you want to know what you are getting from the cgi input, simply do 
something to this
effect:
---
foreach $key(keys(%input)){  # loop through all of the hash elements

if (ref($input{$key}) eq ARRAY){  # if this is an array ref

local $ = ', ';  # change the array delimiter to ,  temporarily for 
display
print qq^\@{\$input{$key}} = (@{$input{$key}})\n^;
# print out the array's values
# (make it easy to see which name in the hash this array belongs to)

} else {  # if its not an array ref

print qq^\$input{$key} = $input{$key}\n^;  # print out the hash element

}

}
---

Anyway, you will be able to get a closer look at it within a months time if you so 
choose.

David


- Original Message -
From: Scot Robnett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 10:03 AM
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


I haven't seen the rest of your module, so I'm not so sure that the point
really stands. It might. But, adding one line to initialize the CGI object
is really not that big a deal considering the kind of power you have
associated with that object. How much extra work do I have to do to utilize
the keys and values in your hash vs. the CGI.pm hash?

The data structure you get back from CGI.pm is:

- Called in a scalar context, a tied hash reference.

- Called in a list context, a standard hash
  containing key/value pairs.

- Keys/params with multiple values are returned
  as a packed string separated by \0.


Scot R.
inSite



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 10:44 AM
To: Scot Robnett; [EMAIL PROTECTED]
Cc: Felix Geerinckx
Subject: Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


my point stands :)

So out of curiosity, what kind of data structure do you get back with this?
If its as I would
imagine, then its very close to my own.

%hash = (
'a_name' = 'value',   # for single name value pairs
'b_name' = [multiple, values, for, this],   # for single name
muli-value sets
'c_name' = {
 'original_name' = 'filename.jpg',
 'size' = '23554',
 'location' =
'/tmp/fileupload/tmpfile-10028983-88.57.192.3-2783-298374-927837'
 } # for files
);

Of coarse I know the image information is not in there the same way.

David


- Original Message -
From: Scot Robnett [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Felix Geerinckx [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 8:29 AM
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


Picky, picky. :)
You're right, my bad.

use CGI;
my $q = new CGI;
my %params = $q-Vars;


SR




-Original Message-
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:16 AM
To: [EMAIL PROTECTED]
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


on Thu, 27 Jun 2002 02:54:10 GMT, [EMAIL PROTECTED] (Scot Robnett)
wrote:

 Its pretty hard to make it more simple than:
 use Form;
 my %input = Form();

  Let me try.

  
  use CGI;
  %params = $q-Vars;
  

Try again. Your code throws the following error:

Can't call method Vars on an undefined value ...

--
felix

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To 

Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread John Brooking

After all, Hubris is one of St. Larry's Three Cardinal
Virtues! So this seems to me to be a properly Perl-ish
attitude.

- John

--- [EMAIL PROTECTED] wrote:
 ...
 minded here, I'm just the type of person who if I'm
 not perfectly happy with the way something works
 (whether programming or in the real world), I
 determine whether I can fix it, if I can I do.


=
Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still 
alive, and there's nothing I want to do. - They Might Be Giants, http://www.tmbg.com

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd

That actually has nothing to do with it.  It has everything to do with the strong 
desire to improve
circumstances, be innovative, make the world a better place.  If you want to call me 
arrogant for
trying to improve my surroundings, go right ahead, but your tacking the wrong name on 
me.

David


- Original Message -
From: John Brooking [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Todd Wade [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 12:57 PM
Subject: Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


After all, Hubris is one of St. Larry's Three Cardinal
Virtues! So this seems to me to be a properly Perl-ish
attitude.

- John

--- [EMAIL PROTECTED] wrote:
 ...
 minded here, I'm just the type of person who if I'm
 not perfectly happy with the way something works
 (whether programming or in the real world), I
 determine whether I can fix it, if I can I do.


=
Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still 
alive, and there's
nothing I want to do. - They Might Be Giants, http://www.tmbg.com

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread Scot Robnett

True. Whew, my hand hurts from all that extra typing. ;)

Scot R.



-Original Message-
From: John Brooking [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 1:50 PM
To: Scot Robnett; [EMAIL PROTECTED]
Cc: Felix Geerinckx
Subject: RE: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


See?! Your version just expanded by 50% !!  ;-)

--- Scot Robnett [EMAIL PROTECTED] wrote:
 Picky, picky. :)
 You're right, my bad.

 use CGI;
 my $q = new CGI;
 my %params = $q-Vars;


=
Now it's over, I'm dead, and I haven't done anything that I want; or, I'm
still alive, and there's nothing I want to do. - They Might Be Giants,
http://www.tmbg.com

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.372 / Virus Database: 207 - Release Date: 6/20/2002


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




invalid

2002-06-27 Thread Kyle Babich

Why is this invalid and how do I make this valid while using strict subs?

 } elsif ($c2 eq hd) {
 $content2 = include{helpdesk/support.cgi};


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: invalid

2002-06-27 Thread Hanson, Robert

It depends on what include is.

If it is a subroutine...

 $content2 = include(helpdesk/support.cgi);

If it is a hash...

 $content2 = $include{helpdesk/support.cgi};

And what was the error?

Rob

-Original Message-
From: Kyle Babich [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 3:49 PM
To: [EMAIL PROTECTED]
Subject: invalid


Why is this invalid and how do I make this valid while using strict subs?

 } elsif ($c2 eq hd) {
 $content2 = include{helpdesk/support.cgi};


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: invalid

2002-06-27 Thread Kyle Babich

What I'm trying to do is print the contents of helpdesk/support.cgi when
c2=hd
Here is that portion of the script and as of right now it is displaying a
blank page when I
try to run it:

my $c1 = param('c1');
my $content1 = c1;

 if ($c1 eq h) {
  $content1 = qq{nbsp;\n};
 } elsif ($c1 eq eh) {
  $content1 = qq{nbsp;\n};
 } elsif ($c1 eq p) {
 $content1 = qq{nbsp;\n};
 } elsif ($c1 eq c) {
 $content1 = qq{nbsp;\n};
 } elsif ($c1 eq su) {
 $content1 = qq{nbsp;\n};
 } elsif ($c1 eq hd) {
 $content1 = qq{IMAP.cc Help Desk\n};
 } else {print error:  content1 failed\n;}

my $c2 = param('c2');
my $content2 = c2;

 if ($c2 eq h) {
  $content2 = qq{nbsp;\n};
 } elsif ($c2 eq eh) {
  $content2 = qq{nbsp;\n};
 } elsif ($c2 eq p) {
 $content2 = qq{nbsp;\n};
 } elsif ($c2 eq c) {
 $content2 = qq{nbsp;\n};
 } elsif ($c2 eq su) {
 $content2 = qq{nbsp;\n};
 } elsif ($c2 eq hd) {
  $content2 = include{helpdesk/support.cgi};
 } else {print error:  content2 failed\n;}

- Original Message -
From: Hanson, Robert [EMAIL PROTECTED]
To: 'Kyle Babich' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 4:00 PM
Subject: RE: invalid


 It depends on what include is.

 If it is a subroutine...

  $content2 = include(helpdesk/support.cgi);

 If it is a hash...

  $content2 = $include{helpdesk/support.cgi};

 And what was the error?

 Rob

 -Original Message-
 From: Kyle Babich [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, June 27, 2002 3:49 PM
 To: [EMAIL PROTECTED]
 Subject: invalid


 Why is this invalid and how do I make this valid while using strict subs?

  } elsif ($c2 eq hd) {
  $content2 = include{helpdesk/support.cgi};


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread John Brooking

Oh, dear, I was afraid that that message might be
misinterpreted! I thought my humor was evident enough
by the informal language, but I guess I should have
put a smiley on it too.

I didn't mean hubris in a bad sense. The sense I get
from Larry's use of it (from reading the Camel book),
and the sense I meant here, was having enough
self-confidence to believe that you *can* do all the
things you mention, rather than just putting up with
what is handed to you because you're too humble to
think that little old you could do better. It might
tend towards arrogance in some cases, maybe,
especially when unwarranted by the actual talent
behind it, but true arrogance connotes more negative
personality traits, such as not being open to other
points of view or debate, and that's *not* what I
meant.

I did assume familiarity with Larry's philosophy of
Laziness, Impatience, and Hubris as The Basis of All
Good Software Design, and maybe I shouldn't have. I'd
quote some of this from the Camel book, but I don't
have it with me. I would summarize it as good
programmers don't like write the same thing over and
over, yet if they don't like something they got
elsewhere, they'll write something themselves that
they like better. I suspect he intentionally chose
provocative words to get people's attention, but his
claim that they lead to good software design implies
that far from being bad traits, he thinks that they
are actually good traits, properly applied.

I apologize that my message was taken negatively. I
meant it positively. I support the spirit of your
effort.

- John

--- [EMAIL PROTECTED] wrote:
 That actually has nothing to do with it.  It has
 everything to do with the strong desire to improve
 circumstances, be innovative, make the world a
 better place.  If you want to call me arrogant for
 trying to improve my surroundings, go right ahead,
 but your tacking the wrong name on me.
 
 David
 
 
 - Original Message -
 From: John Brooking [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; Todd Wade
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, June 27, 2002 12:57 PM
 Subject: Re: CGI.pm v/s roll-your-own [WAS:]
 Displaying Problems
 
 
 After all, Hubris is one of St. Larry's Three
 Cardinal
 Virtues! So this seems to me to be a properly
 Perl-ish
 attitude.
 
 - John


=
Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still 
alive, and there's nothing I want to do. - They Might Be Giants, http://www.tmbg.com

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread perl-dvd

No offence taken, I have heard the word hubris before, but I wasn't certain of the 
meaning, so
naturally I looked it up (now that you mention it, I have heard that quote out of the 
Camel book
before).  At first I thought it was a compliment the way you said it and all, but 
after seeing
dictionary.com's definition, I wondered.  Well thank you for the compliment.

David


- Original Message -
From: John Brooking [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 3:39 PM
Subject: Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems


Oh, dear, I was afraid that that message might be
misinterpreted! I thought my humor was evident enough
by the informal language, but I guess I should have
put a smiley on it too.

I didn't mean hubris in a bad sense. The sense I get
from Larry's use of it (from reading the Camel book),
and the sense I meant here, was having enough
self-confidence to believe that you *can* do all the
things you mention, rather than just putting up with
what is handed to you because you're too humble to
think that little old you could do better. It might
tend towards arrogance in some cases, maybe,
especially when unwarranted by the actual talent
behind it, but true arrogance connotes more negative
personality traits, such as not being open to other
points of view or debate, and that's *not* what I
meant.

I did assume familiarity with Larry's philosophy of
Laziness, Impatience, and Hubris as The Basis of All
Good Software Design, and maybe I shouldn't have. I'd
quote some of this from the Camel book, but I don't
have it with me. I would summarize it as good
programmers don't like write the same thing over and
over, yet if they don't like something they got
elsewhere, they'll write something themselves that
they like better. I suspect he intentionally chose
provocative words to get people's attention, but his
claim that they lead to good software design implies
that far from being bad traits, he thinks that they
are actually good traits, properly applied.

I apologize that my message was taken negatively. I
meant it positively. I support the spirit of your
effort.

- John

--- [EMAIL PROTECTED] wrote:
 That actually has nothing to do with it.  It has
 everything to do with the strong desire to improve
 circumstances, be innovative, make the world a
 better place.  If you want to call me arrogant for
 trying to improve my surroundings, go right ahead,
 but your tacking the wrong name on me.

 David


 - Original Message -
 From: John Brooking [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; Todd Wade
 [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, June 27, 2002 12:57 PM
 Subject: Re: CGI.pm v/s roll-your-own [WAS:]
 Displaying Problems


 After all, Hubris is one of St. Larry's Three
 Cardinal
 Virtues! So this seems to me to be a properly
 Perl-ish
 attitude.

 - John


=
Now it's over, I'm dead, and I haven't done anything that I want; or, I'm still 
alive, and there's
nothing I want to do. - They Might Be Giants, http://www.tmbg.com

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm v/s roll-your-own [WAS:] Displaying Problems

2002-06-27 Thread fliptop

On Thu, 27 Jun 2002, [EMAIL PROTECTED] opined:

:With mine, there is nothing beyond what I described.  The hash structure I gave you 
:below, that's
:it.  Form.pm takes the input, makes a hash with it, and if you understand how to use 
:a hash and
:array ref, your set.  Its just a hash, no objects, no functions, just a hash.
:
:So you use:
:
:use Form.pm
:my %input = Form();
:
:and your done.  All the data is sitting in the hash %input.  You can at that point do 
:anything you
:want to with it.
:
:Like I say, simple and efficient.

can you limit upload sizes?
can you disable uploads altogether?
how does it handle errors, especially during file uploads?
can you exclude undefined parameters from the parameter list?
does it have a debug mode?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: cgi probs

2002-06-27 Thread Scot Robnett

I hate to ask the obvious, but is your web server running on that box?

Scot R.



-Original Message-
From: Ian Rogers [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: cgi probs



Hi

I have set up my machine running suse linux, and i am now trying to get cgi working. I 
have written a html for to post the data and a basic cgi script to read in and print 
out the results.

I have written cgi code on other machines so the code is correct, but i am having 
trouble on my machine.

When i press the submit button it comes up with a message to confirm if i want to send 
the data, but when i click on ok, nothing happens, just like it can't find the script, 
but i have put the correct path for the script in the form action.

is there anything i need to do apart from installing perl?

i have placed my cgi script in my cgi-bin directory, and the htlm file in the 
www/public_html directory.

I am not sure what i am doing wrong

any help would be fully apreciated

thanks

Ian

 



-
Relive the FIFA World Cup goals with exclusive video highlights!

http://fifaworldcup.yahoo.com/fc/en