Re: saving surrounding text in substitution

2006-10-11 Thread Dr.Ruud
Kathryn Bushley schreef: > #!/usr/bin/perl -w > use warnings; Make that: #!/usr/bin/perl use warnings ; use strict ; See `perldoc perllexwarn`. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: saving surrounding text in substitution

2006-10-10 Thread Chris Charley
- Original Message - From: ""John W. Krahn"" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "Perl Beginners" Sent: Tuesday, October 10, 2006 4:43 PM Subject: Re: saving surrounding text in substitution Chris Charley wrote: (I've re-wri

Re: saving surrounding text in substitution

2006-10-10 Thread John W. Krahn
Chris Charley wrote: > > (I've re-writteen your entire code below.You how much simpler it could be.) > > #!/usr/bin/perl > use strict; > use warnings; > use Bio::Seq; > use Bio::SeqIO; > > #initialize id and fasta files > my $codefile = $ARGV[0]; > my $treefile = $ARGV[1]; > > #open alignment l

Re: saving surrounding text in substitution

2006-10-10 Thread Chris Charley
- Original Message - From: "Kathryn Bushley" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, October 10, 2006 3:17 PM Subject: saving surrounding text in substitution Hi, I've written the following script to substitute names for codes int

saving surrounding text in substitution

2006-10-10 Thread Kathryn Bushley
Hi, I've written the following script to substitute names for codes into a phylogenetic tree (newick format-file attached) using a global hash with codes as key and names as values...it seems to be working up to the second to last line where I make the substitution...I am able to make the substitu

Re: saving surrounding text in substitution

2006-10-10 Thread Tom Phoenix
On 10/10/06, Kathryn Bushley <[EMAIL PROTECTED]> wrote: s/(.*).$code.(.*)/$1.$id_global{$code}.$2/; I haven't looked at all of your program in detail, so there may be other fixes needed; but this substitution jumped out at me. It doesn't look as if you really need $1 and $2; and it looks as if

saving surrounding text in substitution

2006-10-10 Thread Kathryn Bushley
Hi, I've written the following script to substitute names for codes into a phylogenetic tree (newick format-file attached) using a global hash with codes as key and names as values...it seems to be working up to the second to last line where I make the substitution...I am able to make the substitu