On Thu Feb 05 2009 @ 11:17, stuforman wrote:
> i want to use perl to end each line with a '~'. i would really
> appreciate any syntax that would help me do this...
> 
> thanks in advance

Here's one quick version. This will work and ignore lines without any text
or spaces:

  perl -ple '$_ = "$_~" unless m/^$/' filename

Try it and if the output is good, you can save to a new file with redirection
or by adding -i.bak (to edit in place and save backups to filename.bak).

HTH, T

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to