Help for this page

Select Code to Download


  1. or download this
                   $` is the same as "substr($var, 0, $-[0])"
                   $& is the same as "substr($var, $-[0], $+[0] - $-[0])"
                   $' is the same as "substr($var, $+[0])"
    
  2. or download this
    sub  prematch (;$) { substr((@_ ? $_[0] : $_), 0, $-[0]) }
    sub     match (;$) { substr((@_ ? $_[0] : $_), $-[0], $+[0] - $-[0]) }
    ...
    argument is given.
    
    =cut