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/