We don't bite newbies here... much | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
split /\n/ and split /^/ both run fine on Windows and old Macs, for two different reasons In Windows, the CRLF gets converted to LF on read, so there's no CR in the string to split. In old Macs, \n is redefined to CR. If you meant there would be problems parsing files from one system on a different system, you need to add unix files to the list.
Indeed. It keeps the trailing newlines, and it keeps trailing blanks lines. split /\n/ does neither. In reply to Re^3: Parsing multiline string line by line
by ikegami
|
|