Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Expression, but is it regular?

by OeufMayo (Curate)
on May 08, 2001 at 15:19 UTC ( #78793=note: print w/ replies, xml ) Need Help??


in reply to Expression, but is it regular?

You're probably looking for something like that:

my $dirtype = $in{username} =~ /^([a-zA-Z]{2})$/ ? $1 : 'other' ;

<kbd>--
my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>


Comment on Re: Expression, but is it regular?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-10-25 12:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (143 votes), past polls