RE: Home Server

2001-05-30 Thread Curtis Poe
--- Scott Thompson <[EMAIL PROTECTED]> wrote: > If there are enough requests, I could compile a quick setup tutorial for > Win32 Apache and ActiveState Perl to post to the mailing list. Any takers?? > :) In the spirit of not duplicating effort (and not bursting anyone's bubble), I have al

RE: Home Server

2001-05-30 Thread Curtis Poe
> > In the spirit of not duplicating effort (and not bursting > > anyone's bubble), I have already written > > a quick setup guide for this. It can be found at > > http://www.perlmonks.org/index.pl?node_id=44536 > > > > Ah, many thanks Curtis! An excellent guide! However, I did notice th

Re: Netscape problem

2001-05-30 Thread Curtis Poe
using), post the output to this list and we can take a look at the data for you. If anyone else knows of a cleaner way of printing just the headers (short of using IO::Socket), I'd love to see it! Cheers, Curtis Poe "Ovid" on http://www.perlmonks.org/ = #!/bin/perl -sp0777ih

Re: Netscape problem

2001-05-30 Thread Curtis Poe
on the command line: perldoc LWP perdoc Data::Dumper Hope this helps. Cheers, Curtis Poe Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ > > >Generally, with a situation like this, I telnet to port 80 and view >

Feedback requested

2001-05-30 Thread Curtis Poe
all?), but if anyone is interested and would like to give me feedback on what they do and don't like about it, I'd appreciate it. = Cheers, Curtis Poe Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ _

Re: Netscape problem

2001-05-30 Thread Curtis Poe
that took care of their bugs. You, however, took the time to test this in other browsers and realized the problem. What you need to do at this point is figure out why the wrong content-type is being sent. If you send a text/html content-type, this should fix your problem. = Cheers, Cu

Re: Retrieving cookies

2001-06-01 Thread Curtis Poe
--- "Stokes, John" <[EMAIL PROTECTED]> wrote: > I've figured out how to set a cookie, and I think I've retrieved it > successfully (no errors, at least), but now how do I manipulate it? I can't > figure out how to reference the cookie data. > > Here's an example of my code: > > use CGI; > $q =

Re: output "CGI=HASH(0x80ca53c)" ?

2001-06-01 Thread Curtis Poe
throw in to make your program more portable. Here's the new function: sub read_document { local $/; open(SOURCE, "<$docoment")|| die "Could not open file!!\n"; binmode SOURCE; $data = ; close SOURCE; return $data; } Cheers, Curtis Poe = Senior

Re: SSI - Variable Passing

2001-06-01 Thread Curtis Poe
Not having used SSI much, I can only hazard a couple of comments. 1. Did you chat with the admin to find out whether or not "exec" SSIs is allowed? Sometimes SSI is available but this function is disabled for security reasons. > I've tried #exec cgi="/cgi-bin/test.pl?value=name", but it's not

Re: Retrieving cookies

2001-06-01 Thread Curtis Poe
--- "Stokes, John" <[EMAIL PROTECTED]> wrote: > OK, I'm still having a problem. > > I still can't seem to manipulate the cookie data. Say I want to record > someone's name and then print out "hello so-and-so" when they return to my > site. (That's not what this is actually for, but it's the same

Fwd: Re: Retrieving cookies

2001-06-01 Thread Curtis Poe
I forgot to mention something: the first time you access the script through your browser, it won't have the cookie (since this is the first time it's being set). The second time you access it, the browser will return the cookie value and the script will display it. > use strict; > use CGI; >

Protocol issue

2001-06-01 Thread Curtis Poe
fore responding to ensure that others get a chance to have a crack at it? Have my answers been useful? Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do

Re: Regexp compilation in mod_perl?

2001-06-01 Thread Curtis Poe
y escaping the caret, the split works fine: C:\>perl -e "$x=q/a^b^c/;@x=split/\^/,$x;print $x[0];" a If you have a caret in your params, this will cause your script to fail. Hope this helps! Cheers, Curtis Poe PS: Here's a corrected version of your script with "strict&quo

Re: Redirecting AND creating cookies

