Consider the idiom: open($fh,"<$path") || die "Cannot open $path:$!"; If we add layers/disciplines to that one gets: open($fh,"<:encoding(gibberish)",$path) || die "Cannot open $path:$!"; Now if $path does not exist etc. then errno i.e. $! is just fine. But what should happen if (as here) the file is fine but the layer has problems? My best guess is that errno should be forced to EINVAL and the whole open should fail. But do we want to warn() "Unknown encoding 'gibberish'" as well? Or should string value of $! have additional behind the scenes magic that looks at a perl-only PL_errno_detail as well? The snag being when to reset that. -- Nick Ing-Simmons