Re: ending a character to each line

2009-02-07 Thread sf
On Feb 5, 6:09 pm, jwkr...@shaw.ca (John W. Krahn) wrote: > 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... > > $line =~ s/$/~/; > > John > -- > Those people who think they know everything are a great > anno

Re: ending a character to each line

2009-02-05 Thread John W. Krahn
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... $line =~ s/$/~/; John -- Those people who think they know everything are a great annoyance to those of us who do.-- Isaac Asimov -- To unsubscribe, e-ma

Re: ending a character to each line

2009-02-05 Thread Telemachus
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 '$_ = "$_~"

ending a character to each line

2009-02-05 Thread stuforman
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 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/