On 10/25/2012 03:57 PM, Weidner, Ron wrote:
In the following regex what is the "t" character doing?



$linebuf =~ tr/\n/:/;




There is no regexp - there is a tr operator

perldoc perlop


tr/SEARCHLIST/REPLACEMENTLIST/cds
y/SEARCHLIST/REPLACEMENTLIST/cds
   Transliterates all occurrences of the characters found in the search
   list with the corresponding character in the replacement list. It
   returns the number of characters replaced or deleted. If no string
   is specified via the =~ or !~ operator, the $_ string is
   transliterated. (The string specified with =~ must be a scalar
   variable, an array element, a hash element, or an assignment to one
   of those, i.e., an lvalue.)



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to