Help for this page

Select Code to Download


  1. or download this
    my $test_line = 'Happy Birthday';
    my ( $parse1, $parse2 ) = $test_line =~ /(Happy)(.*)/;
    print "parse1 = $parse1\nparse2 = $parse2\n";
    
  2. or download this
    
    m/PATTERN/msixpodualgc
    ...
                   searched.  (The string specified with "=~" need not be 
    +an
                   lvalue--it may be the result of an expression evaluatio
    +n, but
                   remember the "=~" binds rather tightly.)  See also perl
    +re.
    
  3. or download this
    Matching in list context
                   If the "/g" option is not used, "m//" in list context r
    +eturns a
    ...
                   4's behavior.)  When there are no parentheses in the pa
    +ttern,
                   the return value is the list "(1)" for success.  With o
    +r
                   without parentheses, an empty list is returned upon fai
    +lure.