|
|
Question : Split on Whitespace
|
|
This is not a homework assignment. I am attempting to split a line on the whitespace in order to create fields for the line. There are about 10 whitespaces on a given line.
How is this done?
|
Answer : Split on Whitespace
|
|
if it prints the entire line, then the space in the line might actually be \t, is that the case?
If you want to be safe, use @fields = split /\s+/, $line;
|
|
|
|
|