Let me see if I can help here, maybe a peer-discussion (from
chimpanzee to chimpanzee so to say ;-) will work better than
inter-species communication with homo sapiens.

On Fri, 24 May 2002, mark wrote:

> " 'perldoc' is not recognised as an internal or external command, operable
> program or batch file "

I don't use Windows (anymore -- thank goodness:-), but I should think
that any self-respecting Perl port (or is it a distribution?) would
include perldoc... Try searching for it maybe.

> transliterate : Websters New World : to write in the characters of another
> alphabet.

transliterate : Unix Old Regexen : to replace characters from one set
with those from another.

>
> The c/ switch passes over the characters in the scalar found in "pat1"
> leaving them unchanged and renders all others to hex. ($value=~tr/pat1//c;)

The /c switch, as far as I understand it, "inverts" the character set
pat1, that is, if you had tr/pat1/pat2/ that would replace the
characters in pat1 with those in pat2, and if you had tr/pat1/pat2/c
that would replace all the characters NOT in pat1.

I am not sure what you mean by "render in hex", but I'm fairly sure
that it has nothing to do with /c... Maybe you want to read this part
of the discussion again:

> > In my example hex was used to represent characters that can't be
> > displayed just like "A", "\x41" and "\101" are all different
> > representations of the character 'A' and "\t", "\x09", "\011" and "\cI"
> > are all ways to represent the TAB character.

>
> The /d deletes all characters not found in pat1.

The /d switch asks Perl to delete the characters found in pat1 (if
that is what we shall call it) for which no replacements could be
found in pat2 -- that is, if pat1 is longer than pat2, the "excess"
characters are deleted.

(The "not" in that sentence comes from the /c, not the /d)

So, I hope this sheds some light on the matter. If it doesn't, go read
perlre either with your local perldoc or wherever.

And if any of the Homo Sapiens (whatever is the plural of that?), or
any other greater beings around happens to find a mistake in this
post, please do point it out :-)

HTH,

        Elias

-- 
"There are people who don't like capitalism, and there are people who don't like PCs,
but there's no one who likes the PC who doesn't like Microsoft."
 -- Bill Gates


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to