my @Windows; $Windows[ 1 ] = new Win32::GUI::Window ( ... my $var = $Windows[ 1 ]->RegExp->Text;