perl module to prevent auto registration scripts

2003-11-10 Thread Ramprasad A Padmanabhan
Hello all, I am writing a web based registration module. I want to prevent people writing automated scripts ( like using lwp ) and auto register Something like what yahoo does , put a number in a jpg image and ask the user to fill in the number , which ( I think ?) a program can not do Any

text modify

2003-11-10 Thread kof
Hi, I have some data column based data I want to modify a bit. 0065 663 517 046 0 1485 0065 663 517 046 3 1500 0065 663 517 046 5 1882 0120 620 515 919 0 1485 0120 620 515 919 6 1816 0120 620 515 919 8 2136 I would like to add a counter to column 5 to fill out the gaps in between e.g. 0 an

Re: Perl interface

2003-11-10 Thread Remo Sanges
- Original Message - From: "yomna el-tawil" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 09, 2003 6:14 PM Subject: Perl interface >..If anyone heard about BioPerl, is > it more efficient to use it instead of PERL to make > pattern matching for the geneti

Re: text modify

2003-11-10 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > I have some data column based data I want to modify a bit. > > 0065 663 517 046 0 1485 > 0065 663 517 046 3 1500 > 0065 663 517 046 5 1882 > 0120 620 515 919 0 1485 > 0120 620 515 919 6 1816 > 0120 620 515 919 8 2136 > > I would like to add a counter to column 5

Re: Module Object and sub module function

2003-11-10 Thread Rob Dixon
R. Joseph Newton wrote: > > Dan Muey wrote: > > > > > > > Basically I use the ParentName's $obj inside my functions > > and they are expecting it as the first arg. > > > > $obj->MyModule::function($arg); would be the coolest way > > (leaving my functions as sub function instead of sub > > NameSpace

Re: How best to grab SQL table names?

2003-11-10 Thread Rob Dixon
Dan Anderson wrote: > > I've got a script that goes through SQL files and returns an array of > table names. To find table names I use: > > while ($_ = ) { > if ($_ =~ m/CREATE.*TABLE/) { > $_ = $'; > while (not ($_ =~ m/)//)) { # match last parenthesis >$_ .= ; > } > my

Re: Is it Possible: Caching Perl Compilations

2003-11-10 Thread Rob Dixon
Dan Anderson wrote: > > Is it possible to cache Perl compilations on a web server so that it > runs faster? Hi Dan. It depends why you're compiling at run time. Something like my $sub = eval 'sub { 9 + 9 }'; print $sub->(), "\n"; will stay compiled as long as you have $sub as a reference.

Re: perl module to prevent auto registration scripts

2003-11-10 Thread drieux
On Sunday, Nov 9, 2003, at 23:25 US/Pacific, Ramprasad A Padmanabhan wrote: [..] I am writing a web based registration module. I want to prevent people writing automated scripts ( like using lwp ) and auto register [..] The recent discussion about how Google has attempted to control access to

RE: perl module to prevent auto registration scripts

2003-11-10 Thread Paul Kraus
Can't you add one of those image words that you have to type in. Also why do this. A website provides content. Its not any of the providers business how I view it or what I do with it afterwards. Paul -Original Message- From: drieux [mailto:[EMAIL PROTECTED] Sent: Monday, November 10, 2

Re: How best to grab SQL table names?

2003-11-10 Thread drieux
On Sunday, Nov 9, 2003, at 16:32 US/Pacific, Dan Anderson wrote: [..] while ($_ = ) { if ($_ =~ m/CREATE.*TABLE/) { $_ = $'; while (not ($_ =~ m/)//)) { # match last parenthesis $_ .= ; } my $table_name = $`; $table_name = tr/ \t\n\r//d; return $table_name; } } M

Died on open command

2003-11-10 Thread Ganesh Shankar
Hello all, I'm starting to learn perl to convert files between different bioinformatics programs. I'm aware of bioperl but want to learn some basic perl before using those modules. 1) The script is in the same directory as the input folder, so open should be able to find it. 2) The open input

Re: perl module to prevent auto registration scripts

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 08:59 US/Pacific, Paul Kraus wrote: [..] Also why do this. A website provides content. Its not any of the providers business how I view it or what I do with it afterwards. I am not the person to answer the 'why' for doing silly things, there is probably someone in the 'l

Re: Died on open command

2003-11-10 Thread John W. Krahn
Ganesh Shankar wrote: > > Hello all, Hello, > I'm starting to learn perl to convert files between different > bioinformatics programs. I'm aware of bioperl but want to learn some > basic perl before using those modules. > > 1) The script is in the same directory as the input folder, so open >

