good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Adding periord to the end of lineby Anonymous Monk |
on Nov 20, 2002 at 17:20 UTC ( [id://214535]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, All Perl gurus:
It seems to be a trivial question, but I'm still learning perl syntax... Here is the question: try to parse each line of the file, chomp it (get rid of \n), and check to see if this line ending with period ("."), if yes, do nothing; if not, adding period and newline (".\n") to the end and print it out.
However, I cannot get the syntax correct.
Any help is appreciated.
Back to
Seekers of Perl Wisdom
|
|