You were shown two alternatives. Which one did you use? (Hint: You must
copy/paste directly from the shell window where you ran the command.) What actual output did you get? (Again, use copy/paste.)
BTW, it's not really clear that the "desired output" is consistent with the OP description of what you're trying to do. Please be more explicit in the explanation, or more careful about presenting the "desired output".
Also, it looks like your input contains some non-ASCII characters. Do you know what sort of character encoding is being used? If it's UTF-8, you'll want to add '-C31' as the first command-line option on the perl command line that mr_mischief gave you (i.e. perl -C31 -e
(but if it's something other than UTF-8, you'll want to handle encoding conversion).