Re: Measuring Substring with Hash

2005-04-08 Thread John W. Krahn
Edward Wijaya wrote: Hi John and David, Hello, Don't mean to nitpick. Just wondering if it's possible to modify Krahn's snippet to accomodate the overlapping cases? No, it won't work if they overlap. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional c

Re: Measuring Substring with Hash

2005-04-08 Thread Edward Wijaya
Hi John and David, Thanks so much for your reply. I forgot to mentioned another variances of scoring apart from this two ...... .. GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21 GATTACGGCGCTCG AACGGCA CASE B: .... #Score 4 GATTACGAGTGGCGCTCGTGTAACGGCA

Re: Measuring Substring with Hash

2005-04-08 Thread John W. Krahn
Wagner, David --- Senior Programmer Analyst --- WGO wrote: John W. Krahn wrote: Wagner, David --- Senior Programmer Analyst --- WGO wrote: Since you are not using the offset, and you have the same value GG twice and index starts over from the first, you are counting the same GG twice. If you re

Re: Match filename and attach

2005-04-08 Thread Chris Charley
I think a hash is what I need to be doing but I'm not sure how to load the keys and the values. I'm sure I want the keys to be the files in the .html directory and the values to be the item numbers in all the .txt files. This way I can create the hash to function as a table lookup.. Right? Cou

RE: Match filename and attach

2005-04-08 Thread Brian Volk
> > Hi All, > > > > I have a directory full of .html documents ( 2000 ) named: > > > > 12345.html > > 1.html > > 77548.html > > 45451.html > > 12132.html > > and so on > > > > I have another directory of files w/ item numbers that > match the .html > > documents. : > > > > file

Fw: trying to create my first exe with pp

2005-04-08 Thread Matthew Ryan
I just wrote: >I am trying to use pp to create an exe file. I have installed PAR with ppm and >installed ScanDeps.pm from cpan with nmake, all tests worked and install went >fine. Now when running pp with the following code I get the following error. >Can some one please tell me what is happen

trying to create my first exe with pp

2005-04-08 Thread Matthew Ryan
I am trying to use pp to create an exe file. I have installed PAR with ppm and installed ScanDeps.pm from cpan with nmake, all tests worked and install went fine. Now when running pp with the following code I get the following error. Can some one please tell me what is happening here. C:\>pp -o

RE: Measuring Substring with Hash

2005-04-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
John W. Krahn wrote: > Wagner, David --- Senior Programmer Analyst --- WGO wrote: >> John W. Krahn wrote: >> >>> John W. Krahn wrote: >>> It looks like this will do what you want: >> >> John, >> Since you are not using the offset, and you have the same value >> GG twice and index starts

Re: Measuring Substring with Hash

2005-04-08 Thread John W. Krahn
Wagner, David --- Senior Programmer Analyst --- WGO wrote: John W. Krahn wrote: John W. Krahn wrote: It looks like this will do what you want: John, Since you are not using the offset, and you have the same value GG twice and index starts over from the first, you are counting the same GG twice.

RE: Measuring Substring with Hash

2005-04-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
John W. Krahn wrote: > John W. Krahn wrote: >> >> It looks like this will do what you want: John, Since you are not using the offset, and you have the same value GG twice and index starts over from the first, you are counting the same GG twice. If you remove the last GG

Re: Measuring Substring with Hash

