Re: Newbie: Perl reg. expression - Correction

2004-05-17 Thread Durai
Hi, It works fine after I change the following line: my @parts = parts(/\s+/); to my @parts = split(/\s+/); Thanks for your help. Thanks, Durai. - Original Message - From: "LRMK" <[EMAIL PROTECTED]> To: "Durai" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 18, 2004

Re: Newbie: Perl reg. expression

2004-05-17 Thread Durai
Hi, It gives the output: (0.0.0.0) 12.34.56.78:80 204.62.129.132 I need Only IP address. I need like: 204.62.129.132 127.0.0.1 Not like 12.34.56.78:80,(0.0.0.0),..etc. Thanks, Durai. - Original Message - From: "LRMK" <[EMAIL PROTECTED]> To: "Durai" <[EMAIL PROTECTED]> Cc: <[EMAIL PR

Re: Newbie: Perl reg. expression

2004-05-17 Thread Durai
It gives the output: - Original Message - From: "LRMK" <[EMAIL PROTECTED]> To: "Durai" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, May 18, 2004 11:37 AM Subject: Re: Newbie: Perl reg. expression > this should work > > open FILE, "test.txt" or die "Can't open file!: $!"; >

Query

2004-05-17 Thread Sudhindra Bhat
Hi Thanks. But there is a small issue. Considering the same example, the piece of code sent by you prints 123456 which is not on the same line as "Test:" But it doesn't print the characters 123456 ABCDEF which is on the same line as "Test:" Regards, Sudhindra -Original Message- From: Jo

Re: Newbie: Perl reg. expression - Correction

2004-05-17 Thread LRMK
My previous mail has a small problem this one should fix it open FILE, "test.txt" or die "Can't open file!: $!"; while( ) { my @parts = parts(/\s+/); foreach (@parts){ if (/^(\d+\.\d+\.\d+\.\d+)$/){ print "$1\n"; } } }

coding sampling techniques in perl

2004-05-17 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi All, I am trying to code Latin Hypercube Sampling and Sobol Sampling Sequences in Perl as a part of a tool we are developing here. I would like to know is there any references (standard codes developed) in Perl for the same? Any help in this regard is welcome. Thanks Regards Guru

Re: Newbie: Perl reg. expression

2004-05-17 Thread LRMK
this should work open FILE, "test.txt" or die "Can't open file!: $!"; while( ) { my @parts = split(/\s+/); foreach (@parts){ print if /(\d+\.\d+\.\d+\.\d)/; } } close FILE; Rakhitha Karunarathne Web Master www.Ad-Ma

Image editing/Creating modules

2004-05-17 Thread perl
can someone give a name of any image (JPG or GIF) editing / creating module, which allow to create images to display on web pages on the fly by CGI scripts. Rakhitha M. Karunarathne Trainee Software Developer, IFS - R & D International, 501,Galle Road ,Cololmbo-6, SRI LANKA. Tel +94 (011)-2-364-

Newbie: Perl reg. expression

2004-05-17 Thread Durai
Hello All, open FILE, "test.txt" or die "Can't open file!: $!"; while( ) { print if /(\d+\.\d+\.\d+\.\d)/; } close FILE; It gives the following output: # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) #Listen 12.34.56.78:80 # e.g., www.apache.org (on) or 204.62

Re: Regular Expresssion - Matching over multiple lines

2004-05-17 Thread Andrew Gaffney
Roman Hanousek wrote: Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. And if it doen't print the lines where it's missing to screen or file. while($input =~ ||sgc) { print "Missing ALT\n" if(

Regular Expresssion - Matching over multiple lines

2004-05-17 Thread Roman Hanousek
Hi All I have bunch of files that contain code like this: What I am trying to do is match then check that this piece of code contains a alt= tag. And if it doen't print the lines where it's missing to screen or file. Cheers any help appreciated. -- To unsubscribe, e-mail:

Re: Broke My @INC

2004-05-17 Thread Randy W. Sims
Jason Dusek wrote: Hi List, My @INC is messed up - Perl can't find any modules. If I know the path to a module, is there some kind of quick work around? For those who are curious, I seem to have broken my @INC by installing the ports (I'm on FreeBSD) for Perl 5.6.1 and Perl 5.8.2. You installed

Re: combining data from more than one file...

2004-05-17 Thread Michael S. Robeson II
Well this is the best I could do thinking through what you said. This is actually my first time working with hashes. Also, I am still a PERL newbie. So, I guess a little helpful code would go a long way. I just can't figure out how to link the regular expressions to the hash when searching thro

Broke My @INC

2004-05-17 Thread Jason Dusek
Hi List, My @INC is messed up - Perl can't find any modules. If I know the path to a module, is there some kind of quick work around? For those who are curious, I seem to have broken my @INC by installing the ports (I'm on FreeBSD) for Perl 5.6.1 and Perl 5.8.2. -- -- Jason Dusek ("`-''-/")

Re: Getting the href

2004-05-17 Thread Rob Dixon
Jason Dusek wrote: > > What is good way to pull the href from a link in html? If I have links like: > > meow woof moo bark bahh meow > bahh moo bark > > How do I pull just the 'here_kitty' part? Hi Jason. For something simple like this HTML::SimpleLinkExtor is ideal. The program below should hel

Re: Getting the href

2004-05-17 Thread JupiterHost.Net
Wiggins d Anconia wrote: Jason Dusek wrote: Hi Everyone, Hello, What is good way to pull the href from a link in html? If I have links like: meow woof moo bark bahh meow bahh moo bark There's are modules that help you do it, but this may work for what you need: my @href = $html =~ m/href\=\"

Re: Getting the href

2004-05-17 Thread Wiggins d Anconia
> > > Jason Dusek wrote: > > Hi Everyone, > > Hello, > > > What is good way to pull the href from a link in html? If I have links > > like: > > > > meow woof moo bark bahh meow > > bahh moo bark > > There's are modules that help you do it, but this may work for what you > need: > > my @hr

Re: Getting the href

2004-05-17 Thread JupiterHost.Net
Jason Dusek wrote: Hi Everyone, Hello, What is good way to pull the href from a link in html? If I have links like: meow woof moo bark bahh meow bahh moo bark There's are modules that help you do it, but this may work for what you need: my @href = $html =~ m/href\=\"((https?\:\/\/)?[\/\w\.\-]

RE: Find closest value

2004-05-17 Thread Bakken, Luke
Bob Showalter wrote: > Mike Blezien wrote: >> Hello, >> >> is it possible, with perl, to find the closest numerical value to a >> set value. IE. a set value of 15 and I have five values, >> 208,258,56,123 >> >> is there a function too go through the five values array to find the >> closest to 15

Re: Getting the href

2004-05-17 Thread Wiggins d Anconia
> Hi Everyone, > > What is good way to pull the href from a link in html? If I have links like: > > meow woof moo bark bahh meow > bahh moo bark > > How do I pull just the 'here_kitty' part? Use an HTML parsing module. HTML::TokeParser::Simple has proven effective for me. There are regex po

Getting the href

2004-05-17 Thread Jason Dusek
Hi Everyone, What is good way to pull the href from a link in html? If I have links like: meow woof moo bark bahh meow bahh moo bark How do I pull just the 'here_kitty' part? -- -- Jason Dusek ("`-''-/").___..--''"`-._ -- | `6_ 6 ) `-. ( ).`-.__.`) -- |

perl.beginners Weekly list FAQ posting

2004-05-17 Thread casey
NAME beginners-faq - FAQ for the beginners 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 address):

