Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-12-10 13:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (163 votes). Check out past polls.