c:\@Work\Perl\monks>perl -w -le "use v5.10; say X; say $main::{X}; if(exists $main::{X} ){ say 'A: exists';} else {say 'A: does not exist';} if(exists $main{X} ){ say 'B: exists';} else {say 'B: does not exist';} if(exists $main::main{X}){ say 'C: exists';} else {say 'C: does not exist';} die 'not the same' if \%main != \%main::main; die 'are the same' if \%main == \%main::; if( defined(X) ){say 'defined';} else {say 'not defined';} " say() on unopened filehandle X at -e line 1. *main::X A: exists B: does not exist C: does not exist defined