Help for this page

Select Code to Download


  1. or download this
    local $_ = 'foo';                         
                                              
    m/\Gfoo/gc && say 'Matched foo';          
    m/\G.+/gc  && say 'Matched dot star';     
    m/\G\z/gc  && say 'Matched end of string';
    
  2. or download this
    Matched foo
    Matched end of string
    
  3. or download this
    local $_ = 'foo';                         
                                              
    m/\Gfoo/gc && say 'Matched foo';          
    m/\G.*/gc  && say 'Matched dot star';     
    m/\G\z/gc  && say 'Matched end of string';
    
  4. or download this
    Matched foo
    Matched dot star
    
  5. or download this
    local $_ = 'foo';                      
                                           
    m/\Gfoo/gc && say 'Matched foo';       
    m/\G.*\z/gc  && say 'Matched dot star and end of string';
    
  6. or download this
    Matched foo
    Matched dot star and end of string