RE: Find closest value

2004-05-17 Thread Bob Showalter
Mike Blezien wrote: > Hello, > > is it possible, with perl, to find the closest numerical value to a > set value. IE. a set value of 15 and I have five values, > 208,258,56,123 > > is there a function too go through the five values array to find the > closest to 15 ?? Here's an approach that do

Re: combining data from more than one file...

2004-05-17 Thread Johan Viklund
On Sun, 16 May 2004 19:50:57 -0400, Michael S. Robeson II <[EMAIL PROTECTED]> wrote: Hi all, Hello and Welcome to the world of bioinformatics with perl! ... I think you should take a look at bioperl since this is genome data, for this exercise it's not what you want, but if you want to do more

Re: Need guidance for a passworded site access script

2004-05-17 Thread Ramprasad A Padmanabhan
when you give the url give it as username:[EMAIL PROTECTED] Ram On Sat, 2004-05-15 at 22:58, Arron Baroom wrote: > When a directory is protected with an .htaccess file, > the browser launches a username/password request > dialog box to be filled in before content in the > directory is accessibl

RE: combining data from more than one file...

2004-05-17 Thread Traeder, Philipp
> Hi all, Hi Michael, > > I am having trouble with combining data from several files, > and I can't > even figure out how to get started. So, I am NOT asking for any code > (though pseudo-code is ok) as I would like to try figuring > this problem > out myself. So, if anyone can give me an

RE: Query

2004-05-17 Thread Sudhindra Bhat
Hi Thanks. But there is a small issue. Considering the same example, the piece of code sent by you prints 123456 which is not on the same line as "Test:" But it doesn't print the characters 123456 ABCDEF which is on the same line as "Text:" Regards, Sudhindra -Original Message- From: Jo

Re: combining data from more than one file...

2004-05-17 Thread Ricardo SIGNES
* "Michael S. Robeson II" <[EMAIL PROTECTED]> [2004-05-17T07:47:57] > I am having trouble with combining data from several files, and I can't > even figure out how to get started. So, I am NOT asking for any code > (though pseudo-code is ok) as I would like to try figuring this problem > out

combining data from more than one file...

2004-05-17 Thread Michael S. Robeson II
Hi all, I am having trouble with combining data from several files, and I can't even figure out how to get started. So, I am NOT asking for any code (though pseudo-code is ok) as I would like to try figuring this problem out myself. So, if anyone can give me any references or hints that wou

Re: Query

2004-05-17 Thread John W . Krahn
On Monday 17 May 2004 03:15, Sudhindra Bhat wrote: > > Hi Hello, > I wanted some help on a piece of code that I was writing. Well the > requirement is like this. I have a file whose looks like this > > (1) Test: 123456 ABCDEF > > 123456 > > (2) Results: ABCDEF > > Now I want my script to

Query

2004-05-17 Thread Sudhindra Bhat
Hi I wanted some help on a piece of code that I was writing. Well the requirement is like this. I have a file whose looks like this (1) Test: 123456 ABCDEF 123456 (2) Results: ABCDEF Now I want my script to output all the contents between the two tags Test and Results. i.e. 12

combining data from more than one file...

2004-05-17 Thread Michael S. Robeson II
Hi all, I am having trouble with combining data from several files, and I can't even figure out how to get started. So, I am NOT asking for any code (though pseudo-code is ok) as I would like to try figuring this problem out myself. So, if anyone can give me any references or hints that wou