my($ok, $can, $see) = ('OK', 'Cancel', 'See Code');
if (not Exists
($DIALOG2)) {
-title
=> 'Dialog with global grab',
-buttons
=> [$ok, $can, $see],
-text
=> 'This dialog box uses a global grab, so it prevents you from interacting with anything on your display until you invoke one of the buttons below. Global grabs are almost always a bad idea; don\'t use them unless you\'re truly desperate.',
my $button = $DIALOG2->Show('-global');
print "You pressed OK\n" if $button eq $ok;
print "You pressed Cancel\n" if $button eq $can;
see_code
'dialog2' if $button eq $see;