in reply to Meaning of command
From the perldoc:
"\n"s are being deleted because they are not specified in the replacement list.tr/SEARCHLIST/REPLACEMENTLIST/cdsr y/SEARCHLIST/REPLACEMENTLIST/cdsr ... Options: c Complement the SEARCHLIST. d Delete found but unreplaced characters. s Squash duplicate replaced characters. r Return the modified string and leave the original string untouched. If the /c modifier is specified, the SEARCHLIST character set is compl +emented. If the /d modifier is specified, any characters specified by SEARCHLIS +T not found in REPLACEMENTLIST are deleted. (Note that this is slightly more + flexible than the behavior of some tr programs, which delete anything they find + in the SEARCHLIST, period.) If the /s modifier is specified, sequences of cha +racters that were transliterated to the same character are squashed down to a +single instance of the character. If the /d modifier is used, the REPLACEMENTLIST is always interpreted +exactly as specified.
NOTE! the /r option is relatively new and may not be present in your version of Perl. Check your local docs to be sure.
|
|---|