note
rubasov
There is nothing wrong with your perl one-liner, your usage of echo is what misleads you. Try <code>echo "-e"</code> alone and see that it prints only a newline. That is because echo interprets your "-e" as on option, not a string to print.
<p>
Try this instead: <code>printf -- "-e\n"</code>
</p>
The '--' signifies the end of options, anything follows that will be interpreted as an argument to print. This is the common unix way to use an argument that looks like an option.
822549
822549