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
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
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
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
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
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
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.
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
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
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/
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
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
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
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
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
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
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
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
>
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
19 matches
Mail list logo