Help for this page

Select Code to Download


  1. or download this
    m/.{$width}/
    
  2. or download this
    substr($someVar,$offSet,$width)
    
  3. or download this
    $text =~ s/(.*)($string_1)(.*)($string_2)(.*)/$1$4$3$2$5/ 
    #taken from recent post
    if ($text =~ m/^.*(\.txt)$/) #used to see if $text ends in .txt
    
  4. or download this
    $text = s/($string_1)(.*)($string_2)/$3$2$1/
    if ($text =~ m/\.txt$/)