2001-06-01 Thread Curtis Poe
Aack! Once again sent to the posted instead of the group. Sigh... __ Are you perchance using IIS? IIS has a known bug in version 3, 4, and 5 (yup, that's 3 versions!), where it ignores the Set-Cookie: header when combined with a Location: header. You can find

Re: Protocol issue

2001-06-03 Thread Curtis Poe
Perl will not allow the operation to proceed. This is a Good Thing! To use tainted data, you have to extract what you need with a regular expression backreference. See http://www.perldoc.com/perl5.6/pod/perlsec.html for more details. Cheers, Curtis Poe = Senior Programmer Onsite! Technolog

Re: Perl books

2001-06-04 Thread Curtis Poe
e above questions, you should probably introduce the book to your fireplace. There *are* reasons to answer 'no' to those questions, but generally those who avoid strict, warnings, standard modules, and taint checking do so for the wrong reasons. Cheers, Curtis Poe = Senior Progra

Re: netscape won't read as html

2001-06-04 Thread Curtis Poe
rl -wT use strict; use CGI qw/:standard/; print header, start_html( -title => "Control Panel", -bgcolor => "white" ), "Hello World", end_html; Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.on

Re: if statement printing when it shouldnt :)

2001-06-04 Thread Curtis Poe
actually, the empty string), because it's returning a false value. However, you have "1" in quotes, which treats it as a string instead of a number. If you're trying to do a string comparison, you want 'eq' instead of '=='

Re: Where to begin - web resources

2001-06-05 Thread Curtis Poe
g strict will *immediately* tell you the bug. 4. Doesn't use warnings. Warnings probably shouldn't be turned on in production code, but you want them in development. There are all sorts of niggling little errors that they will catch. The above points aren't comprehen

Re: How to pass form data between two CGI's ?

2001-06-05 Thread Curtis Poe
doing that. It might be the best solution, but what if one of the scripts offers a universal functionality that 30 other scripts might need? Incorporating it into the same script might seem like a convenient short-term solution, but violates the concepts of "software reuse". Cheers,

RE: This n' that

2001-06-06 Thread Curtis Poe
$sth->execute( $date, $question, $answer ); Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresse

Fwd: Re: cgi-lib.pl