Re: Died on open command

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 09:30 US/Pacific, John W. Krahn wrote: Ganesh Shankar wrote: [..] 4) I'm developing on a Windows machine, so I think setting file permissions are unnecessary, right? This problem is described is explained in the documentation for the readdir function. perldoc -f readdir

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
> I agree with your basic solution, but since he will > be doing his development in Windows, shouldn't that > be 'file system neutral'? hence not using the unix > separator "/" between the directory component and the filename > component? In a move to simplify porting of scripts (and save the san

Re: Died on open command

2003-11-10 Thread John W. Krahn
Guay jean-Sébastien wrote: > > > I agree with your basic solution, but since he will > > be doing his development in Windows, shouldn't that > > be 'file system neutral'? hence not using the unix > > separator "/" between the directory component and the filename > > component? > > In a move to si

Adding a printer remotely

2003-11-10 Thread Ned Cunningham
Hello, Does anyone know how to add a printer in Perl remotely on a NT 4 system? I have been googling for a while and found some info about WSH and cscript, but it doesn't work on NT. (or I haven't figured it out yet). Please advise any possibilities that you might have. Ned Cunningham POS Sys

Re: Died on open command

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 10:17 US/Pacific, Guay Jean-Sébastien wrote: [..] I agree with your basic solution, but since he will be doing his development in Windows, shouldn't that be 'file system neutral'? hence not using the unix separator "/" between the directory component and the filename com

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
> It has nothing to do with what ActiveState did or didn't do. The > DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the > path separator however the operating system itself is able to use '/' as > the path separator. Sorry, I just tried it on my machine here (NT4), and doing c

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
> It has nothing to do with what ActiveState did or didn't do. The > DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the > path separator however the operating system itself is able to use '/' as > the path separator. Err, just noticed I shouldn't have read so quick... Still,

Re: Died on open command

2003-11-10 Thread James Edward Gray II
On Nov 10, 2003, at 12:39 PM, Guay Jean-Sébastien wrote: It has nothing to do with what ActiveState did or didn't do. The DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the path separator however the operating system itself is able to use '/' as the path separator. Sorry, I ju

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
> Which version of Perl from ActiveState did this show up in? Well, seems ActiveState didn't really have to do anything after all, according to John W. Krahn. As far as I remember, it's always been like that in ActiveState Perl. But as I said, I still find it great that they didn't do anything to

Re: Died on open command

2003-11-10 Thread Chuck Fox
[EMAIL PROTECTED] wrote: It has nothing to do with what ActiveState did or didn't do. The DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the path separator however the operating system itself is able to use '/' as the path separator. Sorry, I just tried it on my machine he

RE: Died on open command

2003-11-10 Thread Guay Jean-Sébastien
> That's exactly what John said. ;) I realized that 5 seconds after I sent the mail... <:-( -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Died on open command

