in reply to Re^3: diamond operator question
in thread diamond operator question
"DIRHANDLEs have their own namespace separate from FILEHANDLEs." (source)could help detecting whether it was opened by open or opendir.
Am I doing something wrong, or is there another way to differentiate the namespaces of the handles ?open(DIR, './random_file'); print 'open : ', *main::DIR{NAME}, ' - ', *main::DIR{PACKAGE}, "\n"; opendir (DIR, '.'); print 'opendir : ', *main::DIR{NAME}, ' - ', *main::DIR{PACKAGE}, "\n" +;
|
|---|