Re: [Perl-unix-users] perl help

2002-05-01 Thread $Bill Luebkert
Mehta, Perdeep wrote: > Hi All, > > I'm beginner to pattern matching in Perl and was writing a code to parse a > string. I tried pretty hard to extract the words that are of interest from a > string but had no luck. > > Here is all-in-one-line string that I want to parse: > $string = "biologica

RE: [Perl-unix-users] perl help

2002-05-01 Thread Allegakoen, Justin Devanandan
>Here is all-in-one-line string that I want to parse: >$string = "biological process|mitosis|IEA|GO:0007067|MGD|na|biological >process|cell cycle|IEA|GO:0007049|MGD|na|cellular >component|intracellular|IEA|GO:0005622|MGD|na|molecular function|protein >tyrosine phosphatase|IEA|GO:0004725|MGD|na|bi

[Perl-unix-users] perl help

2002-05-01 Thread Mehta, Perdeep
Hi All, I'm beginner to pattern matching in Perl and was writing a code to parse a string. I tried pretty hard to extract the words that are of interest from a string but had no luck. Here is all-in-one-line string that I want to parse: $string = "biological process|mitosis|IEA|GO:0007067|MGD|na

Re: [Perl-unix-users] open file etc..

2002-05-01 Thread $Bill Luebkert
Johnno wrote: > many thanks that works... > > What i am getting is a Permission denied > > I can't see why here.. do i have to do a chmod 666 on the file or > something?? > > sub key_counter { > > my @countermyfile; > my $keycounter; > > open(IN,"$working_folder/counter.txt"); > (@countermyf

Re: [Perl-unix-users] open file etc..

2002-05-01 Thread Johnno
many thanks that works... What i am getting is a Permission denied I can't see why here.. do i have to do a chmod 666 on the file or something?? sub key_counter { my @countermyfile; my $keycounter; open(IN,"$working_folder/counter.txt"); (@countermyfile=); $keycounter=$countermyfile[0]; $key

Re: [Perl-unix-users] open file etc..

2002-05-01 Thread $Bill Luebkert
Johnno wrote: > open(OUT,">$working_folder/counter.txt") or die "cannot create counter > file"; > > how can i make it so it will tell me what the error is and don't cannot > create counter file?? Add $! to the die message: ... or die "cannot create counter file: $!"; -- ,-/- __

[Perl-unix-users] open file etc..

2002-05-01 Thread Johnno
open(OUT,">$working_folder/counter.txt") or die "cannot create counter file"; how can i make it so it will tell me what the error is and don't cannot create counter file?? Many Thanks, Johnno ___ Perl-Unix-Users mailing list [