2003-11-10 Thread LoBue, Mark
> -Original Message- > From: Guay Jean-Sébastien > [mailto:[EMAIL PROTECTED] > Sent: Monday, November 10, 2003 10:43 AM > To: 'John W. Krahn'; 'Perl-Beginners' > Subject: RE: Died on open command > > > > It has nothing to do with what ActiveState did or didn't do. The > > DOS/Windows com

Re: Died on open command

2003-11-10 Thread Wiggins d Anconia
> > On Monday, Nov 10, 2003, at 10:17 US/Pacific, Guay Jean-Sébastien wrote: > [..] > >> I agree with your basic solution, but since he will > >> be doing his development in Windows, shouldn't that > >> be 'file system neutral'? hence not using the unix > >> separator "/" between the directory c

RE: Adding a printer remotely

2003-11-10 Thread Paul Kraus
I Don't understand what you mean... Are you asking how to attach to a printer that is on your network? Is the printer have its own ip address ? Or is it shared on a windows machine on that network. \\111.111.111.111 to attach to the ip assigned printer \\machine\sharename(akaprintername) to attac

RE: Adding a printer remotely

2003-11-10 Thread Ned Cunningham
Ok, I have 500 remote locations. They consist of 2 networked nt 4 sp6 workstations. Remotely, that is by sending a CD or by a polling program, I need to add a printer. Both WK2 and XP has this functionality, however NT does not, (or at least I havent found it). I found a reference to using th

RE: Adding a printer remotely

2003-11-10 Thread LoBue, Mark
> -Original Message- > From: Ned Cunningham [mailto:[EMAIL PROTECTED] > Sent: Monday, November 10, 2003 12:07 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Adding a printer remotely > > > Ok, > > I have 500 remote locations. They consist of 2 networked nt > 4 sp6 worksta

Re: Died on open command

2003-11-10 Thread John W. Krahn
Guay jean-Sébastien wrote: > > > Which version of Perl from ActiveState did this show up in? > > Well, seems ActiveState didn't really have to do anything after all, > according to John W. Krahn. As far as I remember, it's always been like that > in ActiveState Perl. IIRC the ability to use / in

Peculiar problem using LWP::UserAgent

2003-11-10 Thread Rajesh Dorairajan
I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not yet implemented error when I connect to a web-server using the User-Agent. This happens when I pass in the Hostname and Portnumber as parameters in my function. However, if I hard-code the Server-name and port number it seems t

Playing with Numbers

2003-11-10 Thread SilverFox
Hi all, i'm trying to figure out how to test if a number is five digits and if not add zero/s in front to make it 5 digits. Any ideas? Examples: 444 = 00444 4120 = 04120 23 = 00023 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Playing with Numbers

2003-11-10 Thread LoBue, Mark
> -Original Message- > From: SilverFox [mailto:[EMAIL PROTECTED] > Sent: Monday, November 10, 2003 1:14 PM > To: [EMAIL PROTECTED] > Subject: Playing with Numbers > > > Hi all, i'm trying to figure out how to test if a number is > five digits and > if not add zero/s in front to make it

RE: Playing with Numbers

2003-11-10 Thread Guay Jean-Sébastien
my $integer = 432; my $string = sprintf("%05d", $integer); Yay! J-S -Message d'origine- De: SilverFox [mailto:[EMAIL PROTECTED] Date: 10 novembre, 2003 16:14 À: [EMAIL PROTECTED] Objet: Playing with Numbers Hi all, i'm trying to figure out how to test if a number is five digits and if

Representing a Database as XML

2003-11-10 Thread Dan Anderson
Does anyone know of a good module to use to represent a database (or SQL statements) as XML? I'm trying to throw together something that will work with different databases. I want to create a "translator" that will change from the XML to database specific SQL. Thanks in advance, Dan -- To un

More died on open command (from 55103)

2003-11-10 Thread Ganesh Shankar
Hello all, I tried modifying the open command ar suggested and got the enclosed errors. Also, I'm working with Activestate Activeperl 5.6 on a Windows 2000. Also, from the syntax of the readdir example, the test is to the left of the readdir command. Does this mean I should place my file proces

Re: Died on open command

2003-11-10 Thread R. Joseph Newton
drieux wrote: > john, > > I agree with your basic solution, but since he will > be doing his development in Windows, shouldn't that > be 'file system neutral'? hence not using the unix > separator "/" between the directory component and the filename > component? Nope. Not at all. System transpa

Re: Died on open command

2003-11-10 Thread R. Joseph Newton
Guay Jean-Sébastien wrote: > > It has nothing to do with what ActiveState did or didn't do. The > > DOS/Windows command interpreter (command.com/cmd.exe) uses '\' as the > > path separator however the operating system itself is able to use '/' as > > the path separator. > > Sorry, I just tried it

Re: Died on open command

2003-11-10 Thread R. Joseph Newton
Chuck Fox wrote: > Just tried on my WindowsXP box. I had to enclose the path in double > quotes. But once I did that, Windows did the right thing, > > dir "\temp" > dir "/temp" > > both give me the temp directory listing. Using single quotes or > backticks does not work. > > Chuck I'll be darn

Re: Died on open command

2003-11-10 Thread James Edward Gray II
On Nov 10, 2003, at 4:19 PM, R. Joseph Newton wrote: Nope. Not at all. System transparency means not having to concern yourself with the system or its quirks, which is what Perl provides in re file access. Not because the '/' separator is 'nix, but because it is more standard for file systems

Re: Module Object and sub module function

2003-11-10 Thread R. Joseph Newton
Rob Dixon wrote: > R. Joseph Newton wrote: > > > > Dan Muey wrote: > > > > > > > > > > > Basically I use the ParentName's $obj inside my functions > > > and they are expecting it as the first arg. > > > > > > $obj->MyModule::function($arg); would be the coolest way > > > (leaving my functions as s

Re: Died on open command

2003-11-10 Thread R. Joseph Newton
James Edward Gray II wrote: > On Nov 10, 2003, at 4:19 PM, R. Joseph Newton wrote: > > > Nope. Not at all. System transparency means not having to concern > > yourself with the system or its quirks, which is what Perl provides in > > re > > file access. Not because the '/' separator is 'nix, bu

Re: Died on open command

2003-11-10 Thread James Edward Gray II
On Nov 10, 2003, at 4:47 PM, R. Joseph Newton wrote: Look down the thread, and you will find correction from others, also. I can tell you that I have generated tousands of files in folders reached by relative paths, and all I have had to offer Perl was '/'s. It has been working for some time, a

Re: Peculiar problem using LWP::UserAgent

2003-11-10 Thread david
Rajesh Dorairajan wrote: > I ran into peculiar problem using LWP::UserAgent. I receive a 501 - Not > yet implemented error when I connect to a web-server using the User-Agent. > This happens when I pass in the Hostname and Portnumber as parameters in > my function. However, if I hard-code the Serv

Re: Died on open command

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 11:03 US/Pacific, Wiggins d Anconia wrote: [..] This is where I very quickly run across the stage yelling "File::Spec->catfile" and then just as abruptly as I entered, exit stage left... Wiggins we were having a Lovely Ideological Struggle between the Forces of Whom

Re: More died on open command (from 55103)

2003-11-10 Thread John W. Krahn
Ganesh Shankar wrote: > > Hello all, Hello, > I tried modifying the open command ar suggested and got the enclosed > errors. Also, I'm working with Activestate Activeperl 5.6 on a Windows > 2000. Also, from the syntax of the readdir example, the test is to the > left of the readdir command. D

Re: Peculiar problem using LWP::UserAgent

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 13:16 US/Pacific, Rajesh Dorairajan wrote: [..] my ( $Host, $Port ) = @_; my $url = "$Host:$Port"; #Does not work #my $url = "http://servername:80";#This works require LWP::UserAgent; my $ua = LWP::UserAgent->new(env_proxy => 0,

Re: More died on open command (from 55103)

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 13:54 US/Pacific, Ganesh Shankar wrote: [..] since you chdir INTO the $folder you need to merely fix the foreach loop: foreach my $seqfilename (@files){ $seqfilename = ''; comment out the #$seqfilename =''; otherwise the next line: open (TXTFILE

Re: Playing with Numbers

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 13:13 US/Pacific, SilverFox wrote: Hi all, i'm trying to figure out how to test if a number is five digits and if not add zero/s in front to make it 5 digits. Any ideas? Examples: 444 = 00444 4120 = 04120 23 = 00023 there are two parts to your question, the la

The File::Spec approach was Re: Died on open command

2003-11-10 Thread drieux
On Monday, Nov 10, 2003, at 14:54 US/Pacific, James Edward Gray II wrote: On Nov 10, 2003, at 4:47 PM, R. Joseph Newton wrote: Look down the thread, and you will find correction from others, also. I can tell you that I have generated tousands of files in folders reached by relative paths, and

Re: More died on open command (from 55103)

2003-11-10 Thread Tim
At 01:54 PM 11/10/03 -0800, you wrote: I tried modifying the open command ar suggested and got the enclosed errors. Also, I'm working with Activestate Activeperl 5.6 on a Windows 2000. Also, from the syntax of the readdir example, the test is to the left of the readdir command. Does this mean I

Re: Died on open command

2003-11-10 Thread R. Joseph Newton
James Edward Gray II wrote: > On Nov 10, 2003, at 4:47 PM, R. Joseph Newton wrote: > > > Look down the thread, and you will find correction from others, also. > > I can > > tell you that I have generated tousands of files in folders reached by > > relative paths, and all I have had to offer Perl w

Re: perl module to prevent auto registration scripts

2003-11-10 Thread Ramprasad A Padmanabhan
Drieux wrote: On Monday, Nov 10, 2003, at 08:59 US/Pacific, Paul Kraus wrote: [..] Also why do this. A website provides content. Its not any of the providers business how I view it or what I do with it afterwards. I am not the person to answer the 'why' for doing silly things, there is probably s

Re: how to optimize a string search

2003-11-10 Thread R. Joseph Newton
Ramprasad A Padmanabhan wrote: > I know this is more of an algorithm question but please bear with me. > > In my program I am checking wether a emailid exists in a list > I have in the complete_list a string like > $complete_string="<[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> ...