Functions for SCALARs or strings in perl

by kalai 2008-11-22 20:24:07


* chomp - remove a trailing record separator from a string
* chop - remove the last character from a string
* chr - get character this number represents
* crypt - one-way passwd-style encryption
* hex - convert a string to a hexadecimal number
* index - find a substring within a string
* lc - return lower-case version of a string
* lcfirst - return a string with just the next letter in lower case
* length - return the number of bytes in a string
* oct - convert a string to an octal number
* ord - find a character's numeric representation
* pack - convert a list into a binary representation
* q/STRING/ - singly quote a string
* qq/STRING/ - doubly quote a string
* reverse - flip a string or a list
* rindex - right-to-left substring search
* sprintf - formatted print into a string
* substr - get or alter a portion of a stirng
* tr/// - transliterate a string
* uc - return upper-case version of a string
* ucfirst - return a string with just the next letter in upper case
* y/// - transliterate a string

Tagged in:

1031
like
0
dislike
0
mail
flag

You must LOGIN to add comments