Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Stephen Liu
Hi folks, FedoraCore2 Kindly advise which package I have to install to generate "Algorithm/Diff.pm" I ran following script $ perl compare_s3_fifo.pl doc_a doc_b Printout; > Can't locate Algorithm/Diff.pm in @INC (@INC contains: /usr/lib/perl5/5.8.3/i386 -linux-thread-multi /u

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Gunnar Hjalmarsson
Stephen Liu wrote: Kindly advise which package I have to install to generate "Algorithm/Diff.pm" I ran following script $ perl compare_s3_fifo.pl doc_a doc_b Printout; Can't locate Algorithm/Diff.pm in @INC ... A wild guess: Algorithm::Diff ;-) Please study "perldoc perlmod". -- Gunnar Hjalmarsson

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Rene Borchers
Hi, Searching www.cpan.org http://search.cpan.org/search?query=Algorithm%2FDiff&mode=all On Thu, 2004-11-11 at 12:17, Stephen Liu wrote: > Hi folks, > > FedoraCore2 > > Kindly advise which package I have to install to > generate "Algorithm/Diff.pm" > > I ran following script > $ perl compar

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Rene Borchers
Hi, Searching www.cpan.org http://search.cpan.org/search?query=Algorithm%2FDiff&mode=all On Thu, 2004-11-11 at 12:17, Stephen Liu wrote: > Hi folks, > > FedoraCore2 > > Kindly advise which package I have to install to > generate "Algorithm/Diff.pm" > > I ran following script > $ perl compar

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Stephen Liu
Hi Rene, Tks for your URL. I also found this link but could not resolve how to create the module. B.R. Stephen --- Rene Borchers <[EMAIL PROTECTED]> wrote: > > Hi, > > Searching www.cpan.org > > http://search.cpan.org/search?query=Algorithm%2FDiff&mode=all > > > On Thu, 2004-11-11 at 12:

Re: Reg..Regular expression

2004-11-11 Thread Miguel Santinho (Simplicidade.com)
One idea ## #!/usr/bin/perl -w use strict; use Text::Balanced qw(extract_quotelike extract_multiple); use Data::Dumper; my @array = (); my @strings; foreach my $line (@array) { push @strings, extract_multiple($

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Chris Devers
On Thu, 11 Nov 2004, Stephen Liu wrote: > I also found this link but could not resolve how to > create the module. Lucky for you, the module has already been created by someone else. All you have to do is install it. sudo perl -MCPAN -e 'install Algorithm::Diff' Or something similar to that

Re: Reg..Regular expression

2004-11-11 Thread Miguel Santinho (Simplicidade.com)
Or a shorter version :-) ### #!/usr/bin/perl -w use strict; use Text::Balanced qw(extract_quotelike extract_multiple); use Data::Dumper; my @array = (); my @strings; push @strings,extract_multiple( $_,[sub { extract_quo

Re: Why doesn't this work?

