Problems? Is your data what you think it is? | |
PerlMonks |
Re: chomp questionby Athanasius (Archbishop) |
on Aug 08, 2012 at 08:57 UTC ( [id://986184]=note: print w/replies, xml ) | Need Help?? |
Hello suno, and welcome to the Monastery! As other monks have said, your question isn’t clear. The following is a guess at what you wanted:
Output:
The key lines of code are the ones marked *see below. By applying chomp to a newly-created variable, the code removes the newline (if any) from the end of a copy of each line of text, without changing the original lines in the array. HTH, Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|