Help for this page
$str !~ s/junk//g;
Useless use of not in void context at ...
if ( $str !~ s/junk//g ) {}