2004-11-11 Thread Zeus Odin
"Aiguo Li" <[EMAIL PROTECTED]> wrote in message... > Hello, Hello. > I have the following dataset and want to calculate a P/A ratio for each > replicates in the dataset. In this case, treatment 1 has 4 replicats and > treatment2 has 3 replicates. The P/A = [((#of P)*2) + (# of M)]/# of > replicat

RE: installing perl

2004-11-11 Thread adisegna
Hey all, I have a question about the below script I am writing/copying. #!\\server\perl net use w: \\server\perl use Win32::Registry; my $Register = "Software\\INTEL\\LANDesk\\VirusProtect6\\CurrentVersion"; my $hkey,SubKey; #Why is this needed?? $HKEY_LOCAL_MACHINE->Open($Register,$hkey)|| die

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Stephen Liu
Hi Chris, Tks for your advice. --- Chris Devers <[EMAIL PROTECTED]> wrote: > All you have to do is install it. > > sudo perl -MCPAN -e 'install Algorithm::Diff' There was something strange happend here in runnning $sudo perl -MCPAN -e 'install Algorithm::Diff' Password: Sorry, try again.

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Rene Borchers
After installation, the module is ready to use. Try running your program. For the sudo command you have to modify the file /etc/sudoers, in this file stands which user is allowed to execute which command with root permission. therefore you you have to add yourself allowing to execute the perl -M

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Stephen Liu
Hi Rene, --- Rene Borchers <[EMAIL PROTECTED]> wrote: > After installation, the module is ready to use. Try > running your program. It worked now. Tks. > For the sudo command you have to modify the file > /etc/sudoers, in this > file stands which user is allowed to execute which > command wit

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Chris Devers
On Thu, 11 Nov 2004, Stephen Liu wrote: > Hi Chris, > > [Thanks] for your advice. > > --- Chris Devers <[EMAIL PROTECTED]> wrote: > > > All you have to do is install it. > > > > sudo perl -MCPAN -e 'install Algorithm::Diff' > > There was something strange happend here in runnning > > $s

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Chris Devers
On Thu, 11 Nov 2004, Stephen Liu wrote: > --- Rene Borchers <[EMAIL PROTECTED]> wrote: > > > For the sudo command you have to modify the file > > /etc/sudoers, in this > > file stands which user is allowed to execute which > > command with root > > permission. therefore you you have to add your

RE: Why doesn't this work?

2004-11-11 Thread Li, Aiguo (NIH/NCI)
Hi, Zeus. Thanks for your comment. "Replicates" line is the header line and there are two treatments in this case. Probe idTreat1 Treat1 Treat1 treat1 Treat2 treat2 treat2 AFFX-BioB-5_at P P P P P P P AFFX-BioB-M_at P P M P P

Using 'rename' on the command line

2004-11-11 Thread Ron Smith
I'm trying to rename some files from the command line but nothing gets changed. I think I'm leaving out something; maybe '$_'. Or, I have incorrect syntax. I don't get any error message either. I took a look at 'man rename', but it doesn't show an example of a loop. I'm using the following on th

parse an irregular xml file

2004-11-11 Thread tao wang
Hi all, I'm trying to parse an irregular xml file, and the file is like the following: 11-09 17:17:10.526 [LCL:1100038630] 11-09 17:17:13.230 [LCL:1100038633] 11-09 17:17:13.230 [LCL:1100038633] 11-09 17:17:13.230 [LCL:1100038633] For each line, there are timestamp on the begin and end, and

RE: Using 'rename' on the command line

2004-11-11 Thread Bob Showalter
Ron Smith wrote: > I'm trying to rename some files from the command line but nothing > gets changed. I think I'm leaving out something; maybe '$_'. Or, I > have incorrect syntax. I don't get any error message either. I took a > look at 'man rename', but it doesn't show an example of a loop. I'm > u

reg expression in an if test

2004-11-11 Thread Adamiec, Larry
I am testing a small piece of code before inserting it into a large program. I have one field where the user will insert a 9 character string. The first character must be an upper case 'L' while the remainder must be digits. Does Perl have any type of toupper function? I know I can use the modi

Re: reg expression in an if test

2004-11-11 Thread JupiterHost.Net
Does Perl have any type of toupper function? I know I can use the modifier 'i' in my search string to ignore case but I must insert an upper case 'L' into the database. perldoc -f ucfirst Is there a different way to check the last 8 characters and the length of the string than what I am doing? if(

Re: reg expression in an if test

2004-11-11 Thread mgoland
- Original Message - From: "Adamiec, Larry" <[EMAIL PROTECTED]> Date: Thursday, November 11, 2004 3:26 pm Subject: reg expression in an if test > I am testing a small piece of code before inserting it into a large > program. I have one field where the user will insert a 9 character > st

FW: reg expression in an if test

2004-11-11 Thread Adamiec, Larry
> > -Original Message- > > From: JupiterHost.Net [mailto:[EMAIL PROTECTED] > > Sent: Thursday, November 11, 2004 15:17 > > To: [EMAIL PROTECTED] > > Cc: Adamiec, Larry > > Subject: Re: reg expression in an if test > > > > > > > Does Perl have any type of toupper function? I know I can

regexp for ip address

2004-11-11 Thread Ing. Branislav Gerzo
Hi all, anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222, which is of course not good ip adress. I don't want use any module for this, I only want fing proper regular expression for IPs. I thought about

Re: reg expression in an if test

2004-11-11 Thread JupiterHost.Net
Does Perl have any type of toupper function? I know I can use the modifier 'i' in my search string to ignore case but I must insert an upper case 'L' into the database. perldoc -f ucfirst Is there a different way to check the last 8 characters and the length of the string than what I am doing? i

Re: regexp for ip address

2004-11-11 Thread Christopher Maujean
On Thu, 2004-11-11 at 15:29, Ing. Branislav Gerzo wrote: > Hi all, > > anyone knows how looks _good_ ip adress regexp ? I would skip re-inventing the wheel and use the Net::IP module. Example: use strict; use warnings; use Net::IP qw(ip_is_ipv4); # random but valid my $ip = "209.168.201.93";

Re: regexp for ip address

2004-11-11 Thread Christopher Maujean
On Thu, 2004-11-11 at 15:44, Christopher Maujean wrote: > On Thu, 2004-11-11 at 15:29, Ing. Branislav Gerzo wrote: > > Hi all, > > > > anyone knows how looks _good_ ip adress regexp ? > > I would skip re-inventing the wheel and use the Net::IP module. > > Example: didn't notice your requirement

Re: regexp for ip address

2004-11-11 Thread Gunnar Hjalmarsson
Ing. Branislav Gerzo wrote: anyone knows how looks _good_ ip adress regexp ? I use something like: (\d{1,3}\.){3}\d{1,3} but that also matches for example 888.777.444.222, which is of course not good ip adress. What's your definition of a "good" IP address? Do you care about correct DNS, do you ca

errors using DBI

2004-11-11 Thread Adam Saeed
i am getting some data from a text file. and importing that data to create some tables; my code is below: #! /usr/bin/perl -w #adding contact_list for each user use DBI; use strict; print "\n\n\n"; print "Running this Script will era

Re: Why doesn't this work?

2004-11-11 Thread Zeus Odin
"Aiguo Li" <[EMAIL PROTECTED]> wrote in message ... > Probe id Treat1 Treat2 > AffX-BioB-5_at (2p +M)/4 =2 (2*3+0)/3=2 > FFX-BioB-M_at (2*3+0)/4 =1.7 (2*3+0)/3=2 > AFFX-BioB-3_at (2*2+0)/4 =1 (2*2+0)/3=1.3 > AFFX-BioC-5_at (2*2+1)/4 =1.25 (2*1+1)/3=1 > AFFX-BioC-3_at (2*1+1)/4 = 0.75 (2*2+1)/3=1.

Re: regexp for ip address

2004-11-11 Thread Chasecreek Systemhouse
> > (\d{1,3}\.){3}\d{1,3} > sub goodIP { gethostbyaddr pack('C4', split /\./, shift), 2 } > print "Good IP address\n" if goodIP('11.22.33.44'); > You'd better define "good". I agree -- let's define it as a CIDR block: http://search.cpan.org/search?query=CIDR&mode=all =) -- WC -S

Re: regexp for ip address

2004-11-11 Thread Ing. Branislav Gerzo
Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 00:59 (+0100) contributed this to our collective wisdom: GH> What's your definition of a "good" IP address? Do you care about correct GH> DNS, do you care about whether the address is in use? I care about that, if its syntax is correct: 1-2

Re: regexp for ip address

2004-11-11 Thread Ajey Kulkarni
I would love to see the 'HUGE' regex being re-coded using rule based perl 6.0 on Parrot ;-)). The 6.0 regex engine looks like the one of YACC (grammar) based to me. Just a sidenote ~A On Fri, 12 Nov 2004, Ing. Branislav Gerzo wrote: > Gunnar Hjalmarsson [GH], on Friday, November 12, 2004 at 00

Re: Which package generates "Algorithm/Diff.pm"

2004-11-11 Thread Stephen Liu
Hi Chris, > #perl -MCPAN -e 'install Algorithm::Diff' What will be the option '-MCPAN' for, to connect MCPAN FTP site? > You can test that it's installed by running a > command like > > $ perl -MAlgorithm::Diff -e '1' I ran it, no complaint popup (no printout). I suppose '-MAlgorithm' is