Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Perl Monk, Perl Meditation
 
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 studying the Monastery: (7)
As of 2014-04-19 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls