if ( $^0 eq $windows ) { $userFile = $top->getOpenFile ( ... ); } else { # do the way that's works already ... }