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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://793915]
[Corion]: Discipulus: Yeah, I rediscovered it when I wanted to have a simple (cross-platform) wrapper for my OpenGL program so it has a nice window etc
[Corion]: ... and one thing leads to another, so ambrus provided the integration with AnyEvent so I can now conveniently make HTTP requests from that app too :)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2016-12-09 09:16 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (150 votes). Check out past polls.