develooper Front page | perl.perl5.porters | Postings from April 2011

perlop fib

Tom Christiansen
April 26, 2011 18:01
perlop fib
Message ID:
Yet another addition that has rendered existing documentation untrue:


        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.)

        If the "/r" (non-destructive) option is used then it will perform
        the replacement on a copy of the string and return the copy whether
        or not it was modified. The original string will always remain
        unchanged in this case. The copy will always be a plain string,
        even if the input is an object or a tied variable.

--tom Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About