Re: checking if its a real number

2003-03-04 Thread Janek Schleicher
On Wed, 26 Feb 2003 16:30:56 -0800, T. Murlidharan Nair wrote: > Is there a quick and easy way to check this. I was trying using a reg exp > if(/^[-0-9][\.0-9]*/) { > do something > } In CPAN there's also a module Regexp::Common that has a lot of commonly requested regexps. E.g. also $RE{num}{re

Re: checking if its a real number

2003-03-04 Thread Janek Schleicher
On Wed, 26 Feb 2003 19:47:35 -0500, Casey West wrote: > Here's a nice trick. Use the int() function. It's documented in > perlfunc, a short to the documentation is 'perldoc -f int'. > > When passed a string, int() will return 0. When passed a number, it > will return the integer version of tha

Re: CGI.pm strange results

2003-03-04 Thread zentara
On Mon, 3 Mar 2003 16:07:26 -0500, [EMAIL PROTECTED] (Todd Wade) wrote: > >"Zentara" <[EMAIL PROTECTED]> wrote in message >> >> You might want to try assigning a variable name to param("quantity") >> first, before you set up the table. I don't know why, but sometimes >> the scripts don't like it a

Re: CGI.pm strange results

2003-03-04 Thread Todd W
"Zentara" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Mon, 3 Mar 2003 16:07:26 -0500, [EMAIL PROTECTED] (Todd Wade) wrote: > > > > >"Zentara" <[EMAIL PROTECTED]> wrote in message > >> > >> You might want to try assigning a variable name to param("quantity") > >> first, before

How to access CGI

2003-03-04 Thread mel awaisi
Hi How do i access the files in my CGI-BIN, when my web site data is stored in /htdocs (a different directory). /home/httpd/htdocs/index.htmlweb site files /home/httpd/cgi-bin/ cgi files Cheers _ It's fast,

using CGI.pm for catalog

2003-03-04 Thread David Gilden
Hello, I am having a problem understanding why I can't get the data from the form page to CGI script. Here is the page in question: In the HTML some descriptive text goes here. ORDER QUANTITY In the PERL #!/u

Re: CGI.pm strange results

2003-03-04 Thread fliptop
On Tue, 4 Mar 2003 at 08:12, Todd W opined: TW:my( $string ) = "you ordered $q->param('quantity') foobars\n"; TW: TW:The quoting mechanism knows nothing about evaluating expressions. That's TW:what concatenation is for: TW: TW:my( $string ) = "you ordered " . $q->param('quantity') . " foobars\n";

data structures

2003-03-04 Thread David Gilden
I am trying to build a data structure, and am tripping up here. any suggestions? Thx! Dave !/usr/bin/perl -w snip... @bags = param('handbag'); get all of the bags styles @bag_quantity = param('quantity'); get all of the bags quantity foreach my $bag (@bags){ ($bag_name,$imgName) = s

RE: data structures

2003-03-04 Thread Hanson, Rob
> any suggestions? I'll try. > @bags = param('handbag'); get all of the bags styles Missing comment... @bags = param('handbag'); # get all of the bags styles > push %bags_ordered,$bag_name; You can't push onto a hash, only an array. So either %bags_ordered need to be an array, or you mean s

RE: data structures / CGI.pm

2003-03-04 Thread David Gilden
Good afternon, I am not seeing consistent results from my script below. It seems that sometimes it works and other times I get '0's in the quantity field. As I don't write PERL often enough this is probably poorly written code! Thanks for any help. Dave HTML at:

cgi.pm printing 1, not print statement

2003-03-04 Thread Hughes, Andrew
I have a basic script using cgi.pm that is supposed to take one form filed and pass it to a subroutine where I will validate the input. However, when it gets passed, all that prints to the browser is a 1. Can anyone offer any suggestions before I pull the rest of my hair out? Here is the script:

Re: How to access CGI

2003-03-04 Thread Octavian Rasnita
You can access your CGI files using: http://www.yoursite.com/cgi-bin/script.pl The cgi-bin directory has an alias named "cgi-bin/" so it will work even if you think this is strange. If it doesn't work, take a look in your httpd.conf file and there you will see the right alias for the scripts dir

Help really needed in this script: error: Prematue end of script header

2003-03-04 Thread mel awaisi
Hi, I have with the help of one of the guys of this list got this script to take an image from one directory and then rename it with the time and date of the image and then store it onto a new directory. I sotred the image in the cgi-bin, and then tried to run the file, i got errors, when i we

Re: Help really needed in this script: error: Prematue end of script header

2003-03-04 Thread Wiggins d'Anconia
mel awaisi wrote: Hi, I have with the help of one of the guys of this list got this script to take an image from one directory and then rename it with the time and date of the image and then store it onto a new directory. I sotred the image in the cgi-bin, and then tried to run the file, i got