2001-06-06 Thread Curtis Poe
Sigh. Once again, forgot to sent this to the group :( Maybe I should drop "Senior" from my job title? --- Curtis Poe <[EMAIL PROTECTED]> wrote: > Date: Wed, 6 Jun 2001 15:41:51 -0700 (PDT) > From: Curtis Poe <[EMAIL PROTECTED]> > Reply-to: [EMAIL PROTECTED]

Re: Succinct Code

2001-06-07 Thread Curtis Poe
ch more succinct code that's easier to maintain: my @locations = qw/ East West North Southeast Southwest /; foreach my $array_location ( @locations ) { my $checked = ''; if ( $location =~ /$array_location/ig ) { $checked = ' checked'; } print qq/$array_location

Re: DBI and Win32::ODBC

2001-06-07 Thread Curtis Poe
find the exact SQL statement that caused the issue. I find this easier than constantly adding "print" statements to my code. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

Re: Erratic server errors apparently caused by missing header.

2001-06-07 Thread Curtis Poe
to use CGI.pm: it's tough to mess up the headers: #!/usr/bin/perl -wT use strict; use CGI qw/:standard/; print header; Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

Re: subroutine problem...

2001-06-08 Thread Curtis Poe
--- Jeremy Gray <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm only a couple days into learning perl here.. but I've been having this > problem with subroutines I can't seem to figure out. Could someone explain > what I'm doing wrong here: > > require "cgi-lib.pl"; Please don't use cgi-lib.pl.

Re: comparing date values

2001-06-08 Thread Curtis Poe
($year1,$month1,$day1, $year2,$month2,$day2); Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail

RE: using modules installed in local CGI bin

2001-06-08 Thread Curtis Poe
> if ($#path > 0) > @paths=split /:/, $ENV{$key}; Should be if ($#path > 0) { @paths=split /:/, $ENV{$key}; } Your content type should be (space after the colon) print "Content-Type: text/html\n\n"; --- Al Hospers <[EMAIL PROTECTED]> wrote: > is this correct? >

cgi-lib.pl link

2001-06-08 Thread Curtis Poe
Recently, someone sent a link to an article by (I think) Mark-Jason Dominus which explained all of the bad things about cgi-lib.pl. Could someone please resend the link? I'd like to have it handy to send to people rather than have to "re-explain" everything. Cheers, Curtis Po

Re: Making use of "use" dynamic ?

2001-06-09 Thread Curtis Poe
s the way to go? require class1::foo if $somevar == 1; require class2::foo if $somevar == 2; require class3::foo if $somevar == 3; Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

Re: Regex question

2001-06-11 Thread Curtis Poe
r requirements. Easy enough to add, though. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

Easy method of parsing form data

2001-06-11 Thread Curtis Poe
even skip reading the documentation and just run the program: parse_form.pl some.html It's that easy to use. However, reading through the documentation will let you understand what's going on with the output and what you, as the programmer, will need to do to get it production re

Re: secure scripts

2001-06-11 Thread Curtis Poe
Perl/CGI course has some good, basic information about this. It'll give you a good start on many of the basics, but is not as comprehensive as the above faq. 'perldoc perlsec' is also good. An online version is at http://www.perldoc.com/perl5.6/pod/perlsec.html Cheers, Cu

RE: javascript within print "<

2001-06-12 Thread Curtis Poe
al Web page would and is fairly easy to follow. Getting used to the built in HTML functions of CGI.pm can make the resulting HTML code much cleaner. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlm

RE: javascript within print "<

2001-06-13 Thread Curtis Poe
Heading test If you like CGI::Pretty, be sure to upgrade to the latest version (1.05), as earlier versions tend to be buggy. > I appreciate your insight into CGI.pm, but I think I'll just keep doing > things the way I have (for now). So long a

RE: javascript within print "<

2001-06-13 Thread Curtis Poe
--- Curtis Poe <[EMAIL PROTECTED]> blathered: > If it's printing out your tags in lower case, you definitely have an issue with >CGI.pm. [snip] Ugh. That should have read "If it's *not* printing out your tags in lower case...". Cheers, Curtis Poe = Seni

Re: Perplexing header problem

2001-06-13 Thread Curtis Poe
ls{'color'} } ) { # do something } Or you could access each color value directly: my $second_color = $vals{ 'color' }->[1]; Or you could put them in a separate array, if you feel more comfortable with that: my @colors = @{ $vals{'color'} };

Re: calling a external cgi from a form passing parameters

2001-06-13 Thread Curtis Poe
7;username', -size=>20), $q->p(), $q->h3('type user password'), $q->password_field(-name=>'passwd', -size=>20), $q->p(), $q->submit(-name=>'Check'), $q->end_form, $q->hr, $q->end_ht

Re: Form - Password security

2001-06-13 Thread Curtis Poe
ded security, use Digest::SHA1 instead. It's a little slower, but more secure. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/

RE: Form - Password security

2001-06-13 Thread Curtis Poe
n't generate the same $rand for the same data every time, you cannot retrieve your data. Managing a different $rand for every user would be difficult. However, as you pointed out, it would be more secure so long as you can protect the $rand value from prying eyes (as my short snippet does no

Re: beginner's addressbook tutorial - step 3 - creating perlclasses and our first cgi

2001-06-13 Thread Curtis Poe
r example, if you want japanese characters, you could use ISO-2022-JP. If the charset is not specified, the browser (if I recall correctly), will use the default charset that the user has chosen. In practice, this rarely makes a difference, but when working with international documents, it

Re: beginner's addressbook tutorial - step 3 - creating perlclasses and our first cgi

2001-06-14 Thread Curtis Poe
nd and adds it to the response headers from the server, thus accomplishing the same thing. I know that some User Agents ignore meta tags, but I suspect that if they can't handle meta tags, they probably can't handle character sets other than ASCII or extended ASCII. Ch

Re: calling a external cgi from a form passing parameters

2001-06-14 Thread Curtis Poe
hat you ask it to encode. I wasn't expecting that. Second: start_form defaults to the 'post' method. I changed it to -method => 'get', which clears up another bug that happened when the server was ignoring params on first pass. When you change it to a GET requ

Re: string question

2001-06-14 Thread Curtis Poe
Of course, if you don't have the protocol on the URL (the http part), then you won't have it in the resulting URL. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

Re: So what am I doing incorrectly??

2001-06-14 Thread Curtis Poe
ed string force Perl to recognize that $A is the variable in question. It's not needed here, but if the $A was immediately followed by letters ("images/celtknt$Apic.jpg"), the Perl would need to curly braces so that it knows *which* letters are part of the variable name. Hope t

Re: browser attachment

2001-06-14 Thread Curtis Poe
4. How do I attach that file to my cgi prog? See 3. above. 5. My assumptions are that I'll have to create a tempfile of their uploaded file, after sending the file, delete the tempfile. CGI.pm handles this for you. Again, see the link I provided. You have asked a lot of questions and

Re: browser attachment

2001-06-14 Thread Curtis Poe
x27; and you'll be fine: use CGI; $CGI::POST_MAX = 1_048_576; # 1 meg file size limit Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!?

Re: php -> perl

2001-06-15 Thread Curtis Poe
m. That's when you track down the problem and fix it in one place rather than develop work-arounds that may turn into 'do not work-arounds'. :) Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org

Re: How to generate a table ?

2001-06-15 Thread Curtis Poe
#x27;:' ) ), $q->td( { -align => "left" }, $q->textfield( -name => 'NEWTITLE', -default => $title, -size => 50, -maxlength => 100) ),

RE: How to generate a table ?

2001-06-15 Thread Curtis Poe
Heh. I keep saying 'factor out common elements', but I didn't bother to do it in my snippet :) --- "Tillema, Glenn" <[EMAIL PROTECTED]> wrote: > #!/usr/local/bin/perl -w > > use CGI qw/:standard *table/; > > $cust_id = "cust"; > $acct = "account"; > $title = "title"; > > %hofEntries = (1 =>

Re: email attachment

2001-06-18 Thread Curtis Poe
legacy code, don't use ReadParse. There are a lot of problems with using it and it's good to get used to making $cgi->param calls for everything. To duplicate your final loop, you could do this (which also prints the value associated with each param): forea

Re: testing for max size of file

2001-06-18 Thread Curtis Poe
ess I am mistaken, CGI.pm does not track filesize data directly. If the POST size (not file size) is larger than what CGI.pm is allowed, then $query->cgi_error will contain the text "413 Request entity too large". Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://ww

Lesson Four of online CGI course

2001-06-18 Thread Curtis Poe
navigation, amongst other things. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Spot the hottest trends in music, movies, and

Re: Re: Running CGI's locally

2001-06-19 Thread Curtis Poe
ndows: http://www.perlmonks.org/index.pl?node_id=44536 (umm... you did say Windows, right?). Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!

Re: Server Push - ditto

2001-06-19 Thread Curtis Poe
This link should have several examples of what you are looking for. http://stein.cshl.org/WWW/software/CGI/examples/ --- "Moon, John" <[EMAIL PROTECTED]> wrote: > Ditto ... any body doing this ?... I too want to uses frames to send a > message to another frame without regenerating the form in th

RE: need code

2001-06-20 Thread Curtis Poe
and not to the shell, where they could be interpreted in unexpected (and possibly dangerous) ways. Absolutely do NOT use backticks unless it is critical that you capture the output of the command. Backticks are extremely dangerous if you are allowing any user data near the shell. Cheers,

RE: Extra ?

2001-06-21 Thread Curtis Poe
--- "Moon, John" <[EMAIL PROTECTED]> wrote: > Yes, I assumed it is trying to help me ... > > But don't want it's (CGI's) help ... in this case > > Any one know how to stop it ... I do a $q->new CGI after getting my values > from the post ; and yes I use $q->endform; > > > John W Moon Um,

RE: Extra ?

2001-06-21 Thread Curtis Poe
it, assuming that you've already created the %ids hash: my $table = ''; foreach (sort keys %ids) { $table .= $q->Tr( $q->td({-align=>'RIGHT'},$ids{$_}{label},$q->b(':')), $q->td({-align=>'LEFT'}, $q->textfie

Re: mail extensions

2001-06-21 Thread Curtis Poe
if the situation warrants. Of course, they may also be extrememly rigid and disallow all attachments, thus forcing you to find another solution. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

RE: Extra ?

2001-06-21 Thread Curtis Poe
ubmit a form and CGI.pm redisplays that form using its HTML shortcuts, it automatically fills in all of the form values for you if your param names match the HTML shortcut attribute names. Apparently, CGI.pm uses the hidden .cgifields tag to let it know that it's processing a 'sti

RE: Extra ?

2001-06-21 Thread Curtis Poe
--- William McKee <[EMAIL PROTECTED]> wrote: > On 21 Jun 2001, at 9:50, Curtis Poe wrote: > > > foreach ($q->param) { > > > $REQUEST{"$_"}=$q->param("$_"); > > > } > > > > I assume that you know your form better th

Re: Extra ?

2001-06-21 Thread Curtis Poe
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > >>>>> "Curtis" == Curtis Poe <[EMAIL PROTECTED]> writes: > > > Curtis> my $foo_count = scalar @{[param('foo')]}; > > That's nice, but I prefer: > &g

Re: Extra ?

2001-06-21 Thread Curtis Poe
ccessed in scalar context, it evaluates each item in scalar context and returns the value of the final element. Since, in the third example, the array is the third element, it's evaluated in scalar context, as expected. So why do the third and fourth examples have different outputs? Because li

Re: Extra ?

2001-06-21 Thread Curtis Poe
__ C:\>perl -e "print my $n = qw(a b c d)" d ___________ Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __

Re: Can't access CGI object in required file?

2001-06-22 Thread Curtis Poe
thing like $$ (at least you shouldn't be). Also, since they are built directly into the language, they don't interfere with code reuse (usually) since they are so well documented and understood. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: untaining data

2001-06-22 Thread Curtis Poe
tenance programmer comes along and removes the 'else', then you have a security issue. This will do what you want (if I understood you correctly): my ( $data ) = ( $dirty_data =~ /^([-@w.:+, ]+)$/ ); Note that a character class does not respect metacharacters like a normal regex.

Re: untaining data

2001-06-22 Thread Curtis Poe
--- Timothy Kimball <[EMAIL PROTECTED]> wrote: > Curtis Poe wrote: > : my ( $data ) = ( $dirty_data =~ /^([-@w.:+, ]+)$/ ); > : > : Note that a character class does not respect metacharacters like a normal regex. >You don't > need > : to escape most cha

Re: GD Problem.

2001-06-22 Thread Curtis Poe
Query String 'action=image' to your script. When your script reads that, it will do something like this: my $action = param( 'action' ) || ''; if ( $action eq 'image' ) { print header( 'image/jpeg' ); # rest of code here, though it&#x

RE: CGI Return

2001-06-25 Thread Curtis Poe
lly seen this used in Web pages that have Javascript auto-submit form data in the background and let's the user continue reading the page. #!/usr/bin/perl -wT use strict; use CGI qw/:standard/; print header( -status => '204 No Content' ); # Don't prin

Re: inline substitution

2001-06-25 Thread Curtis Poe
llapse',-border=>1}, Tr( $tableHeaders ), # build other table items here, if you wish ); As a side note, I like the way you got around not being able to use embedded spaces with assigning to an array with qw//. Cheers, Curtis Poe = Senior Programmer Onsit

RE: CGI Return

2001-06-25 Thread Curtis Poe
--- Paul Burkett <[EMAIL PROTECTED]> wrote: > So you're "Ovid"? I'm reading a course online right now, seems very > informative! Paul, sorry to send this to the list (though I'm trying *again* to send to you, also), but whenever I try to reply directly to you, I get the following message: -

RE: ? embed scalars in the sql

2001-06-26 Thread Curtis Poe
ment section for information about the `DBI_TRACE' environment variable. I'd also set the "RaiseError" property. When you do that, errors will be raised automatically with each call to the DBI object and you won't have to check for them individually. Here

Re: Re: Code Review

2001-06-26 Thread Curtis Poe
print "\n"; } __DATA__ Jones, John 35 20 02 05/02/2001 F 060506050705040405047 11 04 01 Jones, John 35 20 02 05/09/2001 F 050604050705040405045 10 13 02 Jones, John 35 20 02 05/16/2001 F 050505040704040509048 09 01 03 Of course, the

Different reply-to?

2001-06-26 Thread Curtis Poe
k it would be a Good Thing to change the mailing list so that the "reply to" points back to the list instead of the individual who sent the message. If we still see the original sender's email address, direct contact could still be an option. Any thoughts? Cheers, Curti

Re: Mainting State On IIS 4 Without Cookies/Hidden Fields

2001-06-26 Thread Curtis Poe
ord characters URL-friendly Further, here's a quote from the book regarding this method: This does a good job of generating a unique key for each request. However, it is not intended to create keys that cannot be cracked. If you are generating sessions identifiers that provide access to sen

Re: CGI...blea

2001-06-26 Thread Curtis Poe
to take its data from another source. One way is to do this: my $q = CGI->new(""); Then, you can use $q at will without clobbering STDIN. This is often used for debugging when you want consistent query parameters: my $q = CGI->new('color=red&name

Re: It WORKS!

2001-06-26 Thread Curtis Poe
al! Huh? Frankly, I'm astonished that my suggestions helped. I was just guessing as to what the issues may have been. Yes, you may add my name to the list. I never object to having my name being more widely known ... never know when I'll be job hunting again :) Cheers, Curtis Po

Re: Hashes and hashes of hashes

2001-06-26 Thread Curtis Poe
t; 'alpha', 'website' => 'perlmonks' } }; Then, to access the 'account' data for $tag, you use this: my $data = $newdata{$tag}{'account'}; Hope that helps! Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: Perl Boilerplate???

2001-06-28 Thread Curtis Poe
Well, I used to put something like the following at the top of my programs: #D:/perl/bin/perl.exe -wT # Last updated June 22, 2001 # # Program: sys_admin.cgi # Author: Curtis Poe # Date Created: May 29, 2001 # Purpose: This program drives the various

Re: use strict errors?

2001-06-28 Thread Curtis Poe
;t take any of this personally. I realize that you are new to Perl and I'm just hoping to point you in the right direction. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/

Re: split function question

2001-06-28 Thread Curtis Poe
it the above line on commas will result in five fields instead of three. You should probably use a module like Text::CSV or something similar. If you show us some sample input, expected output, and actual output, we can offer better advice. Cheers, Curtis Poe = Senior Programmer Onsite!

Re: Subroutine returning a hash (?)

2001-07-03 Thread Curtis Poe
--- Martijn van Exel <[EMAIL PROTECTED]> wrote: > I was in a modular mood and thought it might just be a good idea to > do the parsing of the querystring in a subroutine. The subroutine > goes into a separate file that I then 'require' in all my future > CGI-scripts (is this a good way?). In t

Re: Configuring cgi scripts on Windows2000

2001-07-05 Thread Curtis Poe
s of a particular OS were off-topic. As for discussions of this tone, I've been on the 'Net for quite a few years and have *never* seen anything productive come out of this. I've seen bad tempers, hurt feelings, and general unpleasantness, but never anything producti

RE: Opening HTML file from PERL

2001-07-05 Thread Curtis Poe
60 => \&MiscServ, ); ... my $sub = $DISPLAY{*form value returned*}; &$sub if $sub; # jump to sub to display requested report This is much cleaner and you won't have to worry about getting bitten by "no st

Re: how to upload a file through an html form?

2001-07-09 Thread Curtis Poe
ht from the docs: $file = $query->upload('uploaded_file'); if (!$file && $query->cgi_error) { print $query->header(-status=>$query->cgi_error); exit 0; } Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsite

Re: Required Fields Module

2001-07-09 Thread Curtis Poe
because it works. Oh, and about the overhead of loading CGI.pm: if you have a site that is so slow that loading CGI.pm is causing performance issues, than CGI.pm is the last of your worries. If you are worried that you'll get to the point where CGI.pm will cause those performance issues, than

Re: how to upload a file through an html form?

2001-07-09 Thread Curtis Poe
ading the file. > > yes, but the original poster was confused as to why when he searched the > hard drive he couldn't find the file. Sigh. I need to read these darned things closer :) Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsi

Re: Use CGI.pm or Parse it in the script?

2001-07-09 Thread Curtis Poe
%form=@data; # returning a reference to the hash instead of the hash is probably faster, # especially if you're working with a large hash. %form; } ## Let us know if you have any more questions. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (htt

Re: Errors

2001-07-10 Thread Curtis Poe
l disable output buffering which should increase the likelyhood of getting *some* output to the browser, so long as your script is compiling. 2. Are your permissions set correctly? 3. Does your shebang line point to the Perl interpreter? Cheers, Curtis Poe = Senior Programmer Onsite!

Re: CGI.pm not recognising multipart/form-data ?! help

2001-07-11 Thread Curtis Poe
ive could be helpful as an upgrade introduces enough differences that it's not easy to just guess the source of the problem. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ _

Re: applause for Casey!!!!! APPLAUSE DUDE! ('Turning the tide...' and a 911 plea for help)

2001-07-12 Thread Curtis Poe
les? What's to stop a DoS attack based on uploading too many files? > print OUTFILE $buffer while ($bytesread = read($filename, $buffer, 1024)); What if this is run on Windows? Needs 'binmode' for both the read and write. Not very portable. Further, you're

Re: Is my script too big?

2001-07-13 Thread Curtis Poe
elf. > > Gary On the template note: I've finally convinced our company to start using templates instead of HERE docs for our Web pages and the size of our programs has dropped dramatically. We now have the added benefit that it's *much* easier to craft the logic in the te

Re: Nasty

2001-07-13 Thread Curtis Poe
t takes to get my point across. Check all egos at the door. That might be my credit card number on the line. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ ___

Re: Excel to html via CGI

2001-07-16 Thread Curtis Poe
7;ve looked into the DBD::Excel module and while it looks interesting, it's definitely listed as 'alpha' code (not even beta!). I wouldn't recommend anything like that in a production environment unless all else fails. Cheers, Curtis Poe = Senior Programmer Onsite! Tec

Re: Packages, classes, cgi

2001-07-18 Thread Curtis Poe
, classes, objects, etc... > > Thanks much! > Shawn You can check Tom Christiansen's "perltoot" http://www.perlmonks.com/index.pl?node=perlman%3Aperltoot&lastnode_id=394 to learn the basics of OO-Perl. For a book, I strongly recommend "Object-Oriented Perl"

Re: This is driving me crazy....

2001-07-24 Thread Curtis Poe
# <- change the comma to a dot td( { -align => 'RIGHT', -valign => 'TOP', -height => '450', -width => '450'}, "Jan 1, 2001&qu

Re: Tracking drop down box selections...

2001-07-25 Thread Curtis Poe
; That will ensure that the $selection variable will have one or two digits. If it contains anything *other* than digits, $selection will be undefined. Then, when you pass it to your sub, you check to see if it's defined. If not, someone may have tried to alter the form and deliberately p

Re: book for newbee

2001-07-26 Thread Curtis Poe
hance to read this edition yet, but I intend to do so when I get the chance. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://www.onsitetech.com/) "Ovid" on http://www.perlmonks.org/ __ Do You Yahoo!? Make in

Re: book for newbee

2001-07-26 Thread Curtis Poe
at I should point out that Mark-Jason Dominus took *strong* exception to my review and mentions that he has recommended Elizabeth Castro's book to beginners. He posted a response to my review (under the name 'Dominus') and while I disagree with what he has to say, his resp

Re: Too late for -T

2001-07-27 Thread Curtis Poe
n taint mode. The nice thing about this is that you *won't* have to remove the -T switch from the shebang line, thus ensuring that you won't forget to add it back in. Cheers, Curtis Poe = Senior Programmer Onsite! Technology (http://ww

  1   2   3   >