Help for this page
perl -pi.bak -e "$_ = '# ' . $_ if /\btest\b/" filename.txt
use strict; use warnings; ... } untie @filelines or die $!;