Re: A better way for ugly code?

2001-08-09 Thread Teresa Raymond
Curtis, What part of the code that you posted actually does the untainting? >--- Mark Ross <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I'm curious how I can condense this code. I'm pulling > > my values from a Web submitted form (using CGI), and I > > need to untaint them. > > > > But, each f

which one to choose WxPerl or perlTk

2001-08-09 Thread Dinakar Desai
Hello: I was wondering which one to learn in terms of GUI. I am not very familiar with any GUI application development. I am just exploring the possibilities of GUI tool kits. I would like to know your experience in terms of stability, maturity and usability of WXPerl and PerlTk GUI tool kits. I

Re: A better way for ugly code?

2001-08-09 Thread Curtis Poe
--- Mark Ross <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm curious how I can condense this code. I'm pulling > my values from a Web submitted form (using CGI), and I > need to untaint them. > > But, each form field has different requirement for > what characters it can match (account number shou

Re: A better way for ugly code?

2001-08-09 Thread Maxim Berlin
Hello Mark, Thursday, August 09, 2001, Mark Ross <[EMAIL PROTECTED]> wrote: MR> I'm curious how I can condense this code. I'm pulling MR> my values from a Web submitted form (using CGI), and I MR> need to untaint them. MR> But, each form field has different requirement for MR> what characters i

A better way for ugly code?

2001-08-09 Thread Mark Ross
Hi all, I'm curious how I can condense this code. I'm pulling my values from a Web submitted form (using CGI), and I need to untaint them. But, each form field has different requirement for what characters it can match (account number should only be numbers, etc). I was wondering if there's a b

Weekly list FAQ posting

2001-08-09 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

WG: sending commands to a remote server using telnet.pm

2001-08-09 Thread Sage, Christian
Oops, it should of course have read ... chomp($line); ($buffer, $name, $description) = $line =~ /(\S+)\s+(\S+)\s+(.*)/; ... That's what's bound to happen when you translate on the fly ... Cheers, Chris

Re: Round function

2001-08-09 Thread Ken Brakey
"Brett W. McCoy" wrote: > > On Thu, 9 Aug 2001, Adam Carson wrote: > > > How is it not correctly rounding? It seems that it would consistently work >(positive numbers only, of course, and that fix was already discussed). Is there >another instance where it would not work? > > Never mind.

Re: Round function

2001-08-09 Thread Brett W. McCoy
On Thu, 9 Aug 2001, Adam Carson wrote: > How is it not correctly rounding? It seems that it would consistently work >(positive numbers only, of course, and that fix was already discussed). Is there >another instance where it would not work? Never mind. I was looking at the wrong numbers. A

Re: Fw: very funny

