in reply to oneliner cat like capability
However, it prints out each lines twice, which is in the same order as in the file. What am I doing wrong?
The -p switch implies print. See perlrun.
Invoking perl with -p and an empty script body does the trick:
perl -pe '' dataoutput.txt
In your second example, you are just printing a newline character before the implicit print is done, hence the empty lines.
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
|
---|
In Section
Seekers of Perl Wisdom