RE: Please remove

2001-06-21 Thread Ask Bjoern Hansen
On Wed, 20 Jun 2001 [EMAIL PROTECTED] wrote: > I also have tried removal but I get this great little insulting remark that > could only have been produced by a 'secret loyal order of Unix programmers' > bit bombardier! > > Hi. This is the qmail-send program at onion.perl.org. > I'm afraid I wasn'

Can't access CGI object in required file?

2001-06-21 Thread Kevin Hancock
Hi Guys I was hoping this would be a problem because I am struggling with the whole scope thing in Perl but here goes. A section of my code. require "$LIBRARY_DIR/castime_html.pm"; use CGI; # load CGI routines use strict 'vars'; my $q = new CGI; #

Is LWP common?

2001-06-21 Thread Martijn van Exel
Dear subscribers, I am having trouble using LWP::Simple with my hosting provider. They do not seem to have LWP.pm installed (in the right location). Is it not a very common module to have installed? Could I theoretically install it myself (in my home dir) and use it from there? Is there a vi

Pooling of objects and session data

2001-06-21 Thread Rajeev Rumale
Hi, I need to know if there is any easiest way to keep session data or object accross the scripts. Basically I would like to pool Database connections so that Parrallel running scripts don't open multiple connection with the database. with regards Rajeev Rumale - Original Message - Fro

Re: Please remove

2001-06-21 Thread Dave Young
D.J.B. is quite the character.. ;) > I also have tried removal but I get this great little insulting remark that > could only have been produced by a 'secret loyal order of Unix programmers' > bit bombardier! > > Hi. This is the qmail-send program at onion.perl.org. > I'm afraid I wasn't able t

Re: Telnet

2001-06-21 Thread Dave Young
ummm, if you set the display variable correctly and have an Xserver running on the PC, sure you can. Why anyone would want to is beyond me.. use xterm for shell access and run any gui utils you like by hand. Running a window manager over the network isn't really a pleasant experience... $.02 U

LWP and Windows

2001-06-21 Thread Deb Thompson
I already posted this message on the general beginners forum, but I'm looking for more ideas. Apologies to those who subscribe to both lists. I have developed a Perl script that checks takes an incoming URL, uses the LWP head() command to check to make sure that the webpage exists, and then writ

Re: Extra ?

2001-06-21 Thread David Labatte
Thank you Randal, for explaining that. I've never really understood exactly how that worked before (3 years of perl programming too!). While playing with test cases I came up with the following code snippet that I figured I'd post as a thank you for your excellent explanation. #!/usr/bin/perl $

"header() method" Problem

