issue wit sysopen

2011-04-10 Thread Sunita Rani Pradhan
Hi All I have following simple code : === use warnings; sysopen(DATA,"list1.txt",O_RDWR|O_TRUNC); @array1=; foreach $i (@array1){ $i =~ s/d|b/G/ig; print DATA $i; } close DATA; --- It is fa

Re: issue wit sysopen

2011-04-10 Thread Shlomi Fish
Hi Sunita. A few comments on your code. On Sunday 10 Apr 2011 11:03:51 Sunita Rani Pradhan wrote: > Hi All > > > > I have following simple code : > > > > === > > use warnings; > Add "use strict;". > > > sysopen(DATA,"list1.txt",O_RDWR|O_TRUNC); 1. Don't us

Re: issue wit sysopen

2011-04-10 Thread shawn wilson
On Apr 10, 2011 4:05 AM, "Sunita Rani Pradhan" wrote: > > sysopen(DATA,"list1.txt",O_RDWR|O_TRUNC); > Why not just use open with +< ? I've never seen the benefit of sysopen unless you're working with a stream. Also, I don't know those options are compatible with each other. > It is failing with

Re: pushs in xs

2011-04-10 Thread shawn wilson
On Apr 8, 2011 4:42 PM, "Uri Guttman" wrote: While I don't agree with uri's reaction to the post, xs ain't beginner (but something this 'beginner' has been thinking of getting into recently). > > as for other places, google helps. there is usenet (still alive), > perlmonks, lists.perl.org to fin

Re: How to test for 2 words from a list in a form field?

2011-04-10 Thread John W. Krahn
shawn wilson wrote: heh, i've got to learn to test my code before posting - i'm ending looking like an idiot :) *sigh* this is what i wanted to say: #!/usr/bin/perl use warnings; use strict; my $fields1 = "a little sentense with one and it will match with two\n"; my $fields2 = "this one will

Re: pushs in xs

2011-04-10 Thread John W. Krahn
shawn wilson wrote: On Apr 8, 2011 4:42 PM, "Uri Guttman" wrote: While I don't agree with uri's reaction to the post, xs ain't beginner (but something this 'beginner' has been thinking of getting into recently). as for other places, google helps. there is usenet (still alive), perlmonks, lis

Re: issue wit sysopen

2011-04-10 Thread John W. Krahn
shawn wilson wrote: On Apr 10, 2011 4:05 AM, "Sunita Rani Pradhan" wrote: sysopen(DATA,"list1.txt",O_RDWR|O_TRUNC); Why not just use open with +< ? I've never seen the benefit of sysopen unless you're working with a stream. Also, I don't know those options are compatible with each other.

Re: issue wit sysopen

2011-04-10 Thread John W. Krahn
Shlomi Fish wrote: On Sunday 10 Apr 2011 11:03:51 Sunita Rani Pradhan wrote: $i =~ s/d|b/G/ig; Thsi should be : $line =~ s/[db]/G/ig; Or possibly even: $line =~ tr/dbDB/G/; John -- Any intelligent fool can make things bigger and more complex... It takes a

Re: How to test for 2 words from a list in a form field?

2011-04-10 Thread shawn wilson
On Apr 10, 2011 5:54 AM, "John W. Krahn" wrote: > > shawn wilson wrote: >> >> >> heh, i've got to learn to test my code before posting - i'm ending >> looking like an idiot :) >> *sigh* this is what i wanted to say: >> >> >> #!/usr/bin/perl >> >> use warnings; >> use strict; >> >> my $fields1 = "a

Re: trouble matching words with parentheses using grep

2011-04-10 Thread C.DeRykus
On Apr 9, 1:04 pm, alanhag...@alanhaggai.org (Alan Haggai Alavi) wrote: > > ... > > #!usr/bin/perl > > For increased portability, use the shebang #!/usr/bin/env perl > Hm, portable only in limited situations, risky, and always slower. From: http://www.webmasterkb.com/Uwe/Forum.aspx/perl/3968/

Re: issue wit sysopen

2011-04-10 Thread Shawn H Corey
On 11-04-10 06:06 AM, John W. Krahn wrote: Values that get bitwise ANDed together. That would be "ORed together". ;) -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and communication as it is about

Re: What's the best IDE in windows 7 for a beginner aiming at using Bioperl?

2011-04-10 Thread universe sheep
Thank you for your helps. And sorry for reply so late(I'm not familiar with the mail-list and I don't know what is the proper way to reply). I have tried Vim with an Introduction . It's really a interesting platform: with so many convenient commands, I can sufficiently program without mouse like a

Re:Re: What's the best IDE in windows 7 for a beginner aiming at using Bioperl?

2011-04-10 Thread universe sheep
Thank you for your helps. And sorry for reply so late(I'm not familiar with the mail-list and I don't know what is the proper way to reply). I have tried Vim with a guide . It's really a interesting platform: with so many convenient commands, I can sufficiently program without mouse like a game! T

Wanted: Help inventing poor man's FTP server

2011-04-10 Thread siegfried
I want to implement a implement a poor man's ftp server that has minimal dependencies (like none!). I'll write a simple custom poor man's ftp client on the other side. Since I'm writing both the client and the server, I don't need to worry about adherence to the ftp standard -- only the concept. S

Regular Expressions Question

2011-04-10 Thread cityuk
Dear All, This is more of a generic question on regular expressions as my program is working fine but I was just curious. Say you have the following URLs: http://www.test.com/image.gif http://www.test.com/?src=image.gif?width=12 I want to get the type of the image, i.e. the string gif. For the

Re: Regular Expressions Question

2011-04-10 Thread John W. Krahn
cityuk wrote: Dear All, Hello, This is more of a generic question on regular expressions as my program is working fine but I was just curious. Say you have the following URLs: http://www.test.com/image.gif http://www.test.com/?src=image.gif?width=12 I want to get the type of the image, i.e

Re: Regular Expressions Question

2011-04-10 Thread David Christensen
On 04/10/2011 04:05 AM, cityuk wrote: Is there a way to say here is a whole RE, here is another and match the first or the second? Jeffrey E.F. Friedl, 2006, "Mastering Regular Expressions", 3 e., O'Reilly Media, ISBN 978-0-596-52812-6. http://oreilly.com/catalog/9780596528126/ HTH, David

Re: Regular Expressions Question

2011-04-10 Thread Shlomi Fish
On Sunday 10 Apr 2011 14:05:49 cityuk wrote: > Dear All, > > This is more of a generic question on regular expressions as my > program is working fine but I was just curious. > > Say you have the following URLs: > > http://www.test.com/image.gif > http://www.test.com/?src=image.gif?width=12 >

Re: Wanted: Help inventing poor man's FTP server

2011-04-10 Thread Shlomi Fish
Hi Siegfried, On Sunday 10 Apr 2011 21:55:30 siegfr...@heintze.com wrote: > I want to implement a implement a poor man's ftp server that has minimal > dependencies (like none!). I'll write a simple custom poor man's ftp > client on the other side. Since I'm writing both the client and the > server