Pointers on security sought for CGI

2006-03-15 Thread Mary Anderson
Hi, I am writing my first Perl CGI program. I get logins through one CGI script. When the user has loggin I use a(href-myurl$login=myloginpasswor=mypassword to get to my input screen. Logins are checked by doing a trial connection to the database. I plan to run in taint mode. I will

Re: Pointers on security sought for CGI

2006-03-15 Thread Ovid
--- Mary Anderson [EMAIL PROTECTED] wrote: Are there things I should be doing, besides not running on Windows and IIS, to make my application more secure? I am careful to timestamp every row in every table in case some malicious nonsense is done and I have to clean up the mess. Hi Mary,

Re: Sending back an http 200 response

2006-03-15 Thread Denzil Kruse
--- Jay Savage [EMAIL PROTECTED] wrote: Maybe. But why not use the tools that are alreay out there? http://search.cpan.org/search?query=paypalmode=all. HTH, -- jay Thanks! I didn't realize they were there! Denzil __ Do You Yahoo!?

Re: Out of memory! - from CPAN

2006-03-15 Thread Mr. Shawn H. Corey
Jerry K wrote: Hello, I asked this question, and other than one response (thanks Owen!), things have been pretty silent on this issue. As I am a recent subscriber, maybe this is not the place to post this type of a request. Is there a better place that someone might aim me to resolve this

hash defining

2006-03-15 Thread Saurabh Singhvi
HI i was looking to make a hash inside hash. Something like %hash = { key = {key1 = value} }; is this the correct way to define it??? Also, is $hash{key-key1} this the way to call it ?? if not kindly tell me. thanks Saurabh

Re: hash defining

2006-03-15 Thread Ben Marsh
* Saurabh Singhvi ([EMAIL PROTECTED]) wrote: HI i was looking to make a hash inside hash. Something like %hash = { key = {key1 = value} }; is this the correct way to define it??? Also, is $hash{key-key1} this the way to call it ?? if not kindly tell me. thanks Saurabh Hello,

Re: Out of memory! - from CPAN

2006-03-15 Thread Jay Savage
On 3/14/06, Jerry K [EMAIL PROTECTED] wrote: Hello, I asked this question, and other than one response (thanks Owen!), things have been pretty silent on this issue. As I am a recent subscriber, maybe this is not the place to post this type of a request. Is there a better place that

Re: Sending back an http 200 response

2006-03-15 Thread Jay Savage
On 3/14/06, Denzil Kruse [EMAIL PROTECTED] wrote: Hi all, I'm try to interact with another server. It sends me a post (I think) and I catch it with my cgi script. But, it wants me to send back a 200 response with just OK in it. How do I do that? Do I have to use the HTTP.pm and set up a

RE: FW: suggestion for sftp process

2006-03-15 Thread Curt Shaffer
-Original Message- From: Chas Owens [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 11:48 AM To: Curt Shaffer Cc: beginners@perl.org Subject: Re: FW: suggestion for sftp process On 3/14/06, Curt Shaffer [EMAIL PROTECTED] wrote: I have a small update to this post. I found out

DBI/SQL question

2006-03-15 Thread Robert Hicks
I have a large array of numbers that I need to use in an update SQL statement using a like clause. my @nums = ( 123 456 789 ); foreach my $num (@nums) { $dbh-do(q{update table_name set item_desc1 = item_desc2 where equip like # I draw a blank here } I am not sure how to use the $num in

Re: hash defining

2006-03-15 Thread Mr. Shawn H. Corey
Ben Marsh wrote: %hash = ( key = {key1 = value} ); To define a hash use () brackets the second hash is inserting not a hash but a reference to a hash so you use {} brackets. You refer to 'value' it as $hash{key}-{key1}. $hash{key} is a scalar contains a reference pointing to a hash (so

Re: DBI/SQL question

2006-03-15 Thread Robert Hicks
Robert Hicks wrote: I have a large array of numbers that I need to use in an update SQL statement using a like clause. my @nums = ( 123 456 789 ); foreach my $num (@nums) { $dbh-do(q{update table_name set item_desc1 = item_desc2 where equip like # I draw a blank here } I am not sure

Perl fork or system

2006-03-15 Thread Sonika Sachdeva
Hi, I need to run perl sample.pl $filename from a perl program . The output is a zip file which needs to be processed further. Now the issues are: 1. this execution takes around 10-15 mins and i need to wait for it to complete bfore i start the next execution with a new filename. 2. get hold

Remote backup file

2006-03-15 Thread Mike Blezien
Hello We do a nightly backup on server 1, and we need to put a copy of it also on another server as a backup file. The file is normally about 30-35kb's in size each day. What would be the best way too do this, send a copy of the file from server 1 too server 2 would using the LWP module

Re: Remote backup file

2006-03-15 Thread JupiterHost.Net
Mike Blezien wrote: Hello Hello, We do a nightly backup on server 1, and we need to put a copy of it also on another server as a backup file. The file is normally about 30-35kb's in size each day. What would be the best way too do this, send a copy of the file from server 1 too server

Re: Remote backup file

2006-03-15 Thread Mike Blezien
Hi, - Original Message - From: JupiterHost.Net [EMAIL PROTECTED] To: beginners@perl.org Sent: Wednesday, March 15, 2006 12:49 PM Subject: Re: Remote backup file Mike Blezien wrote: Hello Hello, We do a nightly backup on server 1, and we need to put a copy of it also on another

Re: Perl fork or system

2006-03-15 Thread JupiterHost.Net
Sonika Sachdeva wrote: Hi, Hello, I need to run perl sample.pl $filename from a perl program . The output is a zip file which needs to be processed further. use Acme::Spork; my $spid = spork(sub { qx( 'perl sample.pl' . join('', @_) ); }, $filename) or die Could not fork for

Re: Perl fork or system

2006-03-15 Thread Tom Phoenix
On 3/15/06, Sonika Sachdeva [EMAIL PROTECTED] wrote: $retval = system(perl sample.pl $filename); I would need a while loop to poll the $? for the complete execution of the system command. No; system() waits for the command to complete before it continues. You could use fork-and-wait, but

RE: Remote backup file

2006-03-15 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Mike Blezien wrote: Hi, - Original Message - From: JupiterHost.Net [EMAIL PROTECTED] To: beginners@perl.org Sent: Wednesday, March 15, 2006 12:49 PM Subject: Re: Remote backup file Mike Blezien wrote: Hello Hello, We do a nightly backup on server 1, and we need to put

Re: Perl fork or system

2006-03-15 Thread Sonika Sachdeva
Hi, thanks for the response, thats right , system function will block till the command is complete foreach $filename (@FILES) { $retval = system(perl sample.pl $filename); if ($retval ==0 ) { print success with $filename, output shd be $expectedname.zip in the current working dir.;} } $retval

Re: Perl fork or system

2006-03-15 Thread Ad Ministrator
Sonika Sachdeva [EMAIL PROTECTED] wrote: Hi, thanks for the response, thats right , system function will block till the command is complete foreach $filename (@FILES) { $retval = system(perl sample.pl $filename); if ($retval ==0 ) { print success with $filename, output shd be $expectedname.zip

Re: hash defining

2006-03-15 Thread Saurabh Singhvi
Hi herez my data and i am having a problem #!/usr/bin/perl -w foreach $name (@ARGV) { $i=0; open(PDB,$name) ; while ($line = PDB) { if ($line =~ /ATOM/) { ($title, $num, $atom, $acid, $rest) = split(/\s+/, $line, 5); if ($atom eq CA) {

Re: Perl fork or system

2006-03-15 Thread Sonika Sachdeva
thank you all. On 3/15/06, Ad Ministrator [EMAIL PROTECTED] wrote: Sonika Sachdeva [EMAIL PROTECTED] wrote: Hi, thanks for the response, thats right , system function will block till the command is complete foreach $filename (@FILES) { $retval = system(perl sample.pl $filename); if

Re: hash defining

2006-03-15 Thread JupiterHost.Net
Saurabh Singhvi wrote: Hi Hello, herez my data and i am having a problem #!/usr/bin/perl -w use strict; that will tell you a lot probably. You might want to tableize your giant hash to make it easier to read (pronounced find obviouse mistakes) my %info = ( 'foo' = {

Re: Out of memory! - from CPAN

2006-03-15 Thread Jerry Kemp
Thank you again for the reply Owen Owen Cook wrote: On Tue, 14 Mar 2006, Jerry K wrote: Hello, I asked this question, and other than one response (thanks Owen!), things have been pretty silent on this issue. As I am a recent subscriber, maybe this is not the place to post this type of a

Re: Out of memory! - from CPAN

2006-03-15 Thread Jerry Kemp
Hello John, Thank you for the correction, Jerry John W. Krahn wrote: Owen Cook wrote: You could try comp.lang.misc.perl That should be comp.lang.perl.misc :-) John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Out of memory! - from CPAN

2006-03-15 Thread Jerry Kemp
Hello Shawn, Thank you for your reply. Mr. Shawn H. Corey wrote: I can do this also. An for modules with none to just a few dependencies, this is an acceptable work-around. For modules with deep dependencies, it takes a long time to get everything worked out. Hopefully, this explains why

Re: Out of memory! - from CPAN

2006-03-15 Thread Jerry Kemp
Hello Jay, Thank you for your reply. Jay Savage wrote: Jerry, As others have said: comp.lang.perl.misc. The lack of replies, though, stems, I assume, from no one else having encountered this. The general rule of thumb around here is don't answer unless you think you actually know what

Re: Remote backup file

2006-03-15 Thread JupiterHost.Net
Ok, so the Net::FTP would be run from server 2, log into server 1 and get the file, would that be the correct proceedure to do this? Pseudo code to illustrate a sane implementation: #!/usr/bin/perl use strict; use warnings; my @ftp_hosts = _get_ftp_hosts_array(); backup_localhost() or

svn library problem

2006-03-15 Thread Ged Murphy
Hi all. I'm trying to build a simple SVN app using the subversion supplied perl SVN bindings, which include all required libs in an SVN directory. However I'm receiving a strange error, can anyone help? *Test code: * use strict; use warnings; use Data::Dumper; use SVN::Client;

Re: Remote backup file

2006-03-15 Thread David Moreno Garza
Mike Blezien wrote: Hello We do a nightly backup on server 1, and we need to put a copy of it also on another server as a backup file. The file is normally about 30-35kb's in size each day. What would be the best way too do this, send a copy of the file from server 1 too server 2

Re: Remote backup file

2006-03-15 Thread Mike Blezien
David, - Original Message - From: David Moreno Garza [EMAIL PROTECTED] To: Mike Blezien [EMAIL PROTECTED] Cc: Perl List beginners@perl.org Sent: Wednesday, March 15, 2006 4:57 PM Subject: Re: Remote backup file Mike Blezien wrote: Hello We do a nightly backup on server 1, and we

RE: Out of memory! - from CPAN

2006-03-15 Thread Keenan, Greg John (Greg)** CTR **
Hi Jerry, The slice that I am building on has 53 Gb of disk space free. I haven't followed this thread closely so I apologise if any of this has already been suggested or is not relevant. Have you checked if any system tables (process, file, inode etc.) are full. You can also check your kernel

Splitting on white space

2006-03-15 Thread John Bruin
Hi everyone Can anyone please tell me why the code below is not splitting the 'two three'? If I use '\s*' instead of 's{1,}' it works but I would have thought the code below would have been more precise. my $string = 'one two threefour'; my @temp = split(/ \s{1,}/,$string); my

RE: Splitting on white space

2006-03-15 Thread Timothy Johnson
It isn't splitting on the 'two three' because it doesn't match. / \s{1,}/ matches a space followed by one or more whitespace characters (you have a space in front of your \s) -Original Message- From: John Bruin [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 15, 2006 5:37 PM To:

Re: Splitting on white space

2006-03-15 Thread Tom Phoenix
On 3/15/06, John Bruin [EMAIL PROTECTED] wrote: my $string = 'one two threefour'; my @temp = split(/ \s{1,}/,$string); Your pattern matches a space followed by one or more whitespace characters (such as tab, space, or newline). There's just a single space between two and three, and the

RE: Splitting on white space

2006-03-15 Thread John Bruin
Thanks very much - I has completely missed whitespace before the slash. John -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: 16 March 2006 14:41 To: John Bruin; beginners@perl.org Subject: RE: Splitting on white space It isn't splitting on the 'two

Re: Out of memory! - from CPAN

2006-03-15 Thread Tom Phoenix
On 3/15/06, Jerry Kemp [EMAIL PROTECTED] wrote: # perl -MCPAN -e shell cpan reload index Out of memory! Was your perl compiled to use your system's malloc(), or Perl's own? You can find out with a command like this one: perl -MConfig -lwe 'print $Config{usemymalloc}' Whichever you used,

RE: Line Swap

2006-03-15 Thread sharmila
Hi, Thanks for your help and the below suggested solution works only if we have 2 lines to swap. But I am trying out line swap for more than 2 lines. Could you please help me on how to do it? Input: $sc:(.+) cit(.+) $tic:(.+) Output: $sc:(.+) $tic:(.+) cit(.+) Note: Also the reverse