can not filter out commentary lines with reg-exps

2006-03-29 Thread Harald
and thanks a lot for your help in advance, Harald -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Taking Multiple Files in Pairs and Run it Iteratively

2005-03-13 Thread Harald Ashburner
On Sun, 13 Mar 2005 18:38:42 +0800, Edward Wijaya <[EMAIL PROTECTED]> wrote: > Hi, > > Suppose I have a pair-series of files as follows: > > data1.fa > data1.rs > data2.fa > data2.rs #say each of this file contain lines of numbers > #and there are 40 of files > > And I have a code that

Preserve order in a HoH

2005-03-10 Thread Harald Ashburner
Greetings, I've created a complicated structure using autovification that is essentially a hash of hash of hash of hash etc. I pass them to the template toolkit where I can get them all out and put them in the right place on the page. This all worked well and nicely. The late mail is that the re

Re: Simplify perl -e '$a = [1,2,3,4,7]; print $a->[$#{@$a}]'

2005-03-10 Thread Harald Ashburner
On Thu, 10 Mar 2005 14:52:36 -, Marcos Rebelo <[EMAIL PROTECTED]> wrote: > This is correctly printing '7' but '$a->[EMAIL PROTECTED]' seems to be > encripted > code. > > Can I write this in a cleaner way? > perl -e '$a = [1,2,3,4,7]; print $a->[-1];' -- Kind regards, Hal Ashburner -- To

Re: Determining Odd and Even Numbers

2004-08-03 Thread Harald Richard Ashburner
[EMAIL PROTECTED] said: > > >Does anyone know a simple way to determine if a number is odd or even? For >example 220 would come out even while 221 would come out as an odd number. perl -e '($number % 2)?print "even":print "odd"; print "\n";' % is the modulus operator, and returns the remainder

Re: swapping in perl

2004-07-23 Thread Harald Richard Ashburner
Jaffer Shaik said: >Dear Friends, > >I want to swap 2 variables without using a tempoarary variable. > >I know the below logic > a=a+b > b=a-b > a=a-b > >Other than this logic, is thery any other way in perl. Hey Jaffer, Yep, this is easy in perl #!/usr/bin/perl -w #tested code

Re: !$state

2004-07-16 Thread Harald Richard Ashburner
Tim Johnson said: > > >Someone can probably give a better answer, but practically speaking, this is what >I've seen to be true (someone please give me a verbal whipping if I'm off here): > >Perl evaluates a statement as false if it > >a) is undefined >b) evaluates to 0 >c) evaluates to '' (em

Re: !$state

2004-07-15 Thread Harald Richard Ashburner
Hi Team, Tested code that prints a value for !$state when $state is initialized with my $state = (); #!/usr/local/bin/perl # #set $state to () to find out what !$state is use strict; use warnings;

Re: Help a newbie to pick best version of Linux for Perl and perl/TK.

2004-07-14 Thread Harald Richard Ashburner
Marco Perl said: > >Hi, Could you tell me what version of Linux is the most stable and > >with most lib modules to do pearl and perl/TK? > Hi Marco, Hmmm, how to start a flame war :) I use debian myself, which has a reputation for stability. So what. They're all good. I reccomend using whatever

Re: perl foreach loop

2004-07-09 Thread Harald Richard Ashburner
Selenis B Leguisamon said: >I am trying to write a perl program but I keep getting errors and I was >wondering if you can give me some pointers that might help. The program is >supposed to read from a file which has a list of server names then put >this names in an array. I then used a foreach l

OEM2ANSII

2001-08-21 Thread Harald Grams
What is the best possibility in perl to convert a text file from OEM to ANSII charset and reverse? Is there a module<-->function? If yes, what's its name? Thanks in advance Harald -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]