Help for this page

Select Code to Download


  1. or download this
    perl -E 'local $_ = "foo"; say "Start" if /\G foo/gcx; say "Mid" if /\
    +G .*/gcx; say "End" if /\G \z/gcx'
    Start
    Mid
    
  2. or download this
    Start
    Mid
    End
    
  3. or download this
    perl -E 'local $_ = "foo"; say "Start" if /\G foo/gcx; say pos; say "M
    +id" if /\G .*/gcx; say pos; say "End" if /\G \z/gcx; say "At End" if 
    +pos == length'
    Start
    ...
    Mid
    3
    At End