- or download this
m/.{$width}/
- or download this
substr($someVar,$offSet,$width)
- 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
- or download this
$text = s/($string_1)(.*)($string_2)/$3$2$1/
if ($text =~ m/\.txt$/)