Doc states that expressions are equivalent:
use open ':locale';
use open IO => ':locale';
But why next are not?
use open ':utf8 :std'; # Unknown PerlIO layer class ':utf8 :std' (need IN, OUT or IO) at ...
use open IO => ':utf8 :std'; # No error happened
Thank @Grinnz on IRC:
Because :std is not a layer, it must be its own argument in the list
So code should be:
use open ':utf8', ':std';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.