Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Can't match my regex

by Melly (Hermit)
on Sep 07, 2009 at 09:44 UTC ( #793915=note: print w/ replies, xml ) Need Help??

in reply to Can't match my regex

It works for me - can you run the following from the command-line and confirm that you don't get '0' printed?

perl -e "$l='Version: 0';($v)=$l=~/^Version:\s(\d)$/;print $v;"

Apart from that, are you testing $version at some moment? If so, it will be false ('0'), whereas ' 0' is not false... e.g.

perl -e "$l='Version: 0';($v)=$l=~/^Version:\s(\d)$/;print $v if $v;"

will not print the version.

map{$a=1-$_/10;map{$d=$a;$e=$b=$_/20-2;map{($d,$e)=(2*$d*$e+$a,$e**2 -$d**2+$b);$c=$d**2+$e**2>4?$d=8:_}1..50;print$c}0..59;print$/}0..20
Tom Melly, pm (at) cursingmaggot (stop) co (stop) uk

Comment on Re: Can't match my regex
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://793915]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2016-02-07 17:30 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (255 votes), past polls