while ((say "Input template string:") && ($string = <>) ) { while ((say "Input pattern:") && ($pattern = )) {