gt

gt These operators are documented in perlop.

goto

goto LABEL goto EXPR goto &NAME The goto LABEL form finds the statement labeled with LABEL and resumes execution there. It can't be used to get out of a block or subroutine given to sort. It can be used to go almost anywhere else within the dynamic scope, including out of subroutines, but it's usually better to use some other construct such as last or die. The author of Perl has never felt the need to use this form of goto (in Perl, that is; C is another matter). (The difference is that C d

grep

grep BLOCK LIST grep EXPR,LIST This is similar in spirit to, but not the same as, grep(1) and its relatives. In particular, it is not limited to using regular expressions. Evaluates the BLOCK or EXPR for each element of LIST (locally setting $_ to each element) and returns the list value consisting of those elements for which the expression evaluated to true. In scalar context, returns the number of times the expression was true. @foo = grep(!/^#/, @bar); # weed out comments or equivalently

Gory details of parsing quoted constructs

Gory details of parsing quoted constructs When presented with something that might have several different interpretations, Perl uses the DWIM (that's "Do What I Mean") principle to pick the most probable interpretation. This strategy is so successful that Perl programmers often do not suspect the ambivalence of what they write. But from time to time, Perl's notions differ substantially from what the author honestly meant. This section hopes to clarify how Perl handles quoted constructs. Althou

gmtime

gmtime EXPR gmtime Works just like localtime but the returned values are localized for the standard Greenwich time zone. Note: When called in list context, $isdst, the last value returned by gmtime, is always 0 . There is no Daylight Saving Time in GMT. Portability issues: gmtime in perlport.

glob

glob EXPR glob In list context, returns a (possibly empty) list of filename expansions on the value of EXPR such as the standard Unix shell /bin/csh would do. In scalar context, glob iterates through such filename expansions, returning undef when the list is exhausted. This is the internal function implementing the <*.c> operator, but you can use it directly. If EXPR is omitted, $_ is used. The <*.c> operator is discussed in more detail in I/O Operators in perlop. Note that glob spl

given

given These flow-control keywords related to the experimental switch feature are documented in Switch Statements in perlsyn.

getpwent

getpwent

getservent

getservent

getsockopt

getsockopt SOCKET,LEVEL,OPTNAME Queries the option named OPTNAME associated with SOCKET at a given LEVEL. Options may exist at multiple protocol levels depending on the socket type, but at least the uppermost socket level SOL_SOCKET (defined in the Socket module) will exist. To query options at another level the protocol number of the appropriate protocol controlling the option should be supplied. For example, to indicate that an option is to be interpreted by the TCP protocol, LEVEL should be