zeni has asked for the wisdom of the Perl Monks concerning the following question:
Hi Frenz,
I need to remove the white spaces from a string and print just the string. Below is the code:$line = " c1, c2, s1,s2, c3"; @comboSeq = split(/\,/,$line); foreach(@comboSeq) { writeToFile("file.xml","\"$_\"\n"); }
Output:
" c1"
" c2"
" s1""s2"
" c3"
I don wan the preceding spaces.
All i need is
"c1"
"s1" and so on.
Plz help.
--NewBee20091130 Janitored by Corion: Restored title and content
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: delete space
by keszler (Priest) on Nov 30, 2009 at 10:29 UTC | |
by ikegami (Patriarch) on Nov 30, 2009 at 15:57 UTC | |
by zeni (Beadle) on Dec 01, 2009 at 07:52 UTC | |
Re: delete space
by ww (Archbishop) on Nov 30, 2009 at 11:16 UTC | |
Re: delete space
by Fox (Pilgrim) on Nov 30, 2009 at 11:47 UTC |