Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Regular Expression

by olivierp (Hermit)
on Aug 05, 2004 at 20:45 UTC ( #380380=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Regular Expression
in thread Regular Expression

Fun :)
How about:

substr($month,0,1,"0$month") if ($month<10 && $month!~/^0/);
Update: Fixed typo, as per tinita

--
Olivier


Comment on Re^3: Regular Expression
Download Code
Re^4: Regular Expression
by tinita (Parson) on Aug 05, 2004 at 23:34 UTC
    substr($month,0,1,"0$month") if ($month<10 && $month!=/^0/);
    Use of uninitialized value in pattern match (m//) at -e line 3. 0077

    s/ != / !~ /x
    ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-08-02 03:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (54 votes), past polls