1 | split takes a string and splits it into parts separated by a delimiter, which may be any regular expression. E.g., |
2 | @fields = split(/\s+/, $line); # splits string $line into several fields stored in $field[0] $field[1] etc. where these fields were separated by whitespace (\s) in $line |
3 | join inverts the operation although the join string must now be an ordinary single or double-quoted string and not a regular expression as no matching is occuring! |
4 | $line = join( " \t", @fields); # rebuilds $line with space and tab as separator. |