2001-06-21 Thread scott lutz
Here is what the man page says for CGI.pm: print $q->header(-Refresh=>'10; URL=http://www.capricorn.com'); but what if you want to use some sort of dynamic value for the URL? I am having issues with the ( ' ) >single quotes< not letting me send any variable values in, ( I am looking to use $q->r

Re: Extra ?

2001-06-21 Thread Brett W. McCoy
On Thu, 21 Jun 2001, Peter Cline wrote: > >which works just fine. > > I am using perl 5.005.01 :-( and when doing > print my $x = q(a b c d) it prints the whole list Cuz q(a b c d) is the same as 'a b c d'. It's a literal string and there is no interpolation. -- Brett

List vs. arrays, (was Re: extra

2001-06-21 Thread Peter Cline
I wrote: I am using perl 5.005.01 :-( and when doing print my $x = q(a b c d) it prints the whole list how does that work?! But I see that q is used to quote literals and not word lists and hence my q(a b c d) must simply produce a string literal and not a list, hence it is of course con

Re: Extra ?

2001-06-21 Thread Brett W. McCoy
On 21 Jun 2001, Randal L. Schwartz wrote: > Brett> It's still scalar to scalar assignment. The list isn't getting assigned > Brett> to anything -- there's no list context so there is no list assignment. > > And there's actually no list being formed. It's a scalar > "comma-expression" on the rig

Re: Extra ?

2001-06-21 Thread Peter Cline
At 02:04 PM 6/21/01 -0700, you wrote: >Hence, Template Toolkit broke in 5.5 because Perrin had done: > >my $value = qw(xyz); > >to parallel his > >my @values = qw(abc def ghi); > >above and below. For which us 5.5'ers only got 1, not xyz. :) >I've since beaten him over the head enough times to ju

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Curtis" == Curtis Poe <[EMAIL PROTECTED]> writes: Curtis> --- Peter Cline <[EMAIL PROTECTED]> wrote: >> Interestingly, saying >> >> print my $number_of_elems = qw(a b c d); >> outputs 4 and not d. Curtis> Did you test that? It's easy to misread a 4 as d if you're in a hurry. Here's my

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Peter" == Peter Cline <[EMAIL PROTECTED]> writes: Peter> Interestingly, saying Peter> print my $number_of_elems = qw(a b c d); Peter> outputs 4 and not d. Peter> does qw turn the list into an array? No. qw(a b c d) prior to 5.6 is defined as split ' ', q(a b c d); split in a scalar con

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Brett" == Brett W McCoy <[EMAIL PROTECTED]> writes: Brett> On Thu, 21 Jun 2001, Timothy Kimball wrote: >> Randal L. Schwartz wrote: >> : ... >> : Second might mean something like: >> : >> : $foo_length = SOME_LIST # although this can't happen >> : = list >> :

Re: Extra ?

2001-06-21 Thread Curtis Poe
--- Peter Cline <[EMAIL PROTECTED]> wrote: > Interestingly, saying > > print my $number_of_elems = qw(a b c d); > outputs 4 and not d. Did you test that? It's easy to misread a 4 as d if you're in a hurry. Here's my result: ___ C:\>perl -e "print m

Re: Extra ?

2001-06-21 Thread Peter Cline
>Actually, you're dealing with a well-documented, but poorly understood >feature. Try this: > >my $number_of_pets = ('dog','cat','iguana'); >print $number_of_pets; > >my @pets = ('dog','cat','iguana'); >$number_of_pets = @pets; >print $number_of_pets; > >$number_of_pets = ('dog','cat',@pets); >

Re: Extra ?

2001-06-21 Thread Brett W. McCoy
On Thu, 21 Jun 2001, Timothy Kimball wrote: > Randal L. Schwartz wrote: > : ... > : Second might mean something like: > : > : $foo_length = SOME_LIST # although this can't happen > : = list > : = assigned to > : === scalar > : > : Se

Re: Extra ?

2001-06-21 Thread Timothy Kimball
Mel Matsuoka wrote: : >Randal L. Schwartz wrote: : >: ... : >: Second might mean something like: : >: : >: $foo_length = SOME_LIST # although this can't happen : >: = list : >: = assigned to : >: === scalar : >: : >: See the differ

Re: Extra ?

2001-06-21 Thread Curtis Poe
--- Timothy Kimball <[EMAIL PROTECTED]> wrote: > > Randal L. Schwartz wrote: > : ... > : Second might mean something like: > : > : $foo_length = SOME_LIST # although this can't happen > : = list > : = assigned to > : === scalar > :

Re: Extra ?

2001-06-21 Thread Mel Matsuoka
At 04:21 PM 06/21/2001 -0400, Timothy Kimball wrote: > >Randal L. Schwartz wrote: >: ... >: Second might mean something like: >: >: $foo_length = SOME_LIST # although this can't happen >: = list >: = assigned to >: === scalar >: >:

Re: Extra ?

2001-06-21 Thread Timothy Kimball
Randal L. Schwartz wrote: : ... : Second might mean something like: : : $foo_length = SOME_LIST # although this can't happen : = list : = assigned to : === scalar : : See the difference? And the latter can't happen. Sure it can.

RE: Extra ?

2001-06-21 Thread Tillema, Glenn
> Tillema,> That's how it was phrased in the camel; "List > Tillema,> assignment in scalar context > Tillema,> returns the number of elements produced by the > Tillema,> expression on the _right_ side > Tillema,> of the assignment..." Your explanation certainly > Tillema,> goes into much more

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Tillema," == Tillema, Glenn <[EMAIL PROTECTED]> writes: >> There's never a "list assigned to $foo_count in a scalar context"... >> the phrase doesn't even make sense to me. :) You can't assign a list >> to $foo_count. It can never happen. Never. A list cannot exist in a >> scalar contex

RE: Extra ?

2001-06-21 Thread Moon, John
Curtis, Thank you for the suggestion ... This is for "beginners" and I have a lot to learn ! ... I'll use the OO format - just got lazy ... never used "strict" before because it was s strict but some guy named Curtis (and others) kept saying to use it so Thanks for letting me know abo

RE: Extra ?

2001-06-21 Thread Tillema, Glenn
> >> my $foo_count = () = param('foo'); > > Tillema,> Let me guess ... param('foo') is assigned to a list > Tillema,>... the list is assigned > Tillema,> to $foo_count in a scalar context so the number of > Tillema,> elements are returned. > > Tillema,> Right? > > Probably simpler than that.

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Tillema," == Tillema, Glenn <[EMAIL PROTECTED]> writes: >> my $foo_count = () = param('foo'); Tillema,> Let me guess ... param('foo') is assigned to a list ... the list is assigned Tillema,> to $foo_count in a scalar context so the number of elements are returned. Tillema,> Right? Proba

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: > > my $foo_count = () = param('foo'); > > Less typing, less work for the machine.

RE: Extra ?

2001-06-21 Thread Tillema, Glenn
> > "Curtis" == Curtis Poe <[EMAIL PROTECTED]> writes: > > Curtis> my $foo_count = scalar @{[param('foo')]}; > > That's nice, but I prefer: > > my $foo_count = () = param('foo'); > > Less typing, less work for the machine. Less noise. More magic, > though. Oops, arguable on

Re: Extra ?

2001-06-21 Thread Randal L. Schwartz
> "Curtis" == Curtis Poe <[EMAIL PROTECTED]> writes: Curtis> my $foo_count = scalar @{[param('foo')]}; That's nice, but I prefer: my $foo_count = () = param('foo'); Less typing, less work for the machine. Less noise. More magic, though. Oops, arguable on that. :) -- Randa

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 than I do, but are you aware that > > the above snippet will only return the firs

Weekly list FAQ posting

2001-06-21 Thread casey
NAME beginners-faq - FAQ for the beginners-cgi mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email addr

RE: Extra ?

2001-06-21 Thread Curtis Poe
--- "Moon, John" <[EMAIL PROTECTED]> wrote: > Yes, ... it's gone ... > > Thanks ... > > Interestingly, doesn't appear on subsequent calls to endform ... > > so I'm a little concerned I don't understand what CGI (or I) am doing ... > it would seem like it should always give the same results ..

RE: Extra ?

2001-06-21 Thread William McKee
On 21 Jun 2001, at 9:50, Curtis Poe wrote: > > foreach ($q->param) { > > $REQUEST{"$_"}=$q->param("$_"); > > } > > I assume that you know your form better than I do, but are you aware that > the above snippet will only return the first value for a param if that > param has several values? For

Re: php -> perl

2001-06-21 Thread William McKee
On 15 Jun 2001, at 10:25, Curtis Poe wrote: > > To do it manually, use the following and set $mime_type to whatever value > > you want (see W3C website for complete list): > > print "Content-type: $mime_type\n"; > > With all due respect, your print statement is why I recommend to people > that t

Re: mail extensions

2001-06-21 Thread Curtis Poe
--- Cheryl Kirkpatrick <[EMAIL PROTECTED]> wrote: > I have some simple Perl scripts that I use for several forms that have > been working correctly for several months. This week we got a new > firewall and now my forms do not work. > The user submitting the form does not see any error and believes

RE: Extra ?

2001-06-21 Thread Curtis Poe
Hi John, There are a variety of issues with this, so I'll take it from the top, but starting with the issue with you are concerned. I hope you don't take any of this personally, as it's just intended to be helpful: >print $q->endform; This does indeed print the hidden field that you are conc

RE: Extra ?

2001-06-21 Thread Moon, John
Yes, ... it's gone ... Thanks ... Interestingly, doesn't appear on subsequent calls to endform ... so I'm a little concerned I don't understand what CGI (or I) am doing ... it would seem like it should always give the same results ... -Original Message- From: Kurt Edmiston [mailto:[E

mail extensions

2001-06-21 Thread Cheryl Kirkpatrick
I have some simple Perl scripts that I use for several forms that have been working correctly for several months. This week we got a new firewall and now my forms do not work. The user submitting the form does not see any error and believes we have received the information inputted by the form. I

RE: Extra ?

2001-06-21 Thread Kurt Edmiston
> >print $q->endform, "\n"; # offending code maybe ? <== <== ># ># form for input of estimates, sends confirmation/results of submit ># to "toolbar" ... ># I'm not sure if this is what you want, but couldn't you just replace the above line of code with print ""; That will at leas

Re: How to learn Perl??

2001-06-21 Thread Dennis Waller
Twinkles, etal I'm another newbie jumping in. I went to the referenced URL: http://www.perl.com/pub/language/info/software.html I didn't see anything about MSI, I jumped to the Win32 section. That tries to send you to ActiveStates ActivePerl, which when I tried it woul

RE: Extra ?

2001-06-21 Thread Moon, John
Here the code (is this what you wanted ?) but from Mel's reply looks like the problem could be the "endform" use strict; use CGI qw(:standard :all *table); use vars qw($dbh $REQUEST) ;# global ! use DBI; use Cwd; my $CGI_HOME=cwd();# get $home # use lib "/opt/common/html/actual/cgi-

RE: Extra ?

2001-06-21 Thread Mel Matsuoka
At 11:23 AM 06/21/2001 -0400, Moon, John wrote: >Yes, I assumed it is trying to help me ... > >But don't want it's (CGI's) help ... in this case > >From the CGI.pm release notes (http://stein.cshl.org/WWW/software/CGI/): "Version 2.26 Changed behavior of scrolling_list(), checkbox() and checkb

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 Moon, John
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 -Original Message- From:

Re: Extra ?

2001-06-21 Thread Kurt Edmiston
At 10:45 AM 6/21/2001 -0400, you wrote: >I keep seeing these "extra" hidden fields in my source ... > >Does anyone know where/what/why they are being generated ? > > I believe that these are printed when you use the end_form (or endform?) subroutine, which is part of the CGI.pm module. -Kurt

Re: Extra ?

2001-06-21 Thread Mel Matsuoka
At 04:53 AM 06/21/2001, Mel Matsuoka wrote: >> Check for a line something like >"print hidden(-name='.cgifields')" oops, i meant "print hidden(-name=>'.cgifields.')" what the hell am i doing awake at 4:30 in the morning? :P __ mel matsu

Re: Extra ?

2001-06-21 Thread Mel Matsuoka
At 10:45 AM 06/21/2001 -0400, Moon, John wrote: >I keep seeing these "extra" hidden fields in my source ... > >Does anyone know where/what/why they are being generated ? > > > If youre using the CGI.pm module, theres most likely a subroutine or other part of your code that is explicitly printi

Extra ?

2001-06-21 Thread Moon, John
I keep seeing these "extra" hidden fields in my source ... Does anyone know where/what/why they are being generated ? John W Moon

Re: Re: Running CGI's locally

2001-06-21 Thread Mel Matsuoka
At 12:10 PM 06/20/2001 +0200, Aaron Craig wrote: >At the office, I'm running Apache 1.3 locally on Win2000, and I don't have >to use the shebang line, as I have Perl in my path. However, I just >installed Apache on my Win2000 machine at home, using the current Apache >installation for Windows

Re: Slightly OT: Kenneth Copeland and regexps?

2001-06-21 Thread Mel Matsuoka
At 12:18 PM 06/20/2001 +0200, Aaron Craig wrote: >How about this: > >print qq{ >Mature adults are allowed to read and write whatever the hell they want >to. Apart from the important idea that slang enriches and broadens our >language, no one has the right to censor our speech, especially in >

Re: need code

2001-06-21 Thread Alen Sarkinovic
I only had problems with executing script from web. It's for sure that I will blok any char ,accept numbers letters and underline. My problem was ,that I coudn't force script to accept variable input and execute command (from web). now everything works fine,it was mestake in command syntax. Than

Re: How to learn Perl??

2001-06-21 Thread twinkles
Go to the following URL to get a copy of Perl for your computer. Choose the Windows version with the "MSI" link! MSI stands for Microsoft Installer (which you already have if you have WinME). This package comes with ALL the documentation that you need to get started in C:\Perl\html\index.html. ht

System Control

2001-06-21 Thread Thanh To
Hi All, Does anyone know why Perl did not get back the system control after called the Java's Applet? I'm using the system command: system ("java HelloJava"); And the problem is: Perl did not execute any of the following lines after that. I'd like to know why. Thanks in advance! Thanh

Re: use of modules with authorize.net

2001-06-21 Thread fliptop
Susanne wrote: > > does anyone have sample code that would educate me on credit card > processing with authorize.net? tia. try this module from cpan: http://search.cpan.org/search?dist=Business-OnlinePayment-AuthorizeNet

Re: Slightly OT: Kenneth Copeland and regexps?

2001-06-21 Thread Aaron Craig
At 12:31 19.06.2001 +, Mel Matsuoka wrote: > >Delivered-To: [EMAIL PROTECTED] > >From: [EMAIL PROTECTED] > >To: [EMAIL PROTECTED] > >Subject: Rejected Message > >Date: Tue, 19 Jun 2001 20:46:45 + > > > >Content-Type: text/plain; > > > >The attached mail message has been rejected for the fo

Re: Re: Running CGI's locally

2001-06-21 Thread Aaron Craig
At 09:12 19.06.2001 -0700, Curtis Poe wrote: >If you are running Apache on a Windows box, then yes, you will need the >shebang line. Here's a >quick intro in setting up Apache on >Windows: http://www.perlmonks.org/index.pl?node_id=44536 >(umm... you did say Windows, right?). This brings up a