2001-08-09 Thread Ken Brakey
Roger C Haslock wrote: > > [ Please reply to the group, or else the thread loses its cohesion. RCH] SORRY, but, a lot of people [me included] have the habit of just hitting the 'reply' instead of 'reply all'.:-( Ken > > I trust you are aware of http://www.perl.com/pub/q/FAQs. If these are >

AW: sending commands to a remote server using telnet.pm

2001-08-09 Thread Sage, Christian
Cybear, haven't done a lot of work with Net::Telnet, but in my experience your version #1 should run fine. It did for me, I just looked it up in a couple of old scripts. If you want to process the screen printout of the command, though, you will need to capture it. For example one of the thing

Re: Round function

2001-08-09 Thread Ken Brakey
"Brett W. McCoy" wrote: > > On Thu, 9 Aug 2001, Ken Brakey wrote: > > > > That's BASIC, this is Perl. Perl's int truncates towards 0 (as the FAQ > > > mentioned), so adding .5 isn't going to do anything. > > > > > > $ perl -e '$num = 12.3; print int($num + .5);' > > > 12 > > > > Try it with "

Re: Round function

2001-08-09 Thread Adam Carson
How is it not correctly rounding? It seems that it would consistently work (positive numbers only, of course, and that fix was already discussed). Is there another instance where it would not work? Adam Carson MIS Department

Re: Round function

2001-08-09 Thread Brett W. McCoy
On Thu, 9 Aug 2001, Ken Brakey wrote: > > That's BASIC, this is Perl. Perl's int truncates towards 0 (as the FAQ > > mentioned), so adding .5 isn't going to do anything. > > > > $ perl -e '$num = 12.3; print int($num + .5);' > > 12 > > Try it with "12.6" :-) Right, but it's still not correctly

RE: search and return a value from a table

2001-08-09 Thread Camilo Gonzalez
Hmmm, didn't we cover overly general questions recently? Are you new to this group, Cynhsieh? Have you read any Perl books or taken any Perl classes? I apoligize if I sound a bit harsh. I'm no Perl expert by any means. I applaud you for choosing Perl for this task. You must realise however, that

RE: Perl Editors

2001-08-09 Thread Al Hospers
> Try OptiPerl www.xarka.com Actually that is what I use. I was responding to someone else about PB. I liked PB 'cause it is more of a real Windows app. But the price on Opti is good & it works quite well. Al Hospers CamberSoft, Inc. alcambersoftcom http://www.cambersoft.com A famous linguist o

RE: Perl Editors

2001-08-09 Thread Brett W. McCoy
On Thu, 9 Aug 2001, Joel Hughes wrote: > which perl editors/IDEs on unix/linux does the group use? emacs/xemacs, occasionally vi -- Brett http://www.chapelperilous.net/btfwk/ The sum of t

Re: Round function

2001-08-09 Thread darren chamberlain
Fernando <[EMAIL PROTECTED]> said something to this effect on 08/08/2001: > If there in perl any function that round a number for example: > > 13.96 to 14.00 or 14 > > I don't want to use any module, just a simple function. Thanks for the help > I alwys receive. The easiest way is to add 0.5, a

Re: Round function

2001-08-09 Thread Ken Brakey
"Brett W. McCoy" wrote: > > On Thu, 9 Aug 2001, Ken Brakey wrote: > > > Try int(number+.5), it will round up anything more than > > '.5' to the next integer --OR-- truncate less than '.5' > > Learned that twenty years ago, in BASIC. :-) > > That's BASIC, this is Perl. Perl's int truncates to

Re: Round function

2001-08-09 Thread Brett W. McCoy
On Thu, 9 Aug 2001, Ken Brakey wrote: > Try int(number+.5), it will round up anything more than > '.5' to the next integer --OR-- truncate less than '.5' > Learned that twenty years ago, in BASIC. :-) That's BASIC, this is Perl. Perl's int truncates towards 0 (as the FAQ mentioned), so adding .

Any VB org like this

2001-08-09 Thread sithra
Hai all, I find this perl.org very useful... Thanks to all. can anyone give infomation abt org like [EMAIL PROTECTED] for VB or win32API or API programming in VB Thanks in Advance Sithra.

sending commands to a remote server using telnet.pm

2001-08-09 Thread Fields, Aubrey
List, I have a cgi on my site that collects a users name and password from a form then uses telnet.pm to login to a remote server and run a command. I need to pass a parameter to this command but cannot figure out how. This is what I have working... #!/usr/bin/perl -w use CGI qw(:sta

RE: Cookies and Security

2001-08-09 Thread Fields, Aubrey
Joel is right. A "known plaintext" attack is very effective... and sending a sample of you encryption to anyone is risky. Also, just for information sake, you can recover passwords from digest form... sort of. Ever heard of "Crack" or "John the Ripper"? If you enforce strong passwords then it

holding executing in a loop?

2001-08-09 Thread peter grotz
hi list, I wrote a cgi with a form that should be filled an the result then should be display after the user´s input is worked up. But between the "second" run (display the results of the user´s input) the cgi should stop and wait until a specific directory on the server is filled up with some fil

Fw: very funny

2001-08-09 Thread Roger C Haslock
[ Please reply to the group, or else the thread loses its cohesion. RCH] I trust you are aware of http://www.perl.com/pub/q/FAQs. If these are incomprehensible to newbies, please post to this group, and say what you don't understand. If the FAQs are no good, they need revision. - Roger - -

Re: search and return a value from a table

2001-08-09 Thread Roger C Haslock
What sort of database engine are you using? If this has an SQL interface, you would write something like select age from tablename where name='zzz'; ... and you would post the query to an SQL group. See recent 'very funny' discussion: this is not a perl query. - Roger - - Original Message