EC-Council
312-92 · Question #79
What is the following PERL script trying to accomplish? sub mycode_string { join("" map('$_ > 255 ? sprintf("\\x{%04x]", $_) : chr($_) = ~ /[[:cntrl:]]/ ? sprintf(\\x%02X", $_) : chr($_) }…
The correct answer is D. Display Unicode as text. See the full explanation below for the reasoning.
Question
What is the following PERL script trying to accomplish? sub mycode_string { join("" map('$_ > 255 ? sprintf("\x{%04x]", $_) :
chr($) = ~ /[[:cntrl:]]/ ? sprintf(\x%02X", $) :
chr($) } unpack("u*", $[0]))l }
Options
- AConvert hexadecimal to Unicode
- BDisplay test as Unicode
- CConvert hexadecimal to text
- DDisplay Unicode as text
How the community answered
(18 responses)- A17% (3)
- B6% (1)
- C6% (1)
- D72% (13)
Community Discussion
No community discussion yet for this question.