use strict; use Win32::GuiTest qw(:ALL); my @window2=FindWindowLike(undef,m"^\s*(SURFer)\s*(\W+)\s+(note)\s*$"); if(!@window2) { die("cannot find window with title/caption SURFer++ note\n"); } else { print("the matched strings are :\n <$1>\t<$2>\t<$3>"); printf("window handle of SURFer++ note is %x \n",$window2[0]); }