in reply to POD: getting usage snippets from perldoc

FWIW my results parsing the perldocs for 5.16 :)

update

added grouping and short descriptions, some statements appear in multiple groups.

some perldocs are fuzzy, especially for quote-like operators.

{ "ARRAY" => { desc => "Functions for real \@ARRAYs", functions => { each => { desc => "retrieve the next key/valu +e pair from a hash", usage => ["each HASH", "each ARRAY", + "each EXPR"], }, keys => { desc => "retrieve list of indices f +rom a hash", usage => ["keys HASH", "keys ARRAY", + "keys EXPR"], }, pop => { desc => "remove the last element fr +om an array and return it", usage => ["pop ARRAY", "pop EXPR", " +pop"], }, push => { desc => "append one or more element +s to an array", usage => ["push ARRAY,LIST", "push E +XPR,LIST"], }, shift => { desc => "remove the first element o +f an array, and return it", usage => ["shift ARRAY", "shift EXPR +", "shift"], }, splice => { desc => "add or remove elements any +where in an array", usage => [ "splice ARRAY or EXPR,OFF +SET,LENGTH,LIST", "splice ARRAY or EXPR,OFF +SET,LENGTH", "splice ARRAY or EXPR,OFF +SET", "splice ARRAY or EXPR", ], }, unshift => { desc => "prepend more elements to t +he beginning of a list", usage => ["unshift ARRAY,LIST", "uns +hift EXPR,LIST"], }, values => { desc => "return a list of the value +s in a hash", usage => ["values HASH", "values ARR +AY", "values EXPR"], }, }, }, "Binary" => { desc => "Functions for fixed-length data or records +", functions => { pack => { desc => "convert a list into a bin +ary representation", usage => ["pack TEMPLATE,LIST"], }, read => { desc => "fixed-length buffered inp +ut from a filehandle", usage => [ "read FILEHANDLE,SCALAR, +LENGTH,OFFSET", "read FILEHANDLE,SCALAR, +LENGTH", ], }, syscall => { desc => "execute an arbitrary syst +em call", usage => ["syscall NUMBER, LIST"], }, sysread => { desc => "fixed-length unbuffered i +nput from a filehandle", usage => [ "sysread FILEHANDLE,SCAL +AR,LENGTH,OFFSET", "sysread FILEHANDLE,SCAL +AR,LENGTH", ], }, sysseek => { desc => "position I/O pointer on h +andle used with sysread and syswrite", usage => ["sysseek FILEHANDLE,POSIT +ION,WHENCE"], }, syswrite => { desc => "fixed-length unbuffered o +utput to a filehandle", usage => [ "syswrite FILEHANDLE,SCA +LAR,LENGTH,OFFSET", "syswrite FILEHANDLE,SCA +LAR,LENGTH", "syswrite FILEHANDLE,SCA +LAR", ], }, unpack => { desc => "convert binary structure +into normal perl variables", usage => ["unpack TEMPLATE,EXPR", " +unpack TEMPLATE"], }, vec => { desc => "test or set particular bi +ts in a string", usage => ["vec EXPR,OFFSET,BITS"], }, }, }, "File" => { desc => "Functions for filehandles, files, or direc +tories", functions => { -X => { desc => "a file test (-r, -x, etc) +", usage => ["-X FILEHANDLE", "-X EXPR +", "-X DIRHANDLE", "-X"], }, chdir => { desc => "change your current worki +ng directory", usage => ["chdir EXPR", "chdir FILE +HANDLE", "chdir DIRHANDLE", "chdir"], }, chmod => { desc => "changes the permissions o +n a list of files", usage => ["chmod LIST"], }, chown => { desc => "change the ownership on a + list of files", usage => ["chown LIST"], }, chroot => { desc => "make directory new root f +or path lookups", usage => ["chroot FILENAME", "chroo +t"], }, fcntl => { desc => "file control system call" +, usage => ["fcntl FILEHANDLE,FUNCTIO +N,SCALAR"], }, glob => { desc => "expand filenames using wi +ldcards", usage => ["glob EXPR", "glob"], }, ioctl => { desc => "system-dependent device c +ontrol system call", usage => ["ioctl FILEHANDLE,FUNCTIO +N,SCALAR"], }, link => { desc => "create a hard link in the + filesystem", usage => ["link OLDFILE,NEWFILE"], }, lstat => { desc => "stat a symbolic link", usage => ["lstat FILEHANDLE", "lsta +t EXPR", "lstat DIRHANDLE", "lstat"], }, mkdir => { desc => "create a directory", usage => ["mkdir FILENAME,MASK", "m +kdir FILENAME", "mkdir"], }, open => { desc => "open a file, pipe, or des +criptor", usage => [ "open FILEHANDLE,EXPR", "open FILEHANDLE,MODE,EX +PR", "open FILEHANDLE,MODE,EX +PR,LIST", "open FILEHANDLE,MODE,RE +FERENCE", "open FILEHANDLE", ], }, opendir => { desc => "open a directory", usage = +> ["opendir DIRHANDLE,EXPR"] }, readlink => { desc => "determine where a symboli +c link is pointing", usage => ["readlink EXPR", "readlin +k"], }, rename => { desc => "change a filename", usage +=> ["rename OLDNAME,NEWNAME"] }, rmdir => { desc => "remove a directory", usage + => ["rmdir FILENAME", "rmdir"] }, stat => { desc => "get a file's status infor +mation", usage => ["stat FILEHANDLE", "stat +EXPR", "stat DIRHANDLE", "stat"], }, symlink => { desc => "create a symbolic link to + a file", usage => ["symlink OLDFILE,NEWFILE" +], }, sysopen => { desc => "open a file, pipe, or des +criptor", usage => [ "sysopen FILEHANDLE,FILE +NAME,MODE", "sysopen FILEHANDLE,FILE +NAME,MODE,PERMS", ], }, umask => { desc => "set file creation mode ma +sk", usage => ["umask EXPR", "umask"], }, unlink => { desc => "remove one link to a file +", usage => ["unlink LIST", "unlink"], }, utime => { desc => "set a file's last access +and modify times", usage => ["utime LIST"], }, }, }, "Flow" => { desc => "Keywords related to the control flow of yo +ur Perl program", functions => { __FILE__ => { desc => "the name of the curren +t source file", usage => ["__FILE__"], }, __LINE__ => { desc => "the current source line + number", usage => ["__LINE__"] }, __PACKAGE__ => { desc => "the current package", u +sage => ["__PACKAGE__"] }, __SUB__ => { desc => "the current subroutine +, or C<undef> if not in a subroutine", usage => ["__SUB__"], }, break => { desc => "break out of a C<given> + block", usage => ["break"] }, caller => { desc => "get context of the cur +rent subroutine call", usage => ["caller EXPR", "caller +"], }, continue => { desc => "optional trailing bloc +k in a while or foreach", usage => ["continue BLOCK", "con +tinue"], }, die => { desc => "raise an exception or b +ail out", usage => ["die LIST"] }, do => { desc => "turn a BLOCK into a TER +M", usage => ["do BLOCK"] }, dump => { desc => "create an immediate co +re dump", usage => ["dump LABEL", "dump"], }, eval => { desc => "catch exceptions or co +mpile and run code", usage => ["eval EXPR", "eval BLO +CK", "eval"], }, evalbytes => { desc => "similar to string eval +, but intend to parse a bytestream", usage => ["evalbytes EXPR", "eva +lbytes"], }, exit => { desc => "terminate this program" +, usage => ["exit EXPR", "exit"] }, goto => { desc => "create spaghetti code" +, usage => ["goto LABEL", "goto EX +PR", "goto &NAME"], }, last => { desc => "exit a block prematurel +y", usage => ["last LABEL", "last"] }, next => { desc => "iterate a block premat +urely", usage => ["next LABEL", "next"], }, redo => { desc => "start this loop iterat +ion over again", usage => ["redo LABEL", "redo"], }, return => { desc => "get out of a function +early", usage => ["return EXPR", "return +"], }, sub => { desc => "declare a subroutine, +possibly anonymously", usage => [ "sub NAME BLOCK", "sub NAME (PROTO) BLO +CK", "sub NAME : ATTRS BLO +CK", "sub NAME (PROTO) : A +TTRS BLOCK", ], }, wantarray => { desc => "get void vs scalar vs +list context of current subroutine call", usage => ["wantarray"], }, }, }, "HASH" => { desc => "Functions for real %HASHes", functions => { delete => { desc => "deletes a value from a hash" +, usage => ["delete EXPR"] }, each => { desc => "retrieve the next key/value + pair from a hash", usage => ["each HASH", "each ARRAY", +"each EXPR"], }, exists => { desc => "test whether a hash key is +present", usage => ["exists EXPR"], }, keys => { desc => "retrieve list of indices fr +om a hash", usage => ["keys HASH", "keys ARRAY", +"keys EXPR"], }, values => { desc => "return a list of the values + in a hash", usage => ["values HASH", "values ARRA +Y", "values EXPR"], }, }, }, "I/O" => { desc => "Input and output functions", functions => { binmode => { desc => "prepare binary files for + I/O", usage => ["binmode FILEHANDLE, LAY +ER", "binmode FILEHANDLE"], }, close => { desc => "close file (or pipe or s +ocket) handle", usage => ["close FILEHANDLE", "clo +se"], }, closedir => { desc => "close directory handle", +usage => ["closedir DIRHANDLE"] }, dbmclose => { desc => "breaks binding on a tied + dbm file", usage => ["dbmclose HASH"], }, dbmopen => { desc => "create binding on a tied + dbm file", usage => ["dbmopen HASH,DBNAME,MAS +K"], }, die => { desc => "raise an exception or bai +l out", usage => ["die LIST"] }, eof => { desc => "test a filehandle for it +s end", usage => ["eof FILEHANDLE", "eof ( +)", "eof"], }, fileno => { desc => "return file descriptor f +rom filehandle", usage => ["fileno FILEHANDLE"], }, flock => { desc => "lock an entire file with + an advisory lock", usage => ["flock FILEHANDLE,OPERAT +ION"], }, format => { desc => "declare a picture format + with use by the write() function", usage => ["format"], }, getc => { desc => "get the next character f +rom the filehandle", usage => ["getc FILEHANDLE", "getc +"], }, print => { desc => "output a list to a fileh +andle", usage => [ "print FILEHANDLE LIST" +, "print FILEHANDLE", "print LIST", "print", ], }, printf => { desc => "output a formatted list +to a filehandle", usage => [ "printf FILEHANDLE FORM +AT, LIST", "printf FILEHANDLE", "printf FORMAT, LIST", "printf", ], }, read => { desc => "fixed-length buffered in +put from a filehandle", usage => [ "read FILEHANDLE,SCALAR +,LENGTH,OFFSET", "read FILEHANDLE,SCALAR +,LENGTH", ], }, readdir => { desc => "get a directory from a d +irectory handle", usage => ["readdir DIRHANDLE"], }, readline => { desc => "fetch a record from a fi +le", usage => ["readline EXPR", "readli +ne"], }, rewinddir => { desc => "reset directory handle", +usage => ["rewinddir DIRHANDLE"] }, say => { desc => "output a list to a fileh +andle, appending a newline", usage => ["say FILEHANDLE LIST", " +say FILEHANDLE", "say LIST", "say"], }, seek => { desc => "reposition file pointer +for random-access I/O", usage => ["seek FILEHANDLE,POSITIO +N,WHENCE"], }, seekdir => { desc => "reposition directory poi +nter", usage => ["seekdir DIRHANDLE,POS"] +, }, select => { desc => "reset default output or +do I/O multiplexing", usage => ["select FILEHANDLE", "se +lect"], }, syscall => { desc => "execute an arbitrary sys +tem call", usage => ["syscall NUMBER, LIST"], }, sysread => { desc => "fixed-length unbuffered +input from a filehandle", usage => [ "sysread FILEHANDLE,SCA +LAR,LENGTH,OFFSET", "sysread FILEHANDLE,SCA +LAR,LENGTH", ], }, sysseek => { desc => "position I/O pointer on +handle used with sysread and syswrite", usage => ["sysseek FILEHANDLE,POSI +TION,WHENCE"], }, syswrite => { desc => "fixed-length unbuffered +output to a filehandle", usage => [ "syswrite FILEHANDLE,SC +ALAR,LENGTH,OFFSET", "syswrite FILEHANDLE,SC +ALAR,LENGTH", "syswrite FILEHANDLE,SC +ALAR", ], }, tell => { desc => "get current seekpointer +on a filehandle", usage => ["tell FILEHANDLE", "tell +"], }, telldir => { desc => "get current seekpointer +on a directory handle", usage => ["telldir DIRHANDLE"], }, truncate => { desc => "shorten a file", usage => ["truncate FILEHANDLE,LEN +GTH", "truncate EXPR,LENGTH"], }, warn => { desc => "print debugging info", us +age => ["warn LIST"] }, write => { desc => "print a picture record", usage => ["write FILEHANDLE", "wri +te EXPR", "write"], }, }, }, "LIST" => { desc => "Functions for list data", functions => { "grep" => { desc => "locate elements in a +list test true against a given criterion", usage => ["grep BLOCK LIST", "g +rep EXPR,LIST"], }, "join" => { desc => "join a list into a st +ring using a separator", usage => ["join EXPR,LIST"], }, "map" => { desc => "apply a change to a l +ist to get back a new list with the changes", usage => ["map BLOCK LIST", "ma +p EXPR,LIST"], }, "qw/STRING/" => { desc => "quote a list of words" +, usage => ["qw/STRING/"] }, "reverse" => { desc => "flip a string or a lis +t", usage => ["reverse LIST"] }, "sort" => { desc => "sort a list of values +", usage => ["sort SUBNAME LIST", +"sort BLOCK LIST", "sort LIST"], }, "unpack" => { desc => "convert binary struct +ure into normal perl variables", usage => ["unpack TEMPLATE,EXPR +", "unpack TEMPLATE"], }, }, }, "Math" => { desc => "Numeric functions", functions => { abs => { desc => "absolute value function", usa +ge => ["abs VALUE", "abs"] }, atan2 => { desc => "arctangent of Y/X in the ran +ge -PI to PI", usage => ["atan2 Y,X"], }, cos => { desc => "cosine function", usage => [" +cos EXPR", "cos"] }, exp => { desc => "raise I<e> to a power", usage + => ["exp EXPR", "exp"] }, hex => { desc => "convert a string to a hexade +cimal number", usage => ["hex EXPR", "hex"], }, int => { desc => "get the integer portion of a + number", usage => ["int EXPR", "int"], }, log => { desc => "retrieve the natural logarit +hm for a number", usage => ["log EXPR", "log"], }, oct => { desc => "convert a string to an octal + number", usage => ["oct EXPR", "oct"], }, rand => { desc => "retrieve the next pseudorand +om number", usage => ["rand EXPR", "rand"], }, sin => { desc => "return the sine of a number", + usage => ["sin EXPR", "sin"] }, sqrt => { desc => "square root function", usage +=> ["sqrt EXPR", "sqrt"] }, srand => { desc => "seed the random number gener +ator", usage => ["srand EXPR", "srand"], }, }, }, "Misc" => { desc => "Miscellaneous functions", functions => { defined => { desc => "test whether a value, va +riable, or function is defined", usage => ["defined EXPR", "defined +"], }, formline => { desc => "internal function used f +or formats", usage => ["formline PICTURE,LIST"] +, }, lock => { desc => "get a thread lock on a v +ariable, subroutine, or method", usage => ["lock THING"], }, prototype => { desc => "get the prototype (if an +y) of a subroutine", usage => ["prototype FUNCTION"], }, reset => { desc => "clear all variables of a + given name", usage => ["reset EXPR", "reset"], }, scalar => { desc => "force a scalar context", +usage => ["scalar EXPR"] }, undef => { desc => "remove a variable or fun +ction definition", usage => ["undef EXPR", "undef"], }, }, }, "Modules" => { desc => "Keywords related to Perl modules", functions => { do => { desc => "turn a BLOCK into a TERM", usage + => ["do BLOCK"] }, import => { desc => "patch a module's namespace into your +own", usage => ["import LIST"], }, no => { desc => "unimport some module symbols or seman +tics at compile time", usage => [ "no MODULE VERSION LIST", "no MODULE VERSION", "no MODULE LIST", "no MODULE", "no VERSION", ], }, package => { desc => "declare a separate global namespace", usage => [ "package NAMESPACE", "package NAMESPACE VERSION", "package NAMESPACE BLOCK", "package NAMESPACE VERSION BLOCK", ], }, require => { desc => "load in external functions from a lib +rary at runtime", usage => ["require VERSION", "require EXPR", "r +equire"], }, use => { desc => "load in a module at compile time and +import its namespace", usage => [ "use Module VERSION LIST", "use Module VERSION", "use Module LIST", "use Module", "use VERSION", ], }, }, }, "Namespace" => { desc => "Keywords related to scoping", functions => { caller => { desc => "get context of the current subroutine + call", usage => ["caller EXPR", "caller"], }, import => { desc => "patch a module's namespace into your +own", usage => ["import LIST"], }, local => { desc => "create a temporary value for a global + variable (dynamic scoping)", usage => ["local EXPR"], }, my => { desc => "declare and assign a local variable ( +lexical scoping)", usage => [ "my EXPR", "my TYPE EXPR", "my EXPR : ATTRS", "my TYPE EXPR : ATTRS", ], }, our => { desc => "declare and assign a package variable + (lexical scoping)", usage => [ "our EXPR", "our TYPE EXPR", "our EXPR : ATTRS", "our TYPE EXPR : ATTRS", ], }, package => { desc => "declare a separate global namespace", usage => [ "package NAMESPACE", "package NAMESPACE VERSION", "package NAMESPACE BLOCK", "package NAMESPACE VERSION BLOCK", ], }, state => { desc => "declare and assign a persistent lexic +al variable", usage => [ "state EXPR", "state TYPE EXPR", "state EXPR : ATTRS", "state TYPE EXPR : ATTRS", ], }, use => { desc => "load in a module at compile time and +import its namespace", usage => [ "use Module VERSION LIST", "use Module VERSION", "use Module LIST", "use Module", "use VERSION", ], }, }, }, "Network" => { desc => "Fetching network info", functions => { endprotoent => { desc => "be done using prot +ocols file", usage => ["endprotoent"] }, endservent => { desc => "be done using serv +ices file", usage => ["endservent"] }, gethostbyaddr => { desc => "get host record g +iven its address", usage => ["gethostbyaddr AD +DR,ADDRTYPE"], }, gethostbyname => { desc => "get host record g +iven name", usage => ["gethostbyname NA +ME"], }, gethostent => { desc => "get next hosts rec +ord", usage => ["gethostent"] }, getnetbyaddr => { desc => "get network recor +d given its address", usage => ["getnetbyaddr ADD +R,ADDRTYPE"], }, getnetbyname => { desc => "get networks reco +rd given name", usage => ["getnetbyname NAM +E"], }, getnetent => { desc => "get next networks +record", usage => ["getnetent"] }, getprotobyname => { desc => "get protocol reco +rd given name", usage => ["getprotobyname N +AME"], }, getprotobynumber => { desc => "get protocol reco +rd numeric protocol", usage => ["getprotobynumber + NUMBER"], }, getprotoent => { desc => "get next protocols + record", usage => ["getprotoent"] }, getservbyname => { desc => "get services reco +rd given its name", usage => ["getservbyname NA +ME,PROTO"], }, getservbyport => { desc => "get services reco +rd given numeric port", usage => ["getservbyport PO +RT,PROTO"], }, getservent => { desc => "get next services +record", usage => ["getservent"] }, sethostent => { desc => "prepare hosts fil +e for use", usage => ["sethostent STAYO +PEN"], }, setnetent => { desc => "prepare networks +file for use", usage => ["setnetent STAYOP +EN"], }, setprotoent => { desc => "prepare protocols + file for use", usage => ["setprotoent STAY +OPEN"], }, setservent => { desc => "prepare services +file for use", usage => ["setservent STAYO +PEN"], }, }, }, "Objects" => { desc => "Keywords related to classes and object-ori +entation", functions => { bless => { desc => "create an object", usage => ["bless REF,CLASSNAME", "b +less REF"], }, dbmclose => { desc => "breaks binding on a tied +dbm file", usage => ["dbmclose HASH"], }, dbmopen => { desc => "create binding on a tied +dbm file", usage => ["dbmopen HASH,DBNAME,MASK +"], }, package => { desc => "declare a separate global + namespace", usage => [ "package NAMESPACE", "package NAMESPACE VERSI +ON", "package NAMESPACE BLOCK +", "package NAMESPACE VERSI +ON BLOCK", ], }, ref => { desc => "find out the type of thin +g being referenced", usage => ["ref EXPR", "ref"], }, tie => { desc => "bind a variable to an obj +ect class", usage => ["tie VARIABLE,CLASSNAME,L +IST"], }, tied => { desc => "get a reference to the ob +ject underlying a tied variable", usage => ["tied VARIABLE"], }, untie => { desc => "break a tie binding to a +variable", usage => ["untie VARIABLE"], }, use => { desc => "load in a module at compi +le time and import its namespace", usage => [ "use Module VERSION LIST +", "use Module VERSION", "use Module LIST", "use Module", "use VERSION", ], }, }, }, "Process" => { desc => "Functions for processes and process groups +", functions => { "alarm" => { desc => "schedule a SIGALRM", +usage => ["alarm SECONDS", "alarm"] }, "exec" => { desc => "abandon this program + to run another", usage => ["exec LIST", "exec P +ROGRAM LIST"], }, "fork" => { desc => "create a new process + just like this one", usage => ["fork"], }, "getpgrp" => { desc => "get process group", u +sage => ["getpgrp PID"] }, "getppid" => { desc => "get parent process ID +", usage => ["getppid"] }, "getpriority" => { desc => "get current nice val +ue", usage => ["getpriority WHICH,W +HO"], }, "kill" => { desc => "send a signal to a p +rocess or process group", usage => ["kill SIGNAL, LIST", + "kill SIGNAL"], }, "pipe" => { desc => "open a pair of conne +cted filehandles", usage => ["pipe READHANDLE,WRI +TEHANDLE"], }, "qx/STRING/" => { desc => "backquote quote a str +ing", usage => ["qx/STRING/"] }, "readpipe" => { desc => "execute a system com +mand and collect standard output", usage => ["readpipe EXPR", "re +adpipe"], }, "setpgrp" => { desc => "set the process grou +p of a process", usage => ["setpgrp PID,PGRP"], }, "setpriority" => { desc => "set a process's nice + value", usage => ["setpriority WHICH,W +HO,PRIORITY"], }, "sleep" => { desc => "block for some numbe +r of seconds", usage => ["sleep EXPR", "sleep +"], }, "system" => { desc => "run a separate progr +am", usage => ["system LIST", "syst +em PROGRAM LIST"], }, "times" => { desc => "return elapsed time +for self and child processes", usage => ["times"], }, "wait" => { desc => "wait for any child pr +ocess to die", usage => ["wait"] }, "waitpid" => { desc => "wait for a particul +ar child process to die", usage => ["waitpid PID,FLAGS"] +, }, }, }, "Regexp" => { desc => "Regular expressions and pattern matching", functions => { "m//" => { desc => "match a string with a + regular expression pattern", usage => ["m/PATTERN/msixpodual +gc"], }, "pos" => { desc => "find or set the offse +t for the last/next m//g search", usage => ["pos SCALAR", "pos"], }, "qr/STRING/" => { desc => "compile pattern", usag +e => ["qr/STRING/msixpodual"] }, "quotemeta" => { desc => "quote regular express +ion magic characters", usage => ["quotemeta EXPR", "qu +otemeta"], }, "s///" => { desc => "replace a pattern with + a string", usage => [] }, "split" => { desc => "split up a string usi +ng a regexp delimiter", usage => [ "split /PATTERN/,EXP +R,LIMIT", "split /PATTERN/,EXP +R", "split /PATTERN/", "split", ], }, "study" => { desc => "optimize input data f +or repeated searches", usage => ["study SCALAR", "stud +y"], }, }, }, "Socket" => { desc => "Low-level socket functions", functions => { accept => { desc => "accept an incoming soc +ket connect", usage => ["accept NEWSOCKET,GENE +RICSOCKET"], }, bind => { desc => "binds an address to a +socket", usage => ["bind SOCKET,NAME"], }, connect => { desc => "connect to a remote so +cket", usage => ["connect SOCKET,NAME"] +, }, getpeername => { desc => "find the other end of +a socket connection", usage => ["getpeername SOCKET"], }, getsockname => { desc => "retrieve the sockaddr +for a given socket", usage => ["getsockname SOCKET"], }, getsockopt => { desc => "get socket options on +a given socket", usage => ["getsockopt SOCKET,LEV +EL,OPTNAME"], }, listen => { desc => "register your socket a +s a server", usage => ["listen SOCKET,QUEUESI +ZE"], }, recv => { desc => "receive a message over + a Socket", usage => ["recv SOCKET,SCALAR,LE +NGTH,FLAGS"], }, send => { desc => "send a message over a +socket", usage => ["send SOCKET,MSG,FLAGS +,TO", "send SOCKET,MSG,FLAGS"], }, setsockopt => { desc => "set some socket option +s", usage => ["setsockopt SOCKET,LEV +EL,OPTNAME,OPTVAL"], }, shutdown => { desc => "close down just half o +f a socket connection", usage => ["shutdown SOCKET,HOW"] +, }, socket => { desc => "create a socket", usage => ["socket SOCKET,DOMAIN, +TYPE,PROTOCOL"], }, socketpair => { desc => "create a pair of socke +ts", usage => ["socketpair SOCKET1,SO +CKET2,DOMAIN,TYPE,PROTOCOL"], }, }, }, "String" => { desc => "Functions for SCALARs or strings", functions => { "chomp" => { desc => "remove a trailing rec +ord separator from a string", usage => ["chomp VARIABLE", "ch +omp( LIST )", "chomp"], }, "chop" => { desc => "remove the last chara +cter from a string", usage => ["chop VARIABLE", "cho +p( LIST )", "chop"], }, "chr" => { desc => "get character this nu +mber represents", usage => ["chr NUMBER", "chr"], }, "crypt" => { desc => "one-way passwd-style +encryption", usage => ["crypt PLAINTEXT,SALT +"], }, "fc" => { desc => "return casefolded ver +sion of a string", usage => ["fc EXPR", "fc"], }, "hex" => { desc => "convert a string to a + hexadecimal number", usage => ["hex EXPR", "hex"], }, "index" => { desc => "find a substring with +in a string", usage => ["index STR,SUBSTR,POS +ITION", "index STR,SUBSTR"], }, "lc" => { desc => "return lower-case ver +sion of a string", usage => ["lc EXPR", "lc"], }, "lcfirst" => { desc => "return a string with +just the next letter in lower case", usage => ["lcfirst EXPR", "lcfi +rst"], }, "length" => { desc => "return the number of +bytes in a string", usage => ["length EXPR", "lengt +h"], }, "oct" => { desc => "convert a string to a +n octal number", usage => ["oct EXPR", "oct"], }, "ord" => { desc => "find a character's nu +meric representation", usage => ["ord EXPR", "ord"], }, "pack" => { desc => "convert a list into a + binary representation", usage => ["pack TEMPLATE,LIST"] +, }, "q/STRING/" => { desc => "singly quote a string" +, usage => ["q/STRING/"] }, "qq/STRING/" => { desc => "doubly quote a string" +, usage => ["qq/STRING/"] }, "reverse" => { desc => "flip a string or a lis +t", usage => ["reverse LIST"] }, "rindex" => { desc => "right-to-left substri +ng search", usage => ["rindex STR,SUBSTR,PO +SITION", "rindex STR,SUBSTR"], }, "sprintf" => { desc => "formatted print into +a string", usage => ["sprintf FORMAT, LIST +"], }, "substr" => { desc => "get or alter a portio +n of a string", usage => [ "substr EXPR,OFFSET, +LENGTH,REPLACEMENT", "substr EXPR,OFFSET, +LENGTH", "substr EXPR,OFFSET" +, ], }, "tr///" => { desc => "transliterate a strin +g", usage => ["tr/SEARCHLIST/REPLAC +EMENTLIST/cdsr"], }, "uc" => { desc => "return upper-case ver +sion of a string", usage => ["uc EXPR", "uc"], }, "ucfirst" => { desc => "return a string with +just the next letter in upper case", usage => ["ucfirst EXPR", "ucfi +rst"], }, "y///" => { desc => "transliterate a strin +g", usage => ["tr/SEARCHLIST/REPLAC +EMENTLIST/cdsr"], }, }, }, "SysV" => { desc => "System V interprocess communication functi +ons", functions => { msgctl => { desc => "SysV IPC message control +operations", usage => ["msgctl ID,CMD,ARG"], }, msgget => { desc => "get SysV IPC message queue +", usage => ["msgget KEY,FLAGS"] }, msgrcv => { desc => "receive a SysV IPC messag +e from a message queue", usage => ["msgrcv ID,VAR,SIZE,TYPE, +FLAGS"], }, msgsnd => { desc => "send a SysV IPC message t +o a message queue", usage => ["msgsnd ID,MSG,FLAGS"], }, semctl => { desc => "SysV semaphore control op +erations", usage => ["semctl ID,SEMNUM,CMD,ARG +"], }, semget => { desc => "get set of SysV semaphore +s", usage => ["semget KEY,NSEMS,FLAGS"] +, }, semop => { desc => "SysV semaphore operations +", usage => ["semop KEY,OPSTRING"], }, shmctl => { desc => "SysV shared memory operat +ions", usage => ["shmctl ID,CMD,ARG"], }, shmget => { desc => "get SysV shared memory se +gment identifier", usage => ["shmget KEY,SIZE,FLAGS"], }, shmread => { desc => "read SysV shared memory", usage => ["shmread ID,VAR,POS,SIZE" +], }, shmwrite => { desc => "write SysV shared memory" +, usage => ["shmwrite ID,STRING,POS,S +IZE"], }, }, }, "Time" => { desc => "Time-related functions", functions => { gmtime => { desc => "convert UNIX time into r +ecord or string using Greenwich time", usage => ["gmtime EXPR", "gmtime"] +, }, localtime => { desc => "convert UNIX time into r +ecord or string using local time", usage => ["localtime EXPR", "local +time"], }, time => { desc => "return number of seconds +since 1970", usage => ["time"] }, times => { desc => "return elapsed time for +self and child processes", usage => ["times"], }, }, }, "User" => { desc => "Fetching user and group info", functions => { endgrent => { desc => "be done using group file +", usage => ["endgrent"] }, endhostent => { desc => "be done using hosts file +", usage => ["endhostent"] }, endnetent => { desc => "be done using networks f +ile", usage => ["endnetent"] }, endpwent => { desc => "be done using passwd fil +e", usage => ["endpwent"] }, getgrent => { desc => "get next group record", +usage => ["getgrent"] }, getgrgid => { desc => "get group record given +group user ID", usage => ["getgrgid GID"], }, getgrnam => { desc => "get group record given +group name", usage => ["getgrnam NAME"], }, getlogin => { desc => "return who logged in at +this tty", usage => ["getlogin"] }, getpwent => { desc => "get next passwd record", + usage => ["getpwent"] }, getpwnam => { desc => "get passwd record given + user login name", usage => ["getpwnam NAME"], }, getpwuid => { desc => "get passwd record given + user ID", usage => ["getpwuid UID"], }, setgrent => { desc => "prepare group file for u +se", usage => ["setgrent"] }, setpwent => { desc => "prepare passwd file for +use", usage => ["setpwent"] }, }, }, }

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^2: POD: getting usage snippets from perldoc
by huck (Prior) on Mar 24, 2018 at 17:15 UTC

    Very nice, Thanks!

    Too bad it had to wrap

        Thanks again, much nicer here on the website!