$ perl -MO=Deparse -e '( $chapter =~ /5/ ) and ( $chapter = 5 );' $chapter = 5 if $chapter =~ /5/;