use strict; my $word = ; if ($word=~/(.*)(c.*w.*w)(.*)/){ print length($2),"\n"; }else{ print -1,"\n"; }