2005-04-08 Thread John W. Krahn
John W. Krahn wrote: It looks like this will do what you want: sub score { my ( $str, $array ) = @_; my $total_score = 0; for my $frag ( @$array ) { my $len = length $frag; my $idx = index $str, $frag; if ( $idx >= 0 and substr $str, $idx, $len, '' ) { $total_score += $len;

Re: Simple MySQL Example?

2005-04-08 Thread Lawrence Statton
> I was looking at the example code in the mysql examples directory. They seem > to have been created for testing things like very large records. > > Does anyone have a minimal example that executes a SQL SELECT command and > displays the results? > > I need something really simple to get me star

Re: Newbie Regular expression question

2005-04-08 Thread John W. Krahn
N. Ganesh Babu wrote: Hi John, Hello, I am new to understanding and how to use modules in perl programs. I have downloaded and installed the Modules you specified. The documentation in that I can not able to understand. Can you please help with a sample code. I'm sorry, I haven't used that modul

Re: Measuring Substring with Hash

2005-04-08 Thread John W. Krahn
Edward Wijaya wrote: Hi, Hello, I have following code that measure the substring. It basically the number of positions of substrings that occur (dotted count) CASE A: ...... .. GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21 GATTACGGCGCTCG AACGGCA CASE B: ...

Simple MySQL Example?

2005-04-08 Thread Siegfried Heintze
I was looking at the example code in the mysql examples directory. They seem to have been created for testing things like very large records. Does anyone have a minimal example that executes a SQL SELECT command and displays the results? I need something really simple to get me started. It's not

Re: glean distro version from /etc/*release

2005-04-08 Thread Chris Devers
On Fri, 8 Apr 2005, Stephen Day wrote: > On Friday 08 April 2005 5:11 pm, Chris Devers wrote: > >     [EMAIL PROTECTED] ~]$ uname -a > >     Linux debian 2.4.26-smp-p4 #1 SMP Thu Apr 29 17:20:05 EDT 2004 i686 > > unknown [EMAIL PROTECTED] ~]$ > > uname -a does not return the distribution. The sec

Re: glean distro version from /etc/*release

2005-04-08 Thread Stephen Day
On Friday 08 April 2005 5:11 pm, Chris Devers wrote: >     [EMAIL PROTECTED] ~]$ uname -a >     Linux debian 2.4.26-smp-p4 #1 SMP Thu Apr 29 17:20:05 EDT 2004 i686 > unknown [EMAIL PROTECTED] ~]$ uname -a does not return the distribution. The second field is the hostname, which in your case seems

RE: Measuring Substring with Hash

2005-04-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Edward Wijaya wrote: > Hi, > > I have following code that measure the substring. > It basically the number of positions of substrings > that occur (dotted count) > > CASE A: > ...... .. > GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21 > GATTACGGCGCTCG AACGGCA > > > CASE B: >

Measuring Substring with Hash

2005-04-08 Thread Edward Wijaya
Hi, I have following code that measure the substring. It basically the number of positions of substrings that occur (dotted count) CASE A: ...... .. GATTACGAGTGGCGCTCGTGTAACGGCA#Score 21 GATTACGGCGCTCG AACGGCA CASE B: .... #Score 4 GATTACGAGTGG

Re: glean distro version from /etc/*release

2005-04-08 Thread Chris Devers
On Fri, 8 Apr 2005, D. J. Birkett wrote: > I'm writing a script that will be run from a mount point on many > different linux distros. I'm just about to code a sub that will try > and determine the distro (version isn't that important) from the > /etc/*release file, and just wondered if anyone

Re: sub declarations

2005-04-08 Thread Xavier Noria
On Apr 7, 2005, at 14:47, Manish Sapariya wrote: Hi List, Can anybody tell me difference among all of the following sub declaration. 1. sub abc {} 2. sub xyz() {} # Please not round brackets, When I had this definition, I got following error. The former is a regular subroutine, whereas the latter

IO::Socket Disconection Detection

2005-04-08 Thread Leip !
Imediatly after I execute the script I get one of the "disconected" messages that are printed when $sock->connected() no longer equals $server. "connected If the socket is in a connected state the the peer address is returned. If the socket is not in a connected state then undef will be retur

Migration of perl code based on Sybase::CTlib module from perl 5.8.0 to 5.004

2005-04-08 Thread Kunal Uskaikar
Hi , I have written a module "DbSession" which uses CTlib. I did my testing using perl 5.8.0 and it worked fine. I now realise that I have to get my module working with perl 5.004 and sybperl version 2.13_A1_561. I am using Sypase OCS 12.5.1(64 - bit). But when I try to run my code I get the f

glean distro version from /etc/*release

2005-04-08 Thread D. J. Birkett
I'm writing a script that will be run from a mount point on many different linux distros. I'm just about to code a sub that will try and determine the distro (version isn't that important) from the /etc/*release file, and just wondered if anyone has already done this, or if there is some handy

Re: How can I take subarray without second array (drop other elements)?

2005-04-08 Thread John Doe
Am Donnerstag, 7. April 2005 16.33 schrieb Vladimir D Belousov: > John Doe wrote: > >Am Donnerstag, 7. April 2005 14.54 schrieb Vladimir D Belousov: [...] > >>I do this: > >>$#array = $N+100; > >>print_array($array[$N]); > > > >this should be > > > > print $array->[$N] > > I see, but $array here

RE: Match filename and attach

2005-04-08 Thread Brian Volk
> Hi All, > > I have a directory full of .html documents ( 2000 ) named: > > 12345.html > 1.html > 77548.html > 45451.html > 12132.html > and so on > > I have another directory of files w/ item numbers that match the .html > documents. : > > file_1.txtfile_2.txtfi

sub declarations

2005-04-08 Thread Manish Sapariya
Hi List, Can anybody tell me difference among all of the following sub declaration. 1. sub abc {} 2. sub xyz() {} # Please not round brackets, When I had this definition, I got following error. - Too many arguments for main::smtp at ./gencap.pl line 201, near "$temp_capfile)

Re: Net::SSH::Perl bind socket problem

2005-04-08 Thread gui
John Doe wrote: Am Dienstag, 5. April 2005 15.20 schrieb gui: [snip] Net::SSH: Can't bind socket to port 1023: Adresse déjà utilisée at ./test_ssh.pl line 50 There's also a mailing list dedicated to Net::SSH::Perl (from man page): "SUPPORT For samples/tutorials, take a look at the scripts i

Re: Newbie Regular expression question

2005-04-08 Thread N. Ganesh Babu
Hi John, I am new to understanding and how to use modules in perl programs. I have downloaded and installed the Modules you specified. The documentation in that I can not able to understand. Can you please help with a sample code. Thanks in advance. Regards, Ganesh John W. Krahn wrote: N. Ganes

Re: Win32::IE::Mechanize load question

2005-04-08 Thread Ing. Branislav Gerzo
Ing. Branislav Gerzo [IBG], on Friday, April 8, 2005 at 12:47 (+0200) typed the following: another problem I have. It seems to me a bug in Win32::IE::Link, resp. Win32::IE::Mechanize I'd like to use link method: $ie->find_link( [%options] ), but I can't use "find_link(url_abs_regex => qr/regexp/i

Win32::IE::Mechanize load question

2005-04-08 Thread Ing. Branislav Gerzo
Hi all, I am playing with this module (I need it, it is good), but I have one quiestion about loading complete page: my code snippet: use strict; use warnings; use Win32::IE::Mechanize; my $ie = Win32::IE::Mechanize->new( visible => 1, left => 0,

Re: Newbie Regular expression question

2005-04-08 Thread John W. Krahn
N. Ganesh Babu wrote: Thank you very much for you help. One more small help. fourth string B. van Sures to be tagged as B.van Sures fifth string van Sures, B., to be tagged as van SuresB. sixth string Bockris, O. M. J., to be tagged as BockrisO. M.J. All 6 should be converted in a single rege

file m-/a-/ctime comparison fails

2005-04-08 Thread lars
Hi all, My complete script should check /home/root/.ssh/authorized_keys, look for patterns, cut them out, copy the product to directories created if certain entries are in /etc/passwd and write a log. Every run of the script creates a new entry /var/tmp/scriptname/scriptname.numbers.numbers.log The

nested replace string

2005-04-08 Thread N. Ganesh Babu
Dear All, I am converting citations present in books to xml coding using regular expressions. Anybody can suggest best resources on this topic. Here I am having one small problem. Please help. "D.Turnbull in Solid State Physics: Advances in Research and Application, edited by F.Seitzand D.Tur