szabgab has asked for the wisdom of the Perl Monks concerning the following question:

In PHP when you are trying to locate some function dealing with strings you can go and see a list of string related functions

Similarry there is a list of array related functions

Is there some similar indexing of all the built in string or array or whatever related functions for Perl?

  • Comment on What functions are dealing with strings?

Replies are listed 'Best First'.
Re: What functions are dealing with strings?
by davidrw (Prior) on Sep 27, 2005 at 16:22 UTC
    Have a look at perlfunc (you can type man perlfunc or perldoc perlfunc as well). A portion from the top:
    Perl Functions by Category Here are Perl's functions (including things that look like func +tions, like some keywords and named operators) arranged by category. Some functions appear i +n more than one place. Functions for SCALARs or strings "chomp", "chop", "chr", "crypt", "hex", "index", "lc", "lcf +irst", "length", "oct", "ord", "pack", "q/STRING/", "qq/STRING/", "reverse", "rindex", "sp +rintf", "substr", "tr///", "uc", "ucfirst", "y///" <snip> Functions for real @ARRAYs "pop", "push", "shift", "splice", "unshift" Functions for list data "grep", "join", "map", "qw/STRING/", "reverse", "sort", "un +pack"
    Also note that for specific funcitons (e.g. grep), you can do perldoc -f grep to see just that section of perlfunc.
Re: What functions are dealing with strings?
by philcrow (Priest) on Sep 27, 2005 at 16:22 UTC
    The perldoc perlfunc has a section called 'Perl Functions by Category'. The first category is 'Functions for SCALARs or strings'. That gives a list of most of the relevant functions. See also 'Regular expressions and pattern matching' listed immediately below that.

    Phil

      yeah, I think that's what I am looking for

      thanks

Re: What functions are dealing with strings?
by xdg (Monsignor) on Sep 27, 2005 at 16:22 UTC

    perlfunc

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.