Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 avoiding work at the Monastery: (5)
As of 2015-07-03 23:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls