in reply to spliting new lines and spaces
The sample code you have given only contains one element in the array. Is that what you really meant?
The following code should work to get rid of any whitespace characters (tab, newline, form feed, literal space, carraige return) in the elements of your array:
Kris
The following code should work to get rid of any whitespace characters (tab, newline, form feed, literal space, carraige return) in the elements of your array:
Good luck,foreach (@test){ s/\s+//g; }
Kris
|
---|
In Section
Seekers of Perl Wisdom