Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Regex Question

by Kenosis (Priest)
on Nov 26, 2012 at 05:46 UTC ( #1005563=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    if ( substr( $string, 2, 1 ) eq 'a' ) {
        print 'The third character in $string is an "a".';
    }
    
  2. or download this
    $string =~ /^..a/
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005563]
help
Chatterbox?
vrk replaces stale cookies with fresh on the platter on the sideboard.
vrk takes a cookie from the platter on the sideboard.
Eily adds butterbeer cookies to the platter

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-05-23 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?