[Binari] my first real question

does anybody knows whether perl can deal with leading zero in number context? eg. 0012 > 11 , will this work? thx, L. PS. is the binari exclusively dutch?? -- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

Dont know the answer. But its pretty trivial to try right? And elizabeth is the only non-dutch speaking person on the list i think. lieven sterck wrote:
does anybody knows whether perl can deal with leading zero in number context?
eg. 0012 > 11 , will this work?
thx, L. PS. is the binari exclusively dutch??
-- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.ugent.be http://www.psb.ugent.be ==================================================================

lieven sterck wrote:
does anybody knows whether perl can deal with leading zero in number context?
eg. 0012 > 11 , will this work? I'm no perl-woman
thx, L. PS. is the binari exclusively dutch??
No, elwis is on here too, but as she's on holidays, and sometimes we're just rude, and we believe she speaks better dutch then she dares to admit, we often write in dutch ;-) -Sofie

A leading zero normally denotes octal notation, so 0012 would be 10 in decimal notation. Although I have no idea whether perl even knows about octal notation So in this case it would be 10>11, which won't work regards, Thomas lieven sterck wrote:
does anybody knows whether perl can deal with leading zero in number context?
eg. 0012 > 11 , will this work?
thx, L. PS. is the binari exclusively dutch??

ah crap .. that's right :) this should solve it: (or you get the leading-zeroless number or a zero) (my $int) = $possible_oct =~ s/^0+(\d+)|(\d*)/$1/; You can have warnings or errors thrown whenever there's a leading zero in a number used, with: http://search.cpan.org/~dconway/Leading-Zeros-0.0.2/lib/Leading/Zeros.pm -Kenny On Mon, 18 Aug 2008, Thomas Abeel wrote:
A leading zero normally denotes octal notation, so 0012 would be 10 in decimal notation. Although I have no idea whether perl even knows about octal notation
So in this case it would be 10>11, which won't work
regards, Thomas
lieven sterck wrote:
does anybody knows whether perl can deal with leading zero in number context?
eg. 0012 > 11 , will this work?
thx, L. PS. is the binari exclusively dutch??
--

$i = "0012"; $j = 11; print "$i > $j" if $i > $j ; en het klopt -Kenny ps: nope, but it's great for Elwis On Mon, 18 Aug 2008, lieven sterck wrote:
does anybody knows whether perl can deal with leading zero in number context?
eg. 0012 > 11 , will this work?
thx, L. PS. is the binari exclusively dutch??
--
participants (5)
-
Kenny Billiau
-
lieven sterck
-
Michiel Van Bel
-
Sofie Van Landeghem
-
Thomas Abeel