## C.35. `$world->gethooknumber`

Abstract

$world->gethooknumber function: GETs a HOOK's NUMBER

`@list = $world->gethooknumber(` | `event` ,
| `name` `)`;

Returns a list with the number(s) of the hook(s) matching the given name. If no hook with that name is found, returns an empty list. If there are several hooks with the same name, returns the numbers of all of them. You must specify the event in which to search for the hook.

The number of a hook is necessary to edit it. However, as the user can change the order of hooks, create new ones and delete old hooks, a hook's number may change, so you should not store its number; you must fetch the number just before editing it.