There's more than one way to do things | |
PerlMonks |
Re: Unknown PerlIO layer "encoding" when it should fail because it's taintedby choroba (Cardinal) |
on Feb 09, 2022 at 18:29 UTC ( [id://11141284]=note: print w/replies, xml ) | Need Help?? |
I was able to reduce the code even more:
Note that untainting $whereami before opening the file prevents the error:
Interestingly, removing the :encoding prevents the error, too, without untainting, which seems wrong.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|