RE: Rounding a number

2002-09-12 Thread Mike Craig
Hi, Unless I have missed exactly what you need, this should work take the int of Snum + 1 Mike Craig www.UltraTextPro.biz -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 12, 2002 4:42 PM To: 'Octavian Rasnita'; [EMAIL PROTECTED] Subject: R

Re: Sending and Reading cookies

2002-09-12 Thread Wiggins d'Anconia
Is the line being displayed? In that case you are likely printing the cookie after the header has already been printed, which is not allowed (or at least not standard, though I think some browsers may accept them). More specific information is going to be needed, and posting a larger portion

Re: ending a script

2002-09-12 Thread Wiggins d'Anconia
The other options might work better. But another solution would be to pass a hidden value from the form to the script, which would prevent people from just hitting the URL directly, though this like the other methods is easily spoofed as well, considering "hidden" values aren't really all tha

Re: uninitialized values

2002-09-12 Thread david
T wrote: > Hello:) > > in my script my values come from my html form. I define them with: > > my $OptOut = $q->param( "OptOut" ); if OptOut isn't passed it, you get under. the following should get rid of the warning: my $OptOut = $q->param('OptOut') || ''; > > BUT, when i try to get them t

Sending and Reading cookies

2002-09-12 Thread Jerry Lawson
I'm having trouble sending a cookie. The book I have says to send a cookie the code 'print "Set-Cookie:name=value\n";' will work. When I implement this code in my script, the cookie is not being set. Can someone tell me what I am doing wrong? Thanks, Jerry Lawson -- To unsubscribe, e-mail:

RE: ending a script

2002-09-12 Thread Bob Showalter
> -Original Message- > From: t [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 3:04 PM > To: [EMAIL PROTECTED] > Subject: ending a script > > > I have now got my script to work off of my html form (thanks > for all the suggestions, turns out if > i take out the eq out of

RE: ending a script

2002-09-12 Thread Scot Robnett
If you are on a UNIX system, often you can run the script suid, so that it is running as an authenticated user rather than "nobody" or "httpd". In most cases, it's a simple matter of: Step 1: chmod 4711 Step 2: Change the shebang line to #!/usr/bin/perl -U However, this will only work if the w

ending a script

2002-09-12 Thread t
I have now got my script to work off of my html form (thanks for all the suggestions, turns out if i take out the eq out of the if/then statements, it works), but i have found a rather bizarre problem. run against the html form it works fine, BUT, if i just try to run the cgi script, it just ke

RE: Rounding a number

2002-09-12 Thread Kipp, James
woops that won't work :-( does perl have a ceil function? > -Original Message- > From: Kipp, James [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 11:58 AM > To: 'Octavian Rasnita'; [EMAIL PROTECTED] > Subject: RE: Rounding a number > > > do you mean ro round up to the n

Re: Rounding a number

2002-09-12 Thread William McKee
Yet another example of how to do rounding; this time using sprintf (I think I grabbed this from a TechRepublic Perl Tip email) ROUNDING NUMBERS USING SPRINTF Perl doesn't have a function specifically for rounding numbers to a specified number of decimal places. However, you can use

RE: Rounding a number

2002-09-12 Thread Kipp, James
do you mean ro round up to the next num, if so: $num = 1.2; $roundup = int($num) +1; > -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 4:54 AM > To: [EMAIL PROTECTED] > Subject: Rounding a number > > > Hi all, > > I would like

RE: Rounding a number

2002-09-12 Thread Bob Showalter
> -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 4:54 AM > To: [EMAIL PROTECTED] > Subject: Rounding a number > > > Hi all, > > I would like to round a number but to the next integer not > like the int > function does. > > I

Re: Rounding a number

2002-09-12 Thread Robin Cragg
How about: my $nu = 1.543 $num =~ s/\..*$//; $num++; it's not exactly pretty, but it does work... R At 11:53 12/09/2002 +0300, Octavian Rasnita wrote: >Hi all, > >I would like to round a number but to the next integer not like the int >function does. > >I've tried: > >my $num = 1.33; >$num

Re: Rounding a number

2002-09-12 Thread Christopher G Tantalo
Octavian Rasnita wrote: > Hi all, > > I would like to round a number but to the next integer not like the int > function does. > > I've tried: > > my $num = 1.33; > $num = $num + 0.49; > $num = sprintf "%.0f", $num; > > This works but I am wondering if there is a cleaner and better solution >

Rounding a number

2002-09-12 Thread Octavian Rasnita
Hi all, I would like to round a number but to the next integer not like the int function does. I've tried: my $num = 1.33; $num = $num + 0.49; $num = sprintf "%.0f", $num; This works but I am wondering if there is a cleaner and better solution because there is a small chance not to work fo

Weekly list FAQ posting

2002-09-12 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: :SMTP / HTML

2002-09-12 Thread Scot Robnett
#!/usr/bin/perl -w # Link for Sven: # http://search.cpan.org/author/ERYQ/MIME-Lite-2.117/lib/MIME/Lite.pm # Send HTML document with inline images # MIME::Lite a purely perly sorta thing, so # if it's not installed in @INC we can put # it there without problems BEGIN { unshift(@INC,"/path