/Users/andrea/_magisterarbeit/korpus/clean/testkorpus/32/file2.html NN ----------------------------------------- : NAME NN perlfunc NN Perl NP builtin JJ functions NNS DESCRIPTION NN The DT functions NNS in IN this DT section NN can MD serve VV as IN terms NNS in IN an DT expression NN . SENT They PP fall VVP into IN two CD major JJ categories NNS . SENT list NN operators NNS and CC named VVN unary JJ operators NNS . SENT These DT differ VVP in IN their PP$ precedence NN relationship NN with IN a DT following VVG comma NN . SENT See VV the DT precedence NN table NN in IN the DT perlop NN manpage NN . SENT List NN operators NNS take VVP more JJR than IN one CD argument NN , , while IN unary JJ operators NNS can MD never RB take VV more JJR than IN one CD argument NN . SENT Thus RB , , a DT comma NN terminates VVZ the DT argument NN of IN a DT unary JJ operator NN , , but CC merely RB separates VVZ the DT arguments NNS of IN a DT list NN operator NN . SENT A DT unary JJ operator NN generally RB provides VVZ a DT scalar JJ context NN to TO its PP$ argument NN , , while IN a DT list NN operator NN may MD provide VV either DT scalar NN and CC list NN contexts NNS for IN its PP$ arguments NNS . SENT If IN it PP does VVZ both DT , , the DT scalar JJ arguments NNS will MD be VB first JJ , , and CC the DT list NN argument NN will MD follow VV . SENT Note NN that IN there EX can MD only RB ever RB be VB one CD list NN argument NN . SENT For IN instance NN , , splice NN has VHZ three CD scalar JJ arguments NNS followed VVN by IN a DT list NN . SENT In IN the DT syntax NN descriptions NNS that WDT follow VVP , , list NN operators NNS that WDT expect VVP a DT list NN and CC provide VV list NN context NN for IN the DT elements NNS of IN the DT list NN are VBP shown VVN with IN LIST NN as IN an DT argument NN . SENT Such PDT a DT list NN may MD consist VV of IN any DT combination NN of IN scalar JJ arguments NNS or CC list NN values NNS . SENT the DT list NN values NNS will MD be VB included VVN in IN the DT list NN as IN if IN each DT individual JJ element NN were VBD interpolated VVN at IN that DT point NN in IN the DT list NN , , forming VVG a DT longer RBR single JJ dimensional JJ list NN value NN . SENT Elements NNS of IN the DT LIST NN should MD be VB separated VVN by IN commas NNS . SENT Any DT function NN in IN the DT list NN below RB may MD be VB used VVN either RB with IN or CC without IN parentheses NNS around IN its PP$ arguments NNS . SENT The DT syntax NN descriptions NNS omit VVP the DT parens NNS . SENT If IN you PP use VVP the DT parens NNS , , the DT simple JJ but CC occasionally RB surprising JJ rule NN is VBZ this DT . SENT It PP LOOKS VVZ like IN a DT function NN , , therefore RB it PP IS VBZ a DT function NN , , and CC precedence NN doesn't NN matter NN . SENT Otherwise RB it's NNS a DT list NN operator NN or CC unary JJ operator NN , , and CC precedence NN does VVZ matter NN . SENT And CC whitespace NN between IN the DT function NN and CC left JJ parenthesis NN doesn't NN count NN so IN you PP need VVP to TO be VB careful JJ sometimes RB . SENT print NN 1 CD 2 CD 3 CD . SENT Prints NNS 6 CD . SENT print NN 1 CD 2 CD 3 CD . SENT Prints NNS 3 CD . SENT print NN 1 CD 2 CD 3 CD . SENT Also RB prints VVZ 3 CD . SENT print NN 1 CD 2 CD 3 CD . SENT Prints NNS 6 CD . SENT print NN 1 CD 2 CD 3 CD . SENT Prints NNS 6 CD . SENT If IN you PP run VVP Perl NP with IN the DT w NN switch NN it PP can MD warn VV you PP about IN this DT . SENT For IN example NN , , the DT third JJ line NN above RB produces VVZ . SENT print NN . SENT . SENT . SENT interpreted VVN as IN function NN at IN line NN 1 CD . SENT Useless JJ use NN of IN integer NN addition NN in IN void JJ context NN at IN line NN 1 CD . SENT For IN functions NNS that WDT can MD be VB used VVN in IN either CC a DT scalar NN or CC list NN context NN , , non JJ abortive JJ failure NN is VBZ generally RB indicated VVN in IN a DT scalar JJ context NN by IN returning VVG the DT undefined JJ value NN , , and CC in IN a DT list NN context NN by IN returning VVG the DT null JJ list NN . SENT Remember VV the DT following VVG rule NN . SENT THERE EX IS VBZ NO DT GENERAL NP RULE NN FOR IN CONVERTING VVG A DT LIST NN INTO IN A DT SCALAR NN . SENT Each DT operator NN and CC function NN decides VVZ which WDT sort NN of IN value NN it PP would MD be VB most JJS . SENT appropriate JJ to TO return VV in IN a DT scalar JJ context NN . SENT Some DT operators NNS return VVP the DT length NN of IN the DT list NN that WDT would MD have VH been VBN returned VVN in IN a DT list NN context NN . SENT Some DT operators NNS return VVP the DT first JJ value NN in IN the DT list NN . SENT Some DT operators NNS return VVP the DT last JJ value NN in IN the DT list NN . SENT Some DT operators NNS return VVP a DT count NN of IN successful JJ operations NNS . SENT In IN general JJ , , they PP do VVP what WP you PP want VVP , , unless IN you PP want VVP consistency NN . SENT Perl NP Functions NNS by IN Category NN Here RB are VBP Perl's NP functions NNS including VVG things NNS that WDT look VVP like IN functions NNS , , like IN some DT of IN the DT keywords NNS and CC named VVN operators NNS arranged VVN by IN category NN . SENT Some DT functions NNS appear VVP in IN more JJR than IN one CD place NN . SENT Functions NNS for IN SCALARs NNS or CC strings NNS chomp NN , , chop VV , , chr NP , , crypt NN , , hex NN , , index NN , , lc NN , , lcfirst NP , , length NN , , oct NP , , ord NP , , pack NN , , q NN STRING NN , , qq JJ STRING NN , , reverse RB , , rindex NP , , sprintf NN , , substr NP , , tr NP , , uc NN , , ucfirst NP , , y NP Regular JJ expressions NNS and CC pattern NN matching NN m NN , , pos NNS , , quotemeta NN , , s PP , , split VV , , study VV Numeric JJ functions NNS abs NP , , atan NP 2 CD , , cos NN , , exp NN , , hex NN , , int NP , , log NN , , oct NP , , rand NN , , sin NN , , sqrt NN , , srand NN Functions NNS for IN real JJ ARRAYs NNS pop VVP , , push VV , , shift VV , , splice VV , , unshift NN Functions NNS for IN list NN data NNS grep NN , , join VV , , map VV , , qw JJ STRING NN , , reverse VV , , sort VV , , unpack VV Functions NNS for IN real JJ HASHes NNS delete VV , , each DT , , exists VVZ , , keys NNS , , values NNS Input NN and CC output NN functions NNS binmode NN , , close RB , , closedir NP , , dbmclose NP , , dbmopen NP , , die VVP , , eof JJ , , fileno NN , , flock NN , , format NN , , getc NN , , print NN , , printf NN , , read VV , , readdir NP , , rewinddir NN , , seek VV , , seekdir NN , , select VV , , syscall NP , , sysread NN , , syswrite NN , , tell VV , , telldir NN , , truncate VV , , warn VV , , write VV Functions NNS for IN fixed JJ length NN data NNS or CC records NNS pack VVP , , read VVP , , syscall NP , , sysread NN , , syswrite NN , , unpack VV , , vec JJ Functions NNS for IN filehandles NNS , , files NNS , , or CC directories NNS X NN , , chdir NP , , chmod NN , , chown NN , , chroot NN , , fcntl NN , , glob NN , , ioctl NP , , link NN , , lstat NN , , mkdir NN , , open RB , , opendir NP , , readlink NN , , rename VV , , rmdir NP , , stat NN , , symlink NP , , umask NN , , unlink NP , , utime NN Keywords NNS related VVN to TO the DT control NN flow NN of IN your PP$ perl NP program NN caller NN , , continue VV , , die VV , , do VV , , dump VV , , eval NN , , exit NN , , goto NP , , last JJ , , next JJ , , redo VV , , return VV , , sub VV , , wantarray NN Keywords NNS related VVN to TO scoping VVG caller NN , , import NN , , local JJ , , my PP$ , , package VV , , use VV Miscellaneous JJ functions NNS defined VVN , , dump VV , , eval JJ , , formline JJ , , local JJ , , my PP$ , , reset VV , , scalar JJ , , undef JJ , , wantarray NN Functions NNS for IN processes NNS and CC process NN groups NNS alarm NN , , exec NP , , fork VV , , getpgrp NP , , getppid NN , , getpriority NN , , kill VV , , pipe NN , , qx NN STRING NN , , setpgrp NP , , setpriority NN , , sleep NN , , system NN , , times NNS , , wait VV , , waitpid JJ Keywords NNS related VVN to TO perl NP modules NNS do VVP , , import VV , , no UH , , package NN , , require VV , , use VV Keywords NNS related VVN to TO classes NNS and CC object NN orientedness NN bless VV , , dbmclose NP , , dbmopen NP , , package NN , , ref NN , , tie NN , , tied VVN , , untie VV , , use VV Low NP level NN socket NN functions NNS accept VVP , , bind NN , , connect VVP , , getpeername JJ , , getsockname JJ , , getsockopt JJ , , listen VV , , recv NP , , send VV , , setsockopt NN , , shutdown NN , , socket NN , , socketpair JJ System NP V NN interprocess NN communication NN functions NNS msgctl NN , , msgget NN , , msgrcv NP , , msgsnd NP , , semctl NP , , semget NN , , semop NN , , shmctl NP , , shmget NN , , shmread NN , , shmwrite JJ Fetching VVG user NN and CC group NN info NN endgrent NN , , endhostent JJ , , endnetent JJ , , endpwent NN , , getgrent NN , , getgrgid NN , , getgrnam NP , , getlogin NP , , getpwent NN , , getpwnam NP , , getpwuid NN , , setgrent JJ , , setpwent JJ Fetching VVG network NN info NN endprotoent NN , , endservent NN , , gethostbyaddr NP , , gethostbyname NN , , gethostent NN , , getnetbyaddr NP , , getnetbyname NN , , getnetent NN , , getprotobyname NN , , getprotobynumber NN , , getprotoent NN , , getservbyname NN , , getservbyport NN , , getservent JJ , , sethostent JJ , , setnetent JJ , , setprotoent JJ , , setservent JJ Time NP related JJ functions NNS gmtime NN , , localtime NN , , time NN , , times NNS Functions NNS new JJ in IN perl NP 5 CD abs NP , , bless VV , , chomp VV , , chr NP , , exists VVZ , , formline NN , , glob NN , , import NN , , lc NN , , lcfirst NP , , map NN , , my PP$ , , no UH , , qx NP , , qw NP , , ref NN , , sub NN , , sysopen NP , , tie NN , , tied VVN , , uc NN , , ucfirst NN , , untie VV , , use NN sub NN was VBD a DT keyword NN in IN perl NP 4 CD , , but CC in IN perl NP 5 CD it PP is VBZ an DT operator NN which WDT can MD be VB used VVN in IN expressions NNS . SENT Functions NNS obsoleted VVN in IN perl NP 5 CD dbmclose NN , , dbmopen NP . SENT Alphabetical JJ Listing NN of IN Perl NP Functions NNS X NP FILEHANDLE NP X NP EXPR NP X NP A DT file NN test NN , , where WRB X NP is VBZ one CD of IN the DT letters NNS listed VVN below IN . SENT This DT unary JJ operator NN takes VVZ one CD argument NN , , either CC a DT filename NN or CC a DT filehandle NN , , and CC tests VVZ the DT associated VVN file NN to TO see VV if IN something NN is VBZ true JJ about IN it PP . SENT If IN the DT argument NN is VBZ omitted VVN , , tests NNS , , except IN for IN t NN , , which WDT tests VVZ STDIN NP . SENT Unless IN otherwise RB documented VVN , , it PP returns VVZ 1 CD for IN TRUE JJ and CC for IN FALSE JJ , , or CC the DT undefined JJ value NN if IN the DT file NN doesn't NN exist VVP . SENT Despite IN the DT funny JJ names NNS , , precedence NN is VBZ the DT same JJ as IN any DT other JJ named VVN unary JJ operator NN , , and CC the DT argument NN may MD be VB parenthesized VVN like IN any DT other JJ unary JJ operator NN . SENT The DT operator NN may MD be VB any DT of IN . SENT r SYM File NP is VBZ readable JJ by IN effective JJ uid NN gid NN . SENT w NN File NP is VBZ writable JJ by IN effective JJ uid NN gid NN . SENT x SYM File NP is VBZ executable JJ by IN effective JJ uid NN gid NN . SENT o NN File NP is VBZ owned VVN by IN effective JJ uid NN . SENT R NP File NP is VBZ readable JJ by IN real JJ uid NN gid NN . SENT W NP File NP is VBZ writable JJ by IN real JJ uid NN gid NN . SENT X NP File NP is VBZ executable JJ by IN real JJ uid NN gid NN . SENT O NP File NP is VBZ owned VVN by IN real JJ uid NN . SENT e SYM File NP exists VVZ . SENT z SYM File NP has VHZ zero CD size NN . SENT s PP File NP has VHZ non JJ zero NN size NN returns NNS size NN . SENT f SYM File NP is VBZ a DT plain JJ file NN . SENT d SYM File NP is VBZ a DT directory NN . SENT l NN File NP is VBZ a DT symbolic JJ link NN . SENT p NN File NP is VBZ a DT named VVN pipe NN FIFO NP . SENT S NP File NP is VBZ a DT socket NN . SENT b SYM File NP is VBZ a DT block NN special JJ file NN . SENT c SYM File NP is VBZ a DT character NN special JJ file NN . SENT t NN Filehandle NN is VBZ opened VVN to TO a DT tty NN . SENT u NN File NP has VHZ setuid JJ bit NN set NN . SENT g NN File NP has VHZ setgid JJ bit NN set NN . SENT k NN File NP has VHZ sticky JJ bit NN set NN . SENT T NN File NP is VBZ a DT text NN file NN . SENT B NP File NP is VBZ a DT binary JJ file NN opposite NN of IN T NN . SENT M NP Age NP of IN file NN in IN days NNS when WRB script NN started VVD . SENT A DT Same JJ for IN access NN time NN . SENT C SYM Same JJ for IN inode NN change NN time NN . SENT The DT interpretation NN of IN the DT file NN permission NN operators NNS r NN , , R NP , , w NN , , W NP , , x NN and CC X NN is VBZ based VVN solely RB on IN the DT mode NN of IN the DT file NN and CC the DT uids NNS and CC gids NNS of IN the DT user NN . SENT There EX may MD be VB other JJ reasons NNS you PP can't VVD actually RB read VV , , write VV or CC execute VV the DT file NN . SENT Also RB note NN that IN , , for IN the DT superuser JJR , , r NN , , R NP , , w NN and CC W NP always RB return VVP 1 CD , , and CC x NN and CC X NN return NN 1 CD if IN any DT execute VVP bit NN is VBZ set VVN in IN the DT mode NN . SENT Scripts NNS run VVP by IN the DT superuser NN may MD thus RB need VV to TO do VV a DT stat NN in IN order NN to TO determine VV the DT actual JJ mode NN of IN the DT file NN , , or CC temporarily RB set VVD the DT uid NN to TO something NN else RB . SENT Example NN . SENT while IN chop VV . SENT next JJ unless IN f NN . SENT ignore VV specials NNS . SENT . SENT . SENT Note NN that IN s PP a DT b NN does VVZ not RB do VV a DT negated VVN substitution NN . SENT Saying VVG exp NP foo NP still RB works VVZ as IN expected VVN , , however RB only RB single JJ letters NNS following VVG a DT minus NN are VBP interpreted VVN as IN file NN tests NNS . SENT The DT T NN and CC B NN switches NNS work NN as RB follows VVZ . SENT The DT first JJ block NN or CC so RB of IN the DT file NN is VBZ examined VVN for IN odd JJ characters NNS such JJ as IN strange JJ control NN codes NNS or CC characters NNS with IN the DT high JJ bit NN set NN . SENT If IN too RB many JJ odd JJ characters NNS 30 RB are VBP found VVN , , it's NNS a DT B NN file NN , , otherwise RB it's NNS a DT T NN file NN . SENT Also RB , , any DT file NN containing VVG null NN in IN the DT first JJ block NN is VBZ considered VVN a DT binary JJ file NN . SENT If IN T NN or CC B NP is VBZ used VVN on IN a DT filehandle NN , , the DT current JJ stdio NN buffer NN is VBZ examined VVN rather RB than IN the DT first JJ block NN . SENT Both DT T NN and CC B NN return NN TRUE JJ on IN a DT null JJ file NN , , or CC a DT file NN at IN EOF NP when WRB testing VVG a DT filehandle NN . SENT Because IN you PP have VHP to TO read VV a DT file NN to TO do VV the DT T NN test NN , , on IN most JJS occasions NNS you PP want VVP to TO use VV a DT f NN against IN the DT file NN first JJ , , as RB in IN next JJ unless IN f NN file NN T NN file NN . SENT If IN any DT of IN the DT file NN tests NNS or CC either RB the DT stat NN or CC lstat NN operators NNS are VBP given VVN the DT special JJ filehandle NN consisting VVG of IN a DT solitary JJ underline VV , , then RB the DT stat NN structure NN of IN the DT previous JJ file NN test NN or CC stat NN operator NN is VBZ used VVN , , saving VVG a DT system NN call NN . SENT This DT doesn't JJ work NN with IN t NN , , and CC you PP need VVP to TO remember VV that DT lstat NN and CC l NN will MD leave VV values NNS in IN the DT stat NN structure NN for IN the DT symbolic JJ link NN , , not RB the DT real JJ file NN . SENT Example NN . SENT print NN Can MD do VV . SENT n NN if IN r NN a DT w NN x SYM . SENT stat NN filename NN . SENT print VV Readable JJ n NN if IN r NN . SENT print VV Writable JJ n NN if IN w NN . SENT print VV Executable JJ n NN if IN x NN . SENT print NN Setuid NN n NN if IN u NN . SENT print NN Setgid NN n NN if IN g NN . SENT print VV Sticky JJ n NN if IN k NN . SENT print NN Text NN n NN if IN T NN . SENT print NN Binary NN n NN if IN B NP . SENT abs NP VALUE NN Returns VVZ the DT absolute JJ value NN of IN its PP$ argument NN . SENT accept VV NEWSOCKET NP , , GENERICSOCKET NP Accepts VVZ an DT incoming JJ socket NN connect VVP , , just RB as IN the DT accept VVP 2 CD system NN call NN does VVZ . SENT Returns VVZ the DT packed JJ address NN if IN it PP succeeded VVD , , FALSE JJ otherwise RB . SENT See VV example NN in IN Sockets NNS . SENT Client NN Server NP Communication NP . SENT alarm NN SECONDS NNS Arranges VVZ to TO have VH a DT SIGALRM NN delivered VVN to TO this DT process NN after IN the DT specified JJ number NN of IN seconds NNS have VHP elapsed VVN . SENT On IN some DT machines NNS , , unfortunately RB , , the DT elapsed VVN time NN may MD be VB up RB to TO one CD second NN less JJR than IN you PP specified VVD because RB of IN how WRB seconds NNS are VBP counted VVN . SENT Only RB one CD timer NN may MD be VB counting VVG at IN once RB . SENT Each DT call NN disables VVZ the DT previous JJ timer NN , , and CC an DT argument NN of IN 0 CD may MD be VB supplied VVN to TO cancel VV the DT previous JJ timer NN without IN starting VVG a DT new JJ one CD . SENT The DT returned VVN value NN is VBZ the DT amount NN of IN time NN remaining VVG on IN the DT previous JJ timer NN . SENT For IN delays NNS of IN finer JJR granularity NN than IN one CD second NN , , you PP may MD use VV Perl's NP syscall NN interface NN to TO access NN setitimer NN 2 CD if IN your PP$ system NN supports VVZ it PP , , or CC else RB see VVP select VV below RB . SENT It PP is VBZ not RB advised VVN to TO intermix VV alarm NN and CC sleep NN calls NNS . SENT atan NN 2 CD Y NN , , X NP Returns VVZ the DT arctangent NN of IN Y NP X NP in IN the DT range NN PI NN to TO PI NN . SENT bind NN SOCKET NN , , NAME NN Binds VVZ a DT network NN address NN to TO a DT socket NN , , just RB as IN the DT bind NN system NN call NN does VVZ . SENT Returns NNS TRUE JJ if IN it PP succeeded VVD , , FALSE JJ otherwise RB . SENT NAME NN should MD be VB a DT packed JJ address NN of IN the DT appropriate JJ type NN for IN the DT socket NN . SENT See VV the DT examples NNS in IN Sockets NNS . SENT Client NN Server NP Communication NP . SENT binmode NP FILEHANDLE NP Arranges VVZ for IN the DT file NN to TO be VB read VVN or CC written VVN in IN binary JJ mode NN in IN operating VVG systems NNS that WDT distinguish VV between IN binary NN and CC text NN files NNS . SENT Files NNS that WDT are VBP not RB in IN binary JJ mode NN have VHP CR NN LF NP sequences NNS translated VVN to TO LF NP on IN input NN and CC LF NP translated VVN to TO CR NN LF NP on IN output NN . SENT Binmode NP has VHZ no DT effect NN under IN Unix NP . SENT in IN DOS NNS and CC similarly RB archaic JJ systems NNS , , it PP may MD be VB imperative JJ otherwise RB your PP$ DOS NNS damaged VVN C NP library NN may MD mangle VV your PP$ file NN . SENT The DT key JJ distinction NN between IN systems NNS that WDT need VVP binmode NN and CC those DT that WDT don't NN is VBZ their PP$ text NN file NN formats NNS . SENT Systems NNS like IN Unix NP and CC Plan NP 9 CD that WDT delimit VV lines NNS with IN a DT single JJ character NN , , and CC that IN encode VV that DT character NN in IN C NP as IN n NN , , do VVP not RB need VV binmode NN . SENT The DT rest NN need VVP it PP . SENT If IN FILEHANDLE NP is VBZ an DT expression NN , , the DT value NN is VBZ taken VVN as IN the DT name NN of IN the DT filehandle NN . SENT bless VV REF NN , , CLASSNAME NP bless VV REF NN This DT function NN tells VVZ the DT referenced VVN object NN passed VVN as IN REF NN that IN it PP is VBZ now RB an DT object NN in IN the DT CLASSNAME NP package NN or CC the DT current JJ package NN if IN no DT CLASSNAME NP is VBZ specified VVN , , which WDT is VBZ often RB the DT case NN . SENT It PP returns VVZ the DT reference NN for IN convenience NN , , since IN a DT bless VV is VBZ often RB the DT last JJ thing NN in IN a DT constructor NN . SENT Always RB use VV the DT two CD argument NN version NN if IN the DT function NN doing VVG the DT blessing NN might MD be VB inherited VVN by IN a DT derived VVN class NN . SENT See VV the DT perlobj NN manpage NN for IN more JJR about IN the DT blessing NN and CC blessings NNS of IN objects NNS . SENT caller NN EXPR NP caller NN Returns VVZ the DT context NN of IN the DT current JJ subroutine NN call NN . SENT In IN a DT scalar JJ context NN , , returns NNS TRUE JJ if IN there EX is VBZ a DT caller NN , , that WDT is VBZ , , if IN we're NN in IN a DT subroutine NN or CC eval NN or CC require VV , , and CC FALSE JJ otherwise RB . SENT In IN a DT list NN context NN , , returns NNS package NN , , filename NN , , line NN caller NN . SENT With IN EXPR NP , , it PP returns VVZ some DT extra JJ information NN that IN the DT debugger NN uses VVZ to TO print VV a DT stack VV trace VV . SENT The DT value NN of IN EXPR NP indicates VVZ how WRB many JJ call NN frames NNS to TO go VV back RB before IN the DT current JJ one CD . SENT package NN , , filename NN , , line NN , , subroutine NN , , hasargs NNS , , wantargs NNS caller NN i NP . SENT Furthermore RB , , when WRB called VVN from IN within IN the DT DB NP package NN , , caller NN returns NNS more RBR detailed JJ information NN . SENT it PP sets VVZ the DT list NN variable JJ DB NP . SENT . SENT args NNS to TO be VB the DT arguments NNS with IN which WDT that DT subroutine NN was VBD invoked VVN . SENT chdir NP EXPR NP Changes NP the DT working VVG directory NN to TO EXPR NP , , if IN possible JJ . SENT If IN EXPR NP is VBZ omitted VVN , , changes NNS to TO home NN directory NN . SENT Returns NNS TRUE JJ upon IN success NN , , FALSE JJ otherwise RB . SENT See VV example NN under IN die NN . SENT chmod JJ LIST NN Changes NP the DT permissions NNS of IN a DT list NN of IN files NNS . SENT The DT first JJ element NN of IN the DT list NN must MD be VB the DT numerical JJ mode NN , , which WDT should MD probably RB be VB an DT octal NN number NN . SENT Returns VVZ the DT number NN of IN files NNS successfully RB changed VVN . SENT cnt NN chmod NN 0755 CD , , foo NP , , bar NN . SENT chmod NN 0755 CD , , executables NNS . SENT chomp VV VARIABLE JJ chomp NN LIST NN chomp VV This DT is VBZ a DT slightly RB safer JJR version NN of IN chop VV see VV below RB . SENT It PP removes VVZ any DT line NN ending NN that WDT corresponds VVZ to TO the DT current JJ value NN of IN also RB known VVN as IN INPUT NN RECORD NN SEPARATOR NN in IN the DT English JJ module NN . SENT It PP returns VVZ the DT number NN of IN characters NNS removed VVN . SENT It's NP often RB used VVD to TO remove VV the DT newline NN from IN the DT end NN of IN an DT input NN record NN when WRB you're NNS worried VVN that IN the DT final JJ record NN may MD be VB missing VVG its PP$ newline NN . SENT When WRB in IN paragraph NN mode NN , , it PP removes VVZ all DT trailing VVG newlines NNS from IN the DT string NN . SENT If IN VARIABLE NN is VBZ omitted VVN , , it PP chomps VVZ . SENT Example NN . SENT while IN chomp NN . SENT avoid VV n NN on IN last JJ field NN array NN split NN . SENT . SENT . SENT . SENT . SENT You PP can MD actually RB chomp VV anything NN that's NNS an DT lvalue NN , , including VVG an DT assignment NN . SENT chomp NN cwd NN pwd NN . SENT chomp NN answer NN . SENT If IN you PP chomp VV a DT list NN , , each DT element NN is VBZ chomped VVN , , and CC the DT total JJ number NN of IN characters NNS removed VVN is VBZ returned VVN . SENT chop VV VARIABLE NN chop VV LIST NN chop VV Chops NNS off IN the DT last JJ character NN of IN a DT string NN and CC returns VVZ the DT character NN chopped VVN . SENT It's NNS used VVD primarily RB to TO remove VV the DT newline NN from IN the DT end NN of IN an DT input NN record NN , , but CC is VBZ much RB more RBR efficient JJ than IN s PP n NN because IN it PP neither CC scans NNS nor CC copies NNS the DT string NN . SENT If IN VARIABLE NN is VBZ omitted VVN , , chops NNS . SENT Example NN . SENT while IN chop VV . SENT avoid VV n NN on IN last JJ field NN array NN split NN . SENT . SENT . SENT . SENT . SENT You PP can MD actually RB chop VV anything NN that's NNS an DT lvalue NN , , including VVG an DT assignment NN . SENT chop VV cwd JJ pwd NN . SENT chop VV answer NN . SENT If IN you PP chop VV a DT list NN , , each DT element NN is VBZ chopped VVN . SENT Only RB the DT value NN of IN the DT last JJ chop NN is VBZ returned VVN . SENT Note VVP that RB chop VV returns NNS the DT last JJ character NN . SENT To TO return VV all DT but CC the DT last JJ character NN , , use NN substr NN string NN , , 0 CD , , 1 CD . SENT chown NN LIST NN Changes NP the DT owner NN and CC group NN of IN a DT list NN of IN files NNS . SENT The DT first JJ two CD elements NNS of IN the DT list NN must MD be VB the DT NUMERICAL JJ uid NN and CC gid NN , , in IN that DT order NN . SENT Returns VVZ the DT number NN of IN files NNS successfully RB changed VVN . SENT cnt NN chown NN uid NN , , gid NN , , foo NP , , bar NN . SENT chown NN uid NN , , gid NN , , filenames NNS . SENT Here's NP an DT example NN that WDT looks VVZ up RP non JJ numeric JJ uids NNS in IN the DT passwd JJ file NN . SENT print NN User NP . SENT . SENT chop VV user NN . SENT print NN Files NP . SENT chop VV pattern NN . SENT login NN , , pass VV , , uid NN , , gid NN getpwnam NN user NN or CC die VV user NN not RB in IN passwd JJ file NN . SENT ary NP . SENT expand VV filenames NNS chown NN uid NN , , gid NN , , ary NP . SENT On IN most JJS systems NNS , , you PP are VBP not RB allowed VVN to TO change VV the DT ownership NN of IN the DT file NN unless IN you're NN the DT superuser JJR , , although IN you PP should MD be VB able JJ to TO change VV the DT group NN to TO any DT of IN your PP$ secondary JJ groups NNS . SENT On IN insecure JJ systems NNS , , these DT restrictions NNS may MD be VB relaxed VVN , , but CC this DT is VBZ not RB a DT portable JJ assumption NN . SENT chr NN NUMBER NN Returns VVZ the DT character NN represented VVD by IN that DT NUMBER NN in IN the DT character NN set VVD . SENT For IN example NN , , chr NP 65 CD is VBZ A DT in IN ASCII NP . SENT chroot NP FILENAME NP This DT function NN works VVZ as IN the DT system NN call NN by IN the DT same JJ name NN . SENT it PP makes VVZ the DT named VVN directory NN the DT new JJ root NN directory NN for IN all DT further JJR pathnames NNS that WDT begin VVP with IN a DT by IN your PP$ process NN and CC all DT of IN its PP$ children NNS . SENT It PP doesn't VVD change VV your PP$ current JJ working VVG directory NN is VBZ unaffected JJ . SENT For IN security NN reasons NNS , , this DT call NN is VBZ restricted VVN to TO the DT superuser JJR . SENT If IN FILENAME NP is VBZ omitted VVN , , does VVZ chroot JJ to TO . SENT close JJ FILEHANDLE NP Closes VVZ the DT file NN or CC pipe NN associated VVN with IN the DT file NN handle VV , , returning VVG TRUE JJ only RB if IN stdio NN successfully RB flushes VVZ buffers NNS and CC closes VVZ the DT system NN file NN descriptor NN . SENT You PP don't VVD have VH to TO close VV FILEHANDLE NP if IN you PP are VBP immediately RB going VVG to TO do VV another DT open JJ on IN it PP , , since IN open JJ will MD close VV it PP for IN you PP . SENT See VV open JJ . SENT However RB , , an DT explicit JJ close NN on IN an DT input NN file NN resets VVZ the DT line NN counter NN . SENT , , while IN the DT implicit JJ close NN done VVN by IN open JJ does VVZ not RB . SENT Also RB , , closing VVG a DT pipe NN will MD wait VV for IN the DT process NN executing VVG on IN the DT pipe NN to TO complete VV , , in IN case NN you PP want VVP to TO look VV at IN the DT output NN of IN the DT pipe NN afterwards RB . SENT Closing VVG a DT pipe NN explicitly RB also RB puts VVZ the DT status NN value NN of IN the DT command NN into IN . SENT . SENT Example NN . SENT open JJ OUTPUT NN , , sort NN foo NP . SENT pipe NN to TO sort VV . SENT . SENT . SENT print NN stuff NN to TO output NN close NN OUTPUT NN . SENT wait VV for IN sort NN to TO finish VV open JJ INPUT NN , , foo NP . SENT get VV sort's NN results NNS FILEHANDLE NP may MD be VB an DT expression NN whose WP$ value NN gives VVZ the DT real JJ filehandle NN name NN . SENT closedir NP DIRHANDLE NP Closes VVZ a DT directory NN opened VVD by IN opendir NN . SENT connect VV SOCKET NN , , NAME NN Attempts NNS to TO connect VV to TO a DT remote JJ socket NN , , just RB as IN the DT connect VVP system NN call NN does VVZ . SENT Returns NNS TRUE JJ if IN it PP succeeded VVD , , FALSE JJ otherwise RB . SENT NAME NN should MD be VB a DT packed JJ address NN of IN the DT appropriate JJ type NN for IN the DT socket NN . SENT See VV the DT examples NNS in IN Sockets NNS . SENT Client NN Server NP Communication NP . SENT continue VV BLOCK VV Actually RB a DT flow NN control NN statement NN rather RB than IN a DT function NN . SENT If IN there EX is VBZ a DT continue VVP BLOCK NN attached VVN to TO a DT BLOCK NN typically RB in IN a DT while NN or CC foreach NN , , it PP is VBZ always RB executed VVN just RB before IN the DT conditional JJ is VBZ about RB to TO be VB evaluated VVN again RB , , just RB like IN the DT third JJ part NN of IN a DT for IN loop NN in IN C NP . SENT Thus RB it PP can MD be VB used VVN to TO increment NN a DT loop NN variable NN , , even RB when WRB the DT loop NN has VHZ been VBN continued VVN via IN the DT next JJ statement NN which WDT is VBZ similar JJ to TO the DT C NP continue VVP statement NN . SENT cos NN EXPR NP Returns VVZ the DT cosine NN of IN EXPR NP expressed VVD in IN radians NNS . SENT If IN EXPR NP is VBZ omitted VVN takes VVZ cosine NN of IN . SENT crypt NN PLAINTEXT NN , , SALT NN Encrypts VVZ a DT string NN exactly RB like IN the DT crypt NN 3 CD function NN in IN the DT C NP library NN assuming VVG that IN you PP actually RB have VHP a DT version NN there RB that RB has VHZ not RB been VBN extirpated VVN as IN a DT potential NN munition VV . SENT This DT can MD prove VV useful JJ for IN checking VVG the DT password NN file NN for IN lousy JJ passwords NNS , , amongst IN other JJ things NNS . SENT Only RB the DT guys NNS wearing VVG white JJ hats NNS should MD do VV this DT . SENT Here's NP an DT example NN that WDT makes VVZ sure JJ that IN whoever WP runs VVZ this DT program NN knows VVZ their PP$ own JJ password NN . SENT pwd JJ getpwuid NN . SENT print NN n NN . SENT system NN stty NNS echo VVP . SENT if IN crypt NN word NN , , salt NN ne RB pwd JJ die NN Sorry RB . SENT . SENT . SENT n NN . SENT else RB print VV ok VV n NN . SENT Of IN course NN , , typing VVG in IN your PP$ own JJ password NN to TO whoever WP asks VVZ you PP for IN it PP is VBZ unwise JJ . SENT dbmclose NP ASSOC NP ARRAY NN This DT function NN has VHZ been VBN superseded VVN by IN the DT untie VV function NN . SENT Breaks VVZ the DT binding JJ between IN a DT DBM NP file NN and CC an DT associative JJ array NN . SENT dbmopen NP ASSOC NP , , DBNAME NP , , MODE NN This DT function NN has VHZ been VBN superseded VVN by IN the DT tie NN function NN . SENT This DT binds VVZ a DT dbm NP 3 CD , , ndbm NN 3 CD , , sdbm NN 3 CD , , gdbm NN , , or CC Berkeley NP DB NP file VV to TO an DT associative JJ array NN . SENT ASSOC NP is VBZ the DT name NN of IN the DT associative JJ array NN . SENT Unlike IN normal JJ open NN , , the DT first JJ argument NN is VBZ NOT RB a DT filehandle NN , , even RB though IN it PP looks VVZ like IN one CD . SENT DBNAME NP is VBZ the DT name NN of IN the DT database NN without IN the DT . SENT dir NP or CC . SENT pag NN extension NN if IN any DT . SENT If IN the DT database NN does VVZ not RB exist VV , , it PP is VBZ created VVN with IN protection NN specified VVN by IN MODE NN as IN modified VVN by IN the DT umask NN . SENT If IN your PP$ system NN only RB supports VVZ the DT older JJR DBM NP functions NNS , , you PP may MD perform VV only RB one CD dbmopen NN in IN your PP$ program NN . SENT In IN older JJR versions NNS of IN Perl NP , , if IN your PP$ system NN had VHD neither DT DBM NN nor CC ndbm NN , , calling VVG dbmopen NP produced VVD a DT fatal JJ error NN . SENT it PP now RB falls VVZ back RB to TO sdbm NP 3 CD . SENT If IN you PP don't VVD have VH write VV access NN to TO the DT DBM NP file NN , , you PP can MD only RB read VV associative JJ array NN variables NNS , , not RB set VV them PP . SENT If IN you PP want VVP to TO test VV whether IN you PP can MD write VV , , either CC use VV file NN tests NNS or CC try VV setting VVG a DT dummy JJ array NN entry NN inside IN an DT eval NN , , which WDT will MD trap VV the DT error NN . SENT Note NN that IN functions NNS such JJ as IN keys NNS and CC values NNS may MD return VV huge JJ array NN values NNS when WRB used VVN on IN large JJ DBM NP files NNS . SENT You PP may MD prefer VV to TO use VV the DT each DT function NN to TO iterate VV over IN large JJ DBM NP files NNS . SENT Example NN . SENT print NN out IN history NN file NN offsets NNS dbmopen NP HIST NP , , usr NN lib NN news NN history NN , , 0666 CD . SENT while IN key NN , , val NP each DT HIST NN print NN key JJ , , , , unpack VV L NP , , val NP , , n NN . SENT dbmclose NP HIST NP . SENT See VV also RB AnyDBM NP File NP for IN a DT more RBR general JJ description NN of IN the DT pros NNS and CC cons NNS of IN the DT various JJ dbm NN apparoches NNS , , as RB well RB as IN DB NP File NP for IN a DT particularly RB rich JJ implementation NN . SENT defined VVN EXPR NP Returns VVZ a DT boolean JJ value NN saying VVG whether IN EXPR NP has VHZ a DT real JJ value NN or CC not RB . SENT Many JJ operations NNS return VVP the DT undefined JJ value NN under IN exceptional JJ conditions NNS , , such JJ as IN end NN of IN file NN , , uninitialized JJ variable NN , , system NN error NN and CC such JJ . SENT This DT function NN allows VVZ you PP to TO distinguish VV between IN an DT undefined JJ null JJ scalar NN and CC a DT defined VVN null JJ scalar NN with IN operations NNS that WDT might MD return VV a DT real JJ null JJ string NN , , such JJ as IN referencing VVG elements NNS of IN an DT array NN . SENT You PP may MD also RB check VV to TO see VV if IN arrays NNS or CC subroutines NNS exist VVP . SENT Use NN of IN defined VVN on IN predefined JJ variables NNS is VBZ not RB guaranteed VVN to TO produce VV intuitive JJ results NNS . SENT When WRB used VVN on IN a DT hash NN array NN element NN , , it PP tells VVZ you PP whether IN the DT value NN is VBZ defined VVN , , not RB whether IN the DT key NN exists VVZ in IN the DT hash NN . SENT Use NN exists VVZ for IN that DT . SENT Examples NNS . SENT print NN if IN defined VVN switch NN D NP . SENT print VV val NP n NN while NN defined VVN val NP pop NN ary NP . SENT die VV Can't NP readlink NP sym NP . SENT . SENT unless IN defined VVN value NN readlink NN sym NP . SENT eval NP foo NP if IN defined VVN foo NP . SENT die VV No DT XYZ NP package NN defined VVN unless IN defined VVN XYZ NP . SENT sub NN foo NP defined VVD bar NN . SENT bar NN . SENT die VV No DT bar NN . SENT See VV also RB undef JJ . SENT Note NN . SENT many JJ folks NNS tend VVP to TO overuse VV defined VVN , , and CC then RB are VBP surprised VVN to TO discover VV that IN the DT number NN 0 CD and CC the DT null JJ string NN are VBP , , in IN fact NN , , defined VVN concepts NNS . SENT For IN example NN , , if IN you PP say VVP ab NP a DT . SENT b LS . SENT the DT pattern NN match NN succeeds VVZ , , and CC 1 CD is VBZ defined VVN , , despite IN the DT fact NN that IN it PP matched VVD nothing NN . SENT But CC it PP didn't VVD really RB match VV nothing NN rather RB , , it PP matched VVD something NN that WDT happened VVD to TO be VB 0 CD characters NNS long RB . SENT This DT is VBZ all RB very RB above IN board NN and CC honest JJ . SENT When WRB a DT function NN returns VVZ an DT undefined JJ value NN , , it's NNS an DT admission NN that IN it PP couldn't NN give VV you PP an DT honest JJ answer NN . SENT So RB you PP should MD only RB use VV defined VVN when WRB you're NN questioning VVG the DT integrity NN of IN what WP you're NN trying VVG to TO do VV . SENT At IN other JJ times NNS , , a DT simple JJ comparison NN to TO 0 CD or CC is VBZ what WP you PP want VVP . SENT delete VV EXPR NP Deletes VVZ the DT specified JJ value NN from IN its PP$ hash NN array NN . SENT Returns VVZ the DT deleted VVN value NN , , or CC the DT undefined JJ value NN if IN nothing NN was VBD deleted VVN . SENT Deleting VVG from IN ENV NP modifies VVZ the DT environment NN . SENT Deleting VVG from IN an DT array NN tied VVN to TO a DT DBM NP file NN deletes VVZ the DT entry NN from IN the DT DBM NP file NN . SENT But CC deleting VVG from IN a DT tie NN d SYM hash NN doesn't VVD necessarily RB return VV anything NN . SENT The DT following NN deletes VVZ all PDT the DT values NNS of IN an DT associative JJ array NN . SENT foreach JJ key JJ keys NNS ARRAY NN delete VV ARRAY NN key NN . SENT But CC it PP would MD be VB faster JJR to TO use VV the DT undef JJ command NN . SENT Note NN that IN the DT EXPR NP can MD be VB arbitrarily RB complicated VVN as RB long RB as IN the DT final JJ operation NN is VBZ a DT hash NN key JJ lookup NN . SENT delete VV ref NN x NN y NN key NN . SENT die VV LIST NN Outside IN of IN an DT eval NN , , prints VVZ the DT value NN of IN LIST NN to TO STDERR NP and CC exits NNS with IN the DT current JJ value NN of IN . SENT errno NN . SENT If IN . SENT is VBZ 0 CD , , exits VVZ with IN the DT value NN of IN . SENT 8 CD backtick NN command NN status NN . SENT If IN . SENT 8 CD is VBZ 0 CD , , exits VVZ with IN 255 CD . SENT Inside IN an DT eval NN , , the DT error NN message NN is VBZ stuffed VVN into IN , , and CC the DT eval NN is VBZ terminated VVN with IN the DT undefined JJ value NN . SENT this DT makes VVZ die VV the DT way NN to TO raise VV an DT exception NN . SENT Equivalent JJ examples NNS . SENT die VV Can't NP cd NN to TO spool VV . SENT . SENT n NN unless IN chdir NN usr NN spool NN news NN . SENT chdir NN usr NN spool NN news NN or CC die VV Can't NP cd NN to TO spool VV . SENT . SENT n NN If IN the DT value NN of IN EXPR NP does VVZ not RB end VV in IN a DT newline NN , , the DT current JJ script NN line NN number NN and CC input NN line NN number NN if IN any DT are VBP also RB printed VVN , , and CC a DT newline NN is VBZ supplied VVN . SENT Hint NN . SENT sometimes RB appending VVG , , stopped VVD to TO your PP$ message NN will MD cause VV it PP to TO make VV better JJR sense NN when WRB the DT string NN at IN foo NP line NN 123 CD is VBZ appended VVN . SENT Suppose VVP you PP are VBP running VVG script NN canasta NN . SENT die VV etc NN games NNS is VBZ no RB good JJ . SENT die VV etc NN games NNS is VBZ no RB good JJ , , stopped VVN . SENT produce VV , , respectively RB etc NN games NNS is VBZ no RB good JJ at IN canasta NN line NN 123 CD . SENT etc FW games NNS is VBZ no RB good JJ , , stopped VVN at IN canasta NN line NN 123 CD . SENT See VV also RB exit VV and CC warn VV . SENT do VV BLOCK VV Not RB really RB a DT function NN . SENT Returns VVZ the DT value NN of IN the DT last JJ command NN in IN the DT sequence NN of IN commands NNS indicated VVN by IN BLOCK NN . SENT When WRB modified VVN by IN a DT loop NN modifier NN , , executes VVZ the DT BLOCK NN once RB before IN testing VVG the DT loop NN condition NN . SENT On IN other JJ statements NNS the DT loop NN modifiers NNS test VVP the DT conditional JJ first JJ . SENT do VV SUBROUTINE NN LIST NN A DT deprecated VVN form NN of IN subroutine NN call NN . SENT See VV the DT perlsub NN manpage NN . SENT do VV EXPR NP Uses VVZ the DT value NN of IN EXPR NP as IN a DT filename NN and CC executes VVZ the DT contents NNS of IN the DT file NN as IN a DT Perl NP script NN . SENT Its PP$ primary JJ use NN is VBZ to TO include VV subroutines NNS from IN a DT Perl NP subroutine NN library NN . SENT do VV stat NN . SENT pl NP . SENT is VBZ just RB like IN eval JJ cat NN stat NN . SENT pl NP . SENT except IN that DT it's NNS more RBR efficient JJ , , more RBR concise JJ , , keeps VVZ track NN of IN the DT current JJ filename NN for IN error NN messages NNS , , and CC searches VVZ all PDT the DT I NN libraries NNS if IN the DT file NN isn't NN in IN the DT current JJ directory NN see VV also RB the DT INC NP array NN in IN Predefined JJ Names NNS . SENT It's NP the DT same JJ , , however RB , , in IN that WDT it PP does VVZ reparse VV the DT file NN every DT time NN you PP call VVP it PP , , so RB you PP probably RB don't JJ want VVP to TO do VV this DT inside IN a DT loop NN . SENT Note NN that IN inclusion NN of IN library NN modules NNS is VBZ better RBR done VVN with IN the DT use NN and CC require VV operators NNS , , which WDT also RB do VVP error NN checking NN and CC raise VV an DT exception NN if IN there's RB a DT problem NN . SENT dump VV LABEL VV This DT causes VVZ an DT immediate JJ core NN dump NN . SENT Primarily RB this DT is VBZ so RB that IN you PP can MD use VV the DT undump NN program NN to TO turn VV your PP$ core JJ dump NN into IN an DT executable JJ binary NN after IN having VHG initialized VVD all PDT your PP$ variables NNS at IN the DT beginning NN of IN the DT program NN . SENT When WRB the DT new JJ binary NN is VBZ executed VVN it PP will MD begin VV by IN executing VVG a DT goto NP LABEL NN with IN all PDT the DT restrictions NNS that IN goto NP suffers VVZ . SENT Think VV of IN it PP as IN a DT goto NP with IN an DT intervening VVG core NN dump NN and CC reincarnation NN . SENT If IN LABEL NN is VBZ omitted VVN , , restarts NN the DT program NN from IN the DT top NN . SENT WARNING NN . SENT any DT files NNS opened VVD at IN the DT time NN of IN the DT dump NN will MD NOT RB be VB open JJ any DT more RBR when WRB the DT program NN is VBZ reincarnated VVN , , with IN possible JJ resulting VVG confusion NN on IN the DT part NN of IN Perl NP . SENT See VV also RB u NN option NN in IN the DT perlrun JJ manpage NN . SENT Example NN . SENT . SENT usr NN bin NN perl NP require VVP getopt NN . SENT pl NP . SENT require VV stat NN . SENT pl NP . SENT days NNS Sun NP 1 CD , , Mon NP 2 CD , , Tue NP 3 CD , , Wed VVN 4 CD , , Thu NP 5 CD , , Fri NP 6 CD , , Sat VVD 7 CD , , . SENT dump VV QUICKSTART NP if IN ARGV NP 0 CD eq NP d NN . SENT QUICKSTART NP . SENT Getopt NN f SYM . SENT each DT ASSOC NP ARRAY NN Returns VVZ a DT 2 CD element NN array NN consisting VVG of IN the DT key NN and CC value NN for IN the DT next JJ value NN of IN an DT associative JJ array NN , , so RB that IN you PP can MD iterate VV over IN it PP . SENT Entries NNS are VBP returned VVN in IN an DT apparently RB random JJ order NN . SENT When WRB the DT array NN is VBZ entirely RB read VVN , , a DT null JJ array NN is VBZ returned VVN which WDT when IN assigned VVN produces VVZ a DT FALSE JJ 0 CD value NN . SENT The DT next JJ call NN to TO each DT after IN that WDT will MD start VV iterating VVG again RB . SENT The DT iterator NN can MD be VB reset JJ only RB by IN reading VVG all PDT the DT elements NNS from IN the DT array NN . SENT You PP should MD not RB add VV elements NNS to TO an DT array NN while IN you're NN iterating VVG over IN it PP . SENT There EX is VBZ a DT single JJ iterator NN for IN each DT associative JJ array NN , , shared VVN by IN all PDT each DT , , keys NNS and CC values NNS function VVP calls NNS in IN the DT program NN . SENT The DT following VVG prints NNS out IN your PP$ environment NN like IN the DT printenv NP 1 CD program NN , , only RB in IN a DT different JJ order NN . SENT while IN key NN , , value VVP each DT ENV NP print NN key JJ value NN n NN . SENT See VV also RB keys NNS and CC values NNS . SENT eof JJ FILEHANDLE NP eof NN eof NN Returns VVZ 1 CD if IN the DT next JJ read NN on IN FILEHANDLE NP will MD return VV end NN of IN file NN , , or CC if IN FILEHANDLE NP is VBZ not RB open JJ . SENT FILEHANDLE NP may MD be VB an DT expression NN whose WP$ value NN gives VVZ the DT real JJ filehandle NN name NN . SENT Note NN that IN this DT function NN actually RB reads VVZ a DT character NN and CC then RB ungetc NN s VVZ it PP , , so RB it PP is VBZ not RB very RB useful JJ in IN an DT interactive JJ context NN . SENT Do VVP not RB read VV from IN a DT terminal NN file NN or CC call VV eof JJ FILEHANDLE NP on IN it PP after IN end NN of IN file NN is VBZ reached VVN . SENT Filetypes NNS such JJ as IN terminals NNS may MD lose VV the DT end NN of IN file NN condition NN if IN you PP do VVP . SENT An DT eof NN without IN an DT argument NN uses VVZ the DT last JJ file NN read VVN as IN argument NN . SENT Empty JJ parentheses NNS may MD be VB used VVN to TO indicate VV the DT pseudofile NN formed VVN of IN the DT files NNS listed VVN on IN the DT command NN line NN , , i NP . SENT e SYM . SENT eof NN is VBZ reasonable JJ to TO use VV inside IN a DT while NN loop NN to TO detect VV the DT end NN of IN only RB the DT last JJ file NN . SENT Use NN eof NN ARGV NP or CC eof JJ without IN the DT parentheses NNS to TO test VV EACH DT file NN in IN a DT while NN loop NN . SENT Examples NNS . SENT reset JJ line NN numbering VVG on IN each DT input NN file NN while IN print NN . SENT t NN . SENT close JJ ARGV NP if IN eof NN . SENT Not RB eof JJ . SENT insert NN dashes NNS just RB before IN last JJ line NN of IN last JJ file NN while IN if IN eof JJ print NN n NN . SENT close JJ ARGV NP . SENT close NN or CC break NN . SENT is VBZ needed VVN if IN we PP are VBP reading VVG from IN the DT terminal NN print NN . SENT Practical JJ hint NN . SENT you PP almost RB never RB need VVP to TO use VV eof NN in IN Perl NP , , because IN the DT input NN operators NNS return VVP undef JJ when WRB they PP run VVP out RP of IN data NNS . SENT eval JJ EXPR NP eval NN BLOCK NN EXPR NP is VBZ parsed VVN and CC executed VVN as RB if IN it PP were VBD a DT little JJ Perl NP program NN . SENT It PP is VBZ executed VVN in IN the DT context NN of IN the DT current JJ Perl NP program NN , , so RB that IN any DT variable JJ settings NNS , , subroutine NN or CC format NN definitions NNS remain VVP afterwards RB . SENT The DT value NN returned VVN is VBZ the DT value NN of IN the DT last JJ expression NN evaluated VVN , , or CC a DT return NN statement NN may MD be VB used VVN , , just RB as RB with IN subroutines NNS . SENT If IN there EX is VBZ a DT syntax NN error NN or CC runtime NN error NN , , or CC a DT die NN statement NN is VBZ executed VVN , , an DT undefined JJ value NN is VBZ returned VVN by IN eval NN , , and CC is VBZ set VVN to TO the DT error NN message NN . SENT If IN there EX was VBD no DT error NN , , is VBZ guaranteed VVN to TO be VB a DT null JJ string NN . SENT If IN EXPR NP is VBZ omitted VVN , , evaluates VVZ . SENT The DT final JJ semicolon NN , , if IN any DT , , may MD be VB omitted VVN from IN the DT expression NN . SENT Note NN that IN , , since IN eval JJ traps NNS otherwise RB fatal JJ errors NNS , , it PP is VBZ useful JJ for IN determining VVG whether IN a DT particular JJ feature NN such JJ as IN socket NN or CC symlink NN is VBZ implemented VVN . SENT It PP is VBZ also RB Perl's JJ exception NN trapping VVG mechanism NN , , where WRB the DT die NN operator NN is VBZ used VVN to TO raise VV exceptions NNS . SENT If IN the DT code NN to TO be VB executed VVN doesn't NN vary VVP , , you PP may MD use VV the DT eval JJ BLOCK NN form NN to TO trap NN run NN time NN errors NNS without IN incurring VVG the DT penalty NN of IN recompiling VVG each DT time NN . SENT The DT error NN , , if IN any DT , , is VBZ still RB returned VVN in IN . SENT Examples NNS . SENT make VV divide NN by IN zero CD non JJ fatal JJ eval NN answer VV a DT b NN . SENT . SENT warn VV if IN . SENT same JJ thing NN , , but CC less RBR efficient JJ eval NN answer VV a DT b NN . SENT warn VV if IN . SENT a DT compile VV time NN error NN eval NN answer NN . SENT a DT run NN time NN error NN eval NN answer NN . SENT sets NNS With IN an DT eval NN , , you PP should MD be VB especially RB careful JJ to TO remember VV what's NNS being VBG looked VVN at IN when WRB . SENT eval NN x SYM . SENT CASE NN 1 CD eval NN x SYM . SENT CASE NN 2 CD eval NN x SYM . SENT CASE NN 3 CD eval NN x SYM . SENT CASE NN 4 CD eval NN x SYM CASE NN 5 CD x SYM . SENT CASE NN 6 CD Cases NNS 1 CD and CC 2 CD above RB behave VV identically RB . SENT they PP run VVP the DT code NN contained VVN in IN the DT variable NN x SYM . SENT Although IN case NN 2 CD has VHZ misleading JJ double JJ quotes NNS making VVG the DT reader NN wonder NN what WP else RB might MD be VB happening VVG nothing NN is VBZ . SENT Cases NNS 3 CD and CC 4 CD likewise RB behave VV in IN the DT same JJ way NN . SENT they PP run VVP the DT code NN x SYM , , which WDT does VVZ nothing NN at IN all DT . SENT Case NN 4 CD is VBZ preferred JJ for IN purely RB visual JJ reasons NNS . SENT Case NN 5 CD is VBZ a DT place NN where WRB normally RB you PP WOULD MD like VV to TO use VV double JJ quotes NNS , , except IN that DT in IN that DT particular JJ situation NN , , you PP can MD just RB use VV symbolic JJ references NNS instead RB , , as RB in IN case NN 6 CD . SENT exec NP LIST NN The DT exec NP function NN executes VVZ a DT system NN command NN AND CC NEVER RB RETURNS NNS . SENT Use VV the DT system NN function NN if IN you PP want VVP it PP to TO return VV . SENT If IN there EX is VBZ more JJR than IN one CD argument NN in IN LIST NN , , or CC if IN LIST NN is VBZ an DT array NN with IN more JJR than IN one CD value NN , , calls VVZ execvp NP 3 CD with IN the DT arguments NNS in IN LIST NN . SENT If IN there EX is VBZ only RB one CD scalar NN argument NN , , the DT argument NN is VBZ checked VVN for IN shell JJ metacharacters NNS . SENT If IN there EX are VBP any DT , , the DT entire JJ argument NN is VBZ passed VVN to TO bin NN sh NN c SYM for IN parsing VVG . SENT If IN there EX are VBP none NN , , the DT argument NN is VBZ split VVN into IN words NNS and CC passed VVD directly RB to TO execvp NN , , which WDT is VBZ more RBR efficient JJ . SENT Note NN . SENT exec NP and CC system NN do VVP not RB flush VV your PP$ output NN buffer NN , , so RB you PP may MD need VV to TO set VV to TO avoid VV lost JJ output NN . SENT Examples NNS . SENT exec NP bin NN echo NN , , Your PP$ arguments NNS are VBP . SENT , , ARGV NP . SENT exec NP sort NN outfile NN uniq NP . SENT If IN you PP don't VVD really RB want VV to TO execute VV the DT first JJ argument NN , , but CC want VVP to TO lie VV to TO the DT program NN you PP are VBP executing VVG about IN its PP$ own JJ name NN , , you PP can MD specify VV the DT program NN you PP actually RB want VVP to TO run VV as IN an DT indirect JJ object NN without IN a DT comma NN in IN front NN of IN the DT LIST NN . SENT This DT always RB forces VVZ interpretation NN of IN the DT LIST NN as IN a DT multi NNS valued VVN list NN , , even RB if IN there EX is VBZ only RB a DT single JJ scalar NN in IN the DT list NN . SENT Example NN . SENT shell JJ bin NN csh NN . SENT exec NP shell NN sh NN . SENT pretend JJ it's NNS a DT login NN shell NN or CC , , more RBR directly RB , , exec NP bin NN csh NN sh NNS . SENT pretend JJ it's NNS a DT login NN shell NN exists VVZ EXPR NP Returns NNS TRUE JJ if IN the DT specified JJ hash NN key NN exists VVZ in IN its PP$ hash NN array NN , , even RB if IN the DT corresponding JJ value NN is VBZ undefined JJ . SENT print NN Exists VVZ n NN if IN exists VVZ array NN key NN . SENT print NN Defined VVD n NN if IN defined VVN array NN key NN . SENT print VV True JJ n NN if IN array NN key NN . SENT A DT hash NN element NN can MD only RB be VB TRUE JJ if IN it's NNS defined VVN , , and CC defined VVD if IN it PP exists VVZ , , but CC the DT reverse NN doesn't VVD necessarily RB hold VV true JJ . SENT Note NN that IN the DT EXPR NP can MD be VB arbitrarily RB complicated VVN as RB long RB as IN the DT final JJ operation NN is VBZ a DT hash NN key JJ lookup NN . SENT if IN exists VVZ ref NN x NN y NN key NN . SENT . SENT . SENT exit NN EXPR NP Evaluates VVZ EXPR NP and CC exits VVZ immediately RB with IN that DT value NN . SENT Actually RB , , it PP calls VVZ any DT defined VVN END NN routines NNS first JJ , , but CC the DT END NN routines NNS may MD not RB abort VV the DT exit NN . SENT Likewise RB any DT object NN destructors NNS that WDT need VVP to TO be VB called VVN are VBP called VVN before IN exit NN . SENT Example NN . SENT ans NP . SENT exit NN 0 CD if IN ans NP Xx NP . SENT See VV also RB die VV . SENT If IN EXPR NP is VBZ omitted VVN , , exits VVZ with IN 0 CD status NN . SENT exp NP EXPR NP Returns NNS e SYM the DT natural JJ logarithm NN base NN to TO the DT power NN of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , gives VVZ exp NN . SENT fcntl NP FILEHANDLE NP , , FUNCTION NN , , SCALAR NN Implements VVZ the DT fcntl NN 2 CD function NN . SENT You'll NP probably RB have VH to TO say VV use VV Fcntl NP . SENT first JJ to TO get VV the DT correct JJ function NN definitions NNS . SENT Argument NN processing NN and CC value NN return NN works VVZ just RB like VV ioctl NN below RB . SENT Note NN that IN fcntl NN will MD produce VV a DT fatal JJ error NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV fcntl NP 2 CD . SENT For IN example NN . SENT use VV Fcntl NP . SENT fcntl NN filehandle NN , , F NP GETLK NP , , packed VVD return NN buffer NN . SENT fileno NP FILEHANDLE NP Returns VVZ the DT file NN descriptor NN for IN a DT filehandle NN . SENT This DT is VBZ useful JJ for IN constructing VVG bitmaps NNS for IN select JJ . SENT If IN FILEHANDLE NP is VBZ an DT expression NN , , the DT value NN is VBZ taken VVN as IN the DT name NN of IN the DT filehandle NN . SENT flock NN FILEHANDLE NP , , OPERATION NN Calls NNS flock NN 2 CD on IN FILEHANDLE NP . SENT See VV flock NN 2 CD for IN definition NN of IN OPERATION NN . SENT Returns NNS TRUE JJ for IN success NN , , FALSE JJ on IN failure NN . SENT Will MD produce VV a DT fatal JJ error NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV either DT flock NN 2 CD or CC fcntl NP 2 CD . SENT The DT fcntl NN 2 CD system NN call NN will MD be VB automatically RB used VVN if IN flock NN 2 CD is VBZ missing VVG from IN your PP$ system NN . SENT This DT makes VVZ flock NN the DT portable JJ file NN locking VVG strategy NN , , although IN it PP will MD only RB lock VV entire JJ files NNS , , not RB records NNS . SENT Note NN also RB that IN some DT versions NNS of IN flock NN cannot NN lock NN things NNS over IN the DT network NN . SENT you PP would MD need VV to TO use VV the DT more JJR system NN specific JJ fcntl NN for IN that DT . SENT Here's NP a DT mailbox NN appender NN for IN BSD NP systems NNS . SENT LOCK VV SH NP 1 CD . SENT LOCK NN EX JJ 2 CD . SENT LOCK JJ NB NP 4 CD . SENT LOCK JJ UN NP 8 CD . SENT sub NN lock NN flock NN MBOX NN , , LOCK VVP EX FW . SENT and CC , , in IN case NN someone NN appended VVN while IN we PP were VBD waiting VVG . SENT . SENT . SENT seek VV MBOX NP , , 0 CD , , 2 CD . SENT sub VV unlock VV flock NN MBOX NN , , LOCK JJ UN NP . SENT open JJ MBOX NN , , usr NN spool NN mail NN ENV NP USER NP or CC die VV Can't NP open JJ mailbox NN . SENT . SENT . SENT lock VV . SENT print VV MBOX NP msg NP , , n NN n NN . SENT unlock VV . SENT See VV also RB DB NP File NP for IN other JJ flock NN examples NNS . SENT fork VV Does NP a DT fork VV 2 CD system NN call NN . SENT Returns VVZ the DT child NN pid NN to TO the DT parent NN process NN and CC 0 CD to TO the DT child NN process NN , , or CC undef JJ if IN the DT fork NN is VBZ unsuccessful JJ . SENT Note NN . SENT unflushed JJ buffers NNS remain VVP unflushed JJ in IN both DT processes NNS , , which WDT means VVZ you PP may MD need VV to TO set VV AUTOFLUSH NP in IN English NP or CC call VV the DT autoflush JJ FileHandle NP method NN to TO avoid VV duplicate JJ output NN . SENT If IN you PP fork VV without IN ever RB waiting VVG on IN your PP$ children NNS , , you PP will MD accumulate VVP zombies NNS . SENT SIG NP CHLD NP sub NN wait NN . SENT There's RB also RB the DT double RB fork VV trick NN error NN checking VVG on IN fork VV returns NNS omitted VVN . SENT unless IN pid NN fork VV unless IN fork VV exec NP what WDT you PP really RB wanna VV do VV . SENT die VV no DT exec NP . SENT . SENT . SENT . SENT or JJ . SENT . SENT . SENT some DT perl NP code NN here RB exit VV 0 CD . SENT exit NN 0 CD . SENT waitpid NN pid NN , , 0 CD . SENT See VV also RB the DT perlipc NN manpage NN for IN more JJR examples NNS of IN forking VVG and CC reaping VVG moribund JJ children NNS . SENT format NN Declare VV a DT picture NN format NN with IN use NN by IN the DT write VVP function NN . SENT For IN example NN . SENT format NN Something NN Test NN . SENT str NNS , , , , . SENT int NP num NN . SENT str NN widget NN . SENT num NN cost NN quantiy NP . SENT Something NN . SENT write VV . SENT See VV the DT perlform NN manpage NN for IN many JJ details NNS and CC examples NNS . SENT formline NN PICTURE NN , , LIST VVP This DT is VBZ an DT internal JJ function NN used VVN by IN format NN s PP , , though IN you PP may MD call VV it PP too RB . SENT It PP formats NNS see VVP the DT perlform NN manpage NN a DT list NN of IN values NNS according VVG to TO the DT contents NNS of IN PICTURE NN , , placing VVG the DT output NN into IN the DT format NN output NN accumulator NN , , A NP or CC ACCUMULATOR NN in IN English NP . SENT Eventually RB , , when WRB a DT write VVP is VBZ done VVN , , the DT contents NNS of IN A DT are VBP written VVN to TO some DT filehandle NN , , but CC you PP could MD also RB read VV A DT yourself PP and CC then RB set VVD A DT back RB to TO . SENT Note NN that IN a DT format NN typically RB does VVZ one CD formline NN per IN line NN of IN form NN , , but CC the DT formline NN function VVP itself PP doesn't JJ care NN how WRB many JJ newlines NNS are VBP embedded VVN in IN the DT PICTURE NN . SENT This DT means VVZ that IN the DT and CC tokens NNS will MD treat VV the DT entire JJ PICTURE NN as IN a DT single JJ line NN . SENT You PP may MD therefore RB need VV to TO use VV multiple JJ formlines NNS to TO implement VV a DT single JJ record NN format NN , , just RB like IN the DT format NN compiler NN . SENT Be VB careful JJ if IN you PP put VVP double JJ quotes NNS around IN the DT picture NN , , since IN an DT character NN may MD be VB taken VVN to TO mean VV the DT beginning NN of IN an DT array NN name NN . SENT formline NN always RB returns VVZ TRUE JJ . SENT See VV the DT perlform NN manpage NN for IN other JJ examples NNS . SENT getc NP FILEHANDLE NP getc NN Returns VVZ the DT next JJ character NN from IN the DT input NN file NN attached VVN to TO FILEHANDLE NP , , or CC a DT null JJ string NN at IN end NN of IN file NN . SENT If IN FILEHANDLE NP is VBZ omitted VVN , , reads VVZ from IN STDIN NP . SENT This DT is VBZ not RB particularly RB efficient JJ . SENT It PP cannot NN be VB used VVN to TO get VV unbuffered JJ single JJ characters NNS , , however RB . SENT For IN that DT , , try VV something NN more RBR like JJ . SENT if IN BSD NP STYLE NN system NN stty NN cbreak NN dev NP tty NN 2 CD 1 CD . SENT else JJ system NN stty NN , , icanon NN , , eol NN , , 001 CD . SENT key JJ getc NN STDIN NP . SENT if IN BSD NP STYLE NN system NN stty NN cbreak NN dev NP tty NN 2 CD 1 CD . SENT else JJ system NN stty NN , , icanon NN , , eol NP , , . SENT ascii NP null JJ print NN n NN . SENT Determination NN of IN whether IN to TO whether IN BSD NP STYLE NN should MD be VB set VVN is VBZ left VVN as IN an DT exercise NN to TO the DT reader NN . SENT See VV also RB the DT Term NN . SENT . SENT ReadKey JJ module NN from IN your PP$ nearest JJS CPAN NN site NN . SENT details NNS on IN CPAN NP can MD be VB found VVN on IN CPAN NP getlogin NP Returns VVZ the DT current JJ login NN from IN etc FW utmp NN , , if IN any DT . SENT If IN null NN , , use NN getpwuid NN . SENT login NN getlogin NN getpwuid NN Do VVP not RB consider VV getlogin NN for IN authorentication NN . SENT it PP is VBZ not RB as RB secure VV as IN getpwuid NN . SENT getpeername JJ SOCKET NN Returns VVZ the DT packed JJ sockaddr NN address NN of IN other JJ end NN of IN the DT SOCKET NN connection NN . SENT use NN Socket NN . SENT hersockaddr NN getpeername NN SOCK VV . SENT port NN , , iaddr NN unpack VV sockaddr NN in IN hersockaddr NN . SENT herhostname JJ gethostbyaddr NN iaddr NN , , AF NP INET NP . SENT herstraddr NN inet NN ntoa NN iaddr NN . SENT getpgrp NP PID NP Returns VVZ the DT current JJ process NN group NN for IN the DT specified JJ PID NN , , 0 CD for IN the DT current JJ process NN . SENT Will MD raise VV an DT exception NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV getpgrp NP 2 CD . SENT If IN PID NP is VBZ omitted VVN , , returns NNS process NN group NN of IN current JJ process NN . SENT getppid JJ Returns NNS the DT process NN id NN of IN the DT parent NN process NN . SENT getpriority NN WHICH WDT , , WHO WP Returns VVZ the DT current JJ priority NN for IN a DT process NN , , a DT process NN group NN , , or CC a DT user NN . SENT See VV getpriority NN 2 CD . SENT Will MD raise VV a DT fatal JJ exception NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV getpriority NN 2 CD . SENT getpwnam NP NAME NN getgrnam NP NAME NN gethostbyname NN NAME NN getnetbyname NN NAME NN getprotobyname NN NAME NN getpwuid JJ UID NP getgrgid NN GID NN getservbyname NN NAME NN , , PROTO NP gethostbyaddr NP ADDR NP , , ADDRTYPE NP getnetbyaddr NP ADDR NP , , ADDRTYPE NN getprotobynumber NN NUMBER NN getservbyport NN PORT NN , , PROTO NP getpwent JJ getgrent JJ gethostent JJ getnetent JJ getprotoent JJ getservent JJ setpwent NN setgrent NN sethostent JJ STAYOPEN NP setnetent NN STAYOPEN NP setprotoent NP STAYOPEN NP setservent JJ STAYOPEN NP endpwent NN endgrent NN endhostent JJ endnetent JJ endprotoent NN endservent NN These DT routines NNS perform VVP the DT same JJ functions NNS as IN their PP$ counterparts NNS in IN the DT system NN library NN . SENT Within IN a DT list NN context NN , , the DT return NN values VVZ from IN the DT various JJ get VVP routines NNS are VBP as RB follows VVZ . SENT name NN , , passwd NP , , uid NN , , gid NN , , quota NN , , comment NN , , gcos NNS , , dir NN , , shell JJ getpw JJ name NN , , passwd NP , , gid NN , , members NNS getgr NN name NN , , aliases NNS , , addrtype NN , , length NN , , addrs NNS gethost NN name NN , , aliases NNS , , addrtype NN , , net JJ getnet NN name NN , , aliases NNS , , proto NP getproto NP name NN , , aliases NNS , , port NN , , proto NP getserv NP If IN the DT entry NN doesn't NN exist VVP you PP get VV a DT null JJ list NN . SENT Within IN a DT scalar JJ context NN , , you PP get VVP the DT name NN , , unless IN the DT function NN was VBD a DT lookup NN by IN name NN , , in IN which WDT case NN you PP get VVP the DT other JJ thing NN , , whatever WDT it PP is VBZ . SENT If IN the DT entry NN doesn't NN exist VVP you PP get VV the DT undefined JJ value NN . SENT For IN example NN . SENT uid NP getpwnam NP name NN getpwuid NN name NN getpwent NN gid NN getgrnam NP name NN getgrgid NN name NN getgrent JJ etc NN . SENT The DT members NNS value NN returned VVN by IN getgr NN is VBZ a DT space NN separated JJ list NN of IN the DT login NN names NNS of IN the DT members NNS of IN the DT group NN . SENT For IN the DT gethost NN functions NNS , , if IN the DT h NN errno NN variable NN is VBZ supported VVN in IN C NP , , it PP will MD be VB returned VVN to TO you PP via IN . SENT if IN the DT function NN call NN fails VVZ . SENT The DT addrs NNS value NN returned VVN by IN a DT successful JJ call NN is VBZ a DT list NN of IN the DT raw JJ addresses NNS returned VVN by IN the DT corresponding JJ system NN library NN call NN . SENT In IN the DT Internet NN domain NN , , each DT address NN is VBZ four CD bytes NNS long RB and CC you PP can MD unpack VV it PP by IN saying VVG something NN like IN . SENT a DT , , b NN , , c LS , , d NN unpack VV C NP 4 CD , , addr NP 0 CD . SENT getsockname JJ SOCKET NN Returns VVZ the DT packed JJ sockaddr NN address NN of IN this DT end NN of IN the DT SOCKET NN connection NN . SENT use NN Socket NN . SENT mysockaddr NN getsockname NN SOCK VV . SENT port NN , , myaddr NN unpack VV sockaddr NN in IN mysockaddr NN . SENT getsockopt JJ SOCKET NN , , LEVEL NN , , OPTNAME NP Returns VVZ the DT socket NN option NN requested VVD , , or CC undefined JJ if IN there EX is VBZ an DT error NN . SENT glob NN EXPR NP Returns VVZ the DT value NN of IN EXPR NP with IN filename NN expansions NNS such JJ as IN a DT shell NN would MD do VV . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT . SENT operator NN , , except IN it's NNS easier JJR to TO use VV . SENT gmtime NP EXPR NP Converts VVZ a DT time NN as RB returned VVD by IN the DT time NN function NN to TO a DT 9 CD element NN array NN with IN the DT time NN localized VVN for IN the DT standard JJ Greenwich NP timezone NN . SENT Typically RB used VVN as RB follows VVZ . SENT sec NN , , min NP , , hour NN , , mday NP , , mon NP , , year NN , , wday NP , , yday NP , , isdst NN gmtime NN time NN . SENT All DT array NN elements NNS are VBP numeric JJ , , and CC come VV straight RB out RB of IN a DT struct NN tm NN . SENT In IN particular JJ this DT means NN that IN mon NP has VHZ the DT range NN 0 CD . SENT . SENT 11 CD and CC wday NN has VHZ the DT range NN 0 CD . SENT . SENT 6 CD . SENT If IN EXPR NP is VBZ omitted VVN , , does VVZ gmtime NN time NN . SENT goto NP LABEL NN goto NP EXPR NP goto NP NAME NN The DT goto NP LABEL NN form NN finds VVZ the DT statement NN labeled VVN with IN LABEL NN and CC resumes VVZ execution NN there RB . SENT It PP may MD not RB be VB used VVN to TO go VV into IN any DT construct NN that WDT requires VVZ initialization NN , , such JJ as IN a DT subroutine NN or CC a DT foreach NN loop NN . SENT It PP also RB can't NN be VB used VVN to TO go VV into IN a DT construct NN that WDT is VBZ optimized VVN away RB . SENT It PP can MD be VB used VVN to TO go VV almost RB anywhere RB else RB within IN the DT dynamic JJ scope NN , , including VVG out RP of IN subroutines NNS , , but CC it's NNS usually RB better RBR to TO use VV some DT other JJ construct VV such JJ as IN last JJ or CC die VV . SENT The DT author NN of IN Perl NP has VHZ never RB felt VVD the DT need NN to TO use VV this DT form NN of IN goto NP in IN Perl NP , , that WDT is VBZ C NP is VBZ another DT matter NN . SENT The DT goto NP EXPR NP form NN expects VVZ a DT label NN name NN , , whose WP$ scope NN will MD be VB resolved VVN dynamically RB . SENT This DT allows VVZ for IN computed VVN gotos NNS per IN FORTRAN NP , , but CC isn't NP necessarily RB recommended VVD if IN you're NN optimizing VVG for IN maintainability NN . SENT goto NP FOO NP , , BAR NN , , GLARCH NP i NP . SENT The DT goto NP NAME NN form NN is VBZ highly RB magical JJ , , and CC substitutes NNS a DT call NN to TO the DT named VVN subroutine NN for IN the DT currently RB running VVG subroutine NN . SENT This DT is VBZ used VVN by IN AUTOLOAD NP subroutines NNS that WDT wish VVP to TO load VV another DT subroutine NN and CC then RB pretend VV that IN the DT other JJ subroutine NN had VHD been VBN called VVN in IN the DT first JJ place NN except IN that WDT any DT modifications NNS to TO in IN the DT current JJ subroutine NN are VBP propagated VVN to TO the DT other JJ subroutine NN . SENT After IN the DT goto NP , , not RB even RB caller NN will MD be VB able JJ to TO tell VV that IN this DT routine NN was VBD called VVN first RB . SENT grep JJ BLOCK NN LIST NN grep NN EXPR NP , , LIST NN Evaluates VVZ the DT BLOCK NN or CC EXPR NP for IN each DT element NN of IN LIST NN locally RB setting VVG to TO each DT element NN and CC returns VVZ the DT list NN value NN consisting VVG of IN those DT elements NNS for IN which WDT the DT expression NN evaluated VVN to TO TRUE JJ . SENT In IN a DT scalar JJ context NN , , returns VVZ the DT number NN of IN times NNS the DT expression NN was VBD TRUE JJ . SENT foo NP grep NN . SENT , , bar NN . SENT weed NN out IN comments NNS or CC equivalently RB , , foo NP grep NN . SENT bar NN . SENT weed NN out IN comments NNS Note VV that IN , , since IN is VBZ a DT reference NN into IN the DT list NN value NN , , it PP can MD be VB used VVN to TO modify VV the DT elements NNS of IN the DT array NN . SENT While IN this DT is VBZ useful JJ and CC supported VVN , , it PP can MD cause VV bizarre JJ results NNS if IN the DT LIST NN is VBZ not RB a DT named VVN array NN . SENT hex NN EXPR NP Interprets VVZ EXPR NP as IN a DT hex NN string NN and CC returns VVZ the DT corresponding JJ decimal JJ value NN . SENT To TO convert VV strings NNS that WDT might MD start VV with IN 0 CD or CC 0 CD x NN see VVP oct NP . SENT If IN EXPR NP is VBZ omitted VVN , , uses VVZ . SENT import VV There EX is VBZ no RB built VVN in IN import NN function NN . SENT It PP is VBZ merely RB an DT ordinary JJ method NN subroutine NN defined VVN or CC inherited VVN by IN modules NNS that WDT wish VVP to TO export VV names NNS to TO another DT module NN . SENT The DT use NN function NN calls VVZ the DT import NN method NN for IN the DT package NN used VVN . SENT See VVP also RB use VV , , the DT perlmod JJ manpage NN , , and CC Exporter NN . SENT index NN STR NP , , SUBSTR NP , , POSITION NN index NN STR NP , , SUBSTR NP Returns VVZ the DT position NN of IN the DT first JJ occurrence NN of IN SUBSTR NP in IN STR NP at IN or CC after IN POSITION NN . SENT If IN POSITION NN is VBZ omitted VVN , , starts VVZ searching VVG from IN the DT beginning NN of IN the DT string NN . SENT The DT return NN value NN is VBZ based VVN at IN 0 CD or CC whatever WDT you've NN set VVD the DT variable NN to TO but CC don't NN do VVP that IN . SENT If IN the DT substring NN is VBZ not RB found VVN , , returns VVZ one PP less JJR than IN the DT base NN , , ordinarily RB 1 CD . SENT int NP EXPR NP Returns VVZ the DT integer NN portion NN of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , uses VVZ . SENT ioctl NP FILEHANDLE NP , , FUNCTION NN , , SCALAR NN Implements VVZ the DT ioctl NN 2 CD function NN . SENT You'll NP probably RB have VH to TO say VV require VV ioctl NN . SENT ph NN . SENT probably RB in IN usr NN local JJ lib NN perl NP ioctl NP . SENT ph NN first JJ to TO get VV the DT correct JJ function NN definitions NNS . SENT If IN ioctl NN . SENT ph NN doesn't NN exist VVP or CC doesn't NN have VHP the DT correct JJ definitions NNS you'll RB have VHP to TO roll VV your PP$ own JJ , , based VVN on IN your PP$ C NP header NN files NNS such JJ as IN sys NP ioctl NP . SENT h NN . SENT There EX is VBZ a DT Perl NP script NN called VVD h NN 2 CD ph NN that WDT comes VVZ with IN the DT Perl NP kit NN which WDT may MD help VV you PP in IN this DT , , but CC it's JJ non JJ trivial JJ . SENT SCALAR NN will MD be VB read VVN and CC or CC written VVN depending VVG on IN the DT FUNCTION NN a DT pointer NN to TO the DT string NN value NN of IN SCALAR NN will MD be VB passed VVN as IN the DT third JJ argument NN of IN the DT actual JJ ioctl NN call NN . SENT If IN SCALAR NN has VHZ no DT string NN value NN but CC does VVZ have VH a DT numeric JJ value NN , , that DT value NN will MD be VB passed VVN rather RB than IN a DT pointer NN to TO the DT string NN value NN . SENT To TO guarantee VV this DT to TO be VB TRUE JJ , , add VV a DT 0 CD to TO the DT scalar NN before IN using VVG it PP . SENT The DT pack NN and CC unpack VV functions NNS are VBP useful JJ for IN manipulating VVG the DT values NNS of IN structures NNS used VVN by IN ioctl NN . SENT The DT following VVG example NN sets VVZ the DT erase VV character NN to TO DEL FW . SENT require VV ioctl NN . SENT ph NN . SENT getp NP TIOCGETP NP . SENT die VV NO DT TIOCGETP NN if IN . SENT getp NN . SENT sgttyb NN t NN ccccs NNS . SENT 4 CD chars NNS and CC a DT short JJ if IN ioctl NP STDIN NP , , getp NN , , sgttyb NP ary NP unpack VV sgttyb NN t NN , , sgttyb NN . SENT ary NP 2 CD 127 CD . SENT sgttyb NN pack NN sgttyb NN t NN , , ary NP . SENT ioctl NP STDIN NP , , TIOCSETP NP , , sgttyb NN die NN Can't NP ioctl NP . SENT . SENT . SENT The DT return NN value NN of IN ioctl NN and CC fcntl NN is VBZ as RB follows VVZ . SENT if IN OS NN returns NNS . SENT then RB Perl NP returns NNS . SENT 1 CD undefined JJ value NN 0 CD string NN 0 CD but CC true JJ anything NN else RB that IN number NN Thus RB Perl NP returns NNS TRUE JJ on IN success NN and CC FALSE JJ on IN failure NN , , yet RB you PP can MD still RB easily RB determine VV the DT actual JJ value NN returned VVN by IN the DT operating NN system NN . SENT retval JJ ioctl NN . SENT . SENT . SENT retval NN 1 CD . SENT printf NP System NP returned VVD d NN n NN , , retval NN . SENT join VV EXPR NP , , LIST NN Joins VVZ the DT separate JJ strings NNS of IN LIST NN or CC ARRAY NN into IN a DT single JJ string NN with IN fields NNS separated VVN by IN the DT value NN of IN EXPR NP , , and CC returns VVZ the DT string NN . SENT Example NN . SENT join VV . SENT , , login NP , , passwd NP , , uid NN , , gid NN , , gcos NNS , , home NN , , shell NN . SENT See VV split NN . SENT keys NNS ASSOC NN ARRAY NN Returns VVZ a DT normal JJ array NN consisting VVG of IN all PDT the DT keys NNS of IN the DT named VVN associative JJ array NN . SENT In IN a DT scalar JJ context NN , , returns VVZ the DT number NN of IN keys NNS . SENT The DT keys NNS are VBP returned VVN in IN an DT apparently RB random JJ order NN , , but CC it PP is VBZ the DT same JJ order NN as IN either CC the DT values NNS or CC each DT function NN produces VVZ given VVN that IN the DT associative JJ array NN has VHZ not RB been VBN modified VVN . SENT Here RB is VBZ yet RB another DT way NN to TO print VV your PP$ environment NN . SENT keys NNS keys NNS ENV NP . SENT values NNS values NNS ENV NP . SENT while IN keys NNS 0 CD print NN pop NN keys NNS , , , , pop NN values NNS , , n NN . SENT or CC how WRB about RB sorted VVN by IN key NN . SENT foreach JJ key JJ sort NN keys NNS ENV NP print NN key JJ , , , , ENV NP key NN , , n NN . SENT To TO sort VV an DT array NN by IN value NN , , you'll JJ need NN to TO use VV a DT sort NN function NN . SENT Here's NP a DT descending VVG numeric JJ sort NN of IN a DT hash NN by IN its PP$ values NNS . SENT foreach JJ key JJ sort NN hash NN b SYM hash NN a DT keys NNS hash NN printf NP 4 CD d SYM s PP n NN , , hash NN key NN , , key JJ . SENT kill NN LIST NN Sends VVZ a DT signal NN to TO a DT list NN of IN processes NNS . SENT The DT first JJ element NN of IN the DT list NN must MD be VB the DT signal NN to TO send VV . SENT Returns VVZ the DT number NN of IN processes NNS successfully RB signaled VVD . SENT cnt NN kill VVP 1 CD , , child NN 1 CD , , child NN 2 CD . SENT kill NN 9 CD , , goners NNS . SENT Unlike IN in IN the DT shell NN , , in IN Perl NP if IN the DT SIGNAL NN is VBZ negative JJ , , it PP kills VVZ process NN groups NNS instead RB of IN processes NNS . SENT On IN System NP V NN , , a DT negative JJ PROCESS NN number NN will MD also RB kill VV process NN groups NNS , , but CC that's NNS not RB portable JJ . SENT That DT means VVZ you PP usually RB want VVP to TO use VV positive JJ not RB negative JJ signals NNS . SENT You PP may MD also RB use VV a DT signal NN name NN in IN quotes NNS . SENT See VV the DT Signals NNS man NN page NN for IN details NNS . SENT last JJ LABEL NN last JJ The DT last JJ command NN is VBZ like IN the DT break NN statement NN in IN C NP as RB used VVD in IN loops NNS . SENT it PP immediately RB exits VVZ the DT loop NN in IN question NN . SENT If IN the DT LABEL NN is VBZ omitted VVN , , the DT command NN refers VVZ to TO the DT innermost JJ enclosing VVG loop NN . SENT The DT continue VVP block NN , , if IN any DT , , is VBZ not RB executed VVN . SENT LINE NN . SENT while IN last JJ LINE NN if IN . SENT exit VV when WRB done VVN with IN header NN . SENT . SENT . SENT lc NP EXPR NP Returns VVZ an DT lowercased JJ version NN of IN EXPR NP . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT L NP escape NN in IN double JJ quoted VVN strings NNS . SENT Should MD respect VV any DT POSIX NP setlocale NN settings NNS . SENT lcfirst NP EXPR NP Returns VVZ the DT value NN of IN EXPR NP with IN the DT first JJ character NN lowercased NN . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT l NN escape NN in IN double JJ quoted VVN strings NNS . SENT Should MD respect VV any DT POSIX NP setlocale NN settings NNS . SENT length NN EXPR NP Returns VVZ the DT length NN in IN characters NNS of IN the DT value NN of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , returns NNS length NN of IN . SENT link NN OLDFILE NP , , NEWFILE NP Creates VVZ a DT new JJ filename NN linked VVN to TO the DT old JJ filename NN . SENT Returns NNS 1 CD for IN success NN , , 0 CD otherwise RB . SENT listen VV SOCKET NN , , QUEUESIZE NP Does VVZ the DT same JJ thing NN that IN the DT listen VVP system NN call NN does VVZ . SENT Returns NNS TRUE JJ if IN it PP succeeded VVD , , FALSE JJ otherwise RB . SENT See VV example NN in IN Sockets NNS . SENT Client NN Server NP Communication NP . SENT local JJ EXPR NP A DT local JJ modifies VVZ the DT listed VVN variables NNS to TO be VB local JJ to TO the DT enclosing VVG block NN , , subroutine NN , , eval NN or CC do VV . SENT If IN more JJR than IN one CD value NN is VBZ listed VVN , , the DT list NN must MD be VB placed VVN in IN parens NNS . SENT See VV Llocal NP for IN details NNS . SENT But CC you PP really RB probably RB want VVP to TO be VB using VVG my PP$ instead RB , , because IN local JJ isn't NN what WP most JJS people NNS think VVP of IN as RB local JJ . SENT See VV Lmy NP for IN details NNS . SENT localtime NP EXPR NP Converts VVZ a DT time NN as RB returned VVD by IN the DT time NN function NN to TO a DT 9 CD element NN array NN with IN the DT time NN analyzed VVD for IN the DT local JJ timezone NN . SENT Typically RB used VVN as RB follows VVZ . SENT sec NN , , min NP , , hour NN , , mday NP , , mon NP , , year NN , , wday NP , , yday NP , , isdst NN localtime NN time NN . SENT All DT array NN elements NNS are VBP numeric JJ , , and CC come VV straight RB out RB of IN a DT struct NN tm NN . SENT In IN particular JJ this DT means NN that IN mon NP has VHZ the DT range NN 0 CD . SENT . SENT 11 CD and CC wday NN has VHZ the DT range NN 0 CD . SENT . SENT 6 CD . SENT If IN EXPR NP is VBZ omitted VVN , , does VVZ localtime NN time NN . SENT In IN a DT scalar JJ context NN , , prints NNS out IN the DT ctime JJ 3 CD value NN . SENT now RB string NN localtime NN . SENT e SYM . SENT g NN . SENT Thu NP Oct NP 13 CD 04 CD . SENT 54 CD . SENT 34 CD 1994 CD Also RB see VVP the DT timelocal NN . SENT pl NP library NN , , and CC the DT strftime JJ 3 CD function NN available JJ via IN the DT POSIX NP modulie NN . SENT log VV EXPR NP Returns NNS logarithm NN base NN e SYM of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , returns NNS log VVP of IN . SENT lstat NP FILEHANDLE NP lstat NP EXPR NP Does VVZ the DT same JJ thing NN as IN the DT stat NN function NN , , but CC stats NNS a DT symbolic JJ link NN instead RB of IN the DT file NN the DT symbolic JJ link NN points VVZ to TO . SENT If IN symbolic JJ links NNS are VBP unimplemented VVN on IN your PP$ system NN , , a DT normal JJ stat NN is VBZ done VVN . SENT m NN The DT match NN operator NN . SENT See VV the DT perlop NN manpage NN . SENT map NN BLOCK NN LIST NN map NN EXPR NP , , LIST NN Evaluates VVZ the DT BLOCK NN or CC EXPR NP for IN each DT element NN of IN LIST NN locally RB setting VVG to TO each DT element NN and CC returns VVZ the DT list NN value NN composed VVN of IN the DT results NNS of IN each DT such JJ evaluation NN . SENT Evaluates VVZ BLOCK NN or CC EXPR NP in IN a DT list NN context NN , , so RB each DT element NN of IN LIST NN may MD produce VV zero CD , , one CD , , or CC more JJR elements NNS in IN the DT returned VVN value NN . SENT chars NNS map VVP chr NN , , nums NNS . SENT translates VVZ a DT list NN of IN numbers NNS to TO the DT corresponding JJ characters NNS . SENT And CC hash NN map NN getkey NN array NN . SENT is VBZ just RB a DT funny JJ way NN to TO write VV hash NN . SENT foreach NN array NN hash NN getkey NN . SENT mkdir NP FILENAME NP , , MODE NN Creates VVZ the DT directory NN specified VVN by IN FILENAME NP , , with IN permissions NNS specified VVN by IN MODE NN as IN modified VVN by IN umask NN . SENT If IN it PP succeeds VVZ it PP returns VVZ 1 CD , , otherwise RB it PP returns VVZ 0 CD and CC sets NNS . SENT errno NN . SENT msgctl NN ID NN , , CMD NP , , ARG NP Calls VVZ the DT System NP V NN IPC NP function NN msgctl NP 2 CD . SENT If IN CMD NP is VBZ IPC NP STAT NN , , then RB ARG NP must MD be VB a DT variable NN which WDT will MD hold VV the DT returned VVN msqid JJ ds NP structure NN . SENT Returns NNS like IN ioctl NN . SENT the DT undefined JJ value NN for IN error NN , , 0 CD but CC true JJ for IN zero CD , , or CC the DT actual JJ return NN value NN otherwise RB . SENT msgget NN KEY NN , , FLAGS NNS Calls VVZ the DT System NP V NN IPC NP function NN msgget NP 2 CD . SENT Returns NNS the DT message NN queue NN id NN , , or CC the DT undefined JJ value NN if IN there EX is VBZ an DT error NN . SENT msgsnd NP ID NN , , MSG NP , , FLAGS NNS Calls VVZ the DT System NP V NN IPC NP function NN msgsnd NP to TO send VV the DT message NN MSG NP to TO the DT message NN queue NN ID NN . SENT MSG NP must MD begin VV with IN the DT long JJ integer NN message NN type NN , , which WDT may MD be VB created VVN with IN pack NN l NN , , type NN . SENT Returns NNS TRUE JJ if IN successful JJ , , or CC FALSE JJ if IN there EX is VBZ an DT error NN . SENT msgrcv NP ID NN , , VAR NN , , SIZE NN , , TYPE NN , , FLAGS NNS Calls VVZ the DT System NP V NN IPC NP function NN msgrcv NN to TO receive VV a DT message NN from IN message NN queue NN ID NN into IN variable JJ VAR NN with IN a DT maximum JJ message NN size NN of IN SIZE NN . SENT Note NN that IN if IN a DT message NN is VBZ received VVN , , the DT message NN type NN will MD be VB the DT first JJ thing NN in IN VAR NN , , and CC the DT maximum JJ length NN of IN VAR NN is VBZ SIZE NN plus IN the DT size NN of IN the DT message NN type NN . SENT Returns NNS TRUE JJ if IN successful JJ , , or CC FALSE JJ if IN there EX is VBZ an DT error NN . SENT my PP$ EXPR NP A NP my PP$ declares VVZ the DT listed VVN variables NNS to TO be VB local JJ lexically RB to TO the DT enclosing VVG block NN , , subroutine NN , , eval NN , , or CC do VVP require VV use NN d NN file NN . SENT If IN more JJR than IN one CD value NN is VBZ listed VVN , , the DT list NN must MD be VB placed VVN in IN parens NNS . SENT See VV Private JJ Variables NNS via IN my PP$ for IN details NNS . SENT next JJ LABEL NN next IN The DT next JJ command NN is VBZ like IN the DT continue VVP statement NN in IN C NP . SENT it PP starts VVZ the DT next JJ iteration NN of IN the DT loop NN . SENT LINE NN . SENT while IN next JJ LINE NN if IN . SENT discard VV comments NNS . SENT . SENT . SENT Note NN that IN if IN there EX were VBD a DT continue VVP block NN on IN the DT above JJ , , it PP would MD get VV executed VVN even RB on IN discarded VVN lines NNS . SENT If IN the DT LABEL NN is VBZ omitted VVN , , the DT command NN refers VVZ to TO the DT innermost JJ enclosing VVG loop NN . SENT no DT Module NN LIST NN See VV the DT use NN function NN , , which WDT no RB is VBZ the DT opposite NN of IN . SENT oct NP EXPR NP Interprets VVZ EXPR NP as IN an DT octal NN string NN and CC returns VVZ the DT corresponding JJ decimal JJ value NN . SENT If IN EXPR NP happens VVZ to TO start VV off RP with IN 0 CD x SYM , , interprets VVZ it PP as IN a DT hex NN string NN instead RB . SENT The DT following NN will MD handle VV decimal NN , , octal NN , , and CC hex NN in IN the DT standard JJ Perl NP or CC C NP notation NN . SENT val NP oct NP val NP if IN val NP 0 CD . SENT If IN EXPR NP is VBZ omitted VVN , , uses VVZ . SENT open JJ FILEHANDLE NP , , EXPR NP open JJ FILEHANDLE NP Opens VVZ the DT file NN whose WP$ filename NN is VBZ given VVN by IN EXPR NP , , and CC associates NNS it PP with IN FILEHANDLE NP . SENT If IN FILEHANDLE NP is VBZ an DT expression NN , , its PP$ value NN is VBZ used VVN as IN the DT name NN of IN the DT real JJ filehandle NN wanted VVD . SENT If IN EXPR NP is VBZ omitted VVN , , the DT scalar JJ variable NN of IN the DT same JJ name NN as IN the DT FILEHANDLE NP contains VVZ the DT filename NN . SENT If IN the DT filename NN begins VVZ with IN or CC nothing NN , , the DT file NN is VBZ opened VVN for IN input NN . SENT If IN the DT filename NN begins VVZ with IN , , the DT file NN is VBZ opened VVN for IN output NN . SENT If IN the DT filename NN begins VVZ with IN , , the DT file NN is VBZ opened VVN for IN appending VVG . SENT You PP can MD put VV a DT in IN front NN of IN the DT or CC to TO indicate VV that IN you PP want VVP both CC read VVP and CC write VVP access NN to TO the DT file NN . SENT thus RB is VBZ usually RB preferred JJ for IN read VVP write VV updates NNS the DT mode NN would MD clobber VV the DT file NN first RB . SENT These DT correspond VV to TO the DT fopen JJ 3 CD modes NNS of IN r NN , , r NN , , w NN , , w NN , , a DT , , and CC a DT . SENT If IN the DT filename NN begins VVZ with IN , , the DT filename NN is VBZ interpreted VVN as IN a DT command NN to TO which WDT output NN is VBZ to TO be VB piped VVN , , and CC if IN the DT filename NN ends VVZ with IN a DT , , the DT filename NN is VBZ interpreted VVN See VV Using VVG open JJ for IN IPC NP for IN more JJR examples NNS of IN this DT . SENT as IN command NN which WDT pipes NNS input NN to TO us PP . SENT You PP may MD not RB have VH a DT raw JJ open NN to TO a DT command NN that IN pipes NNS both CC in IN and CC out RP , , but CC see VV See VV open JJ 2 CD , , open RB 3 CD , , and CC Bidirectional NP Communication NP for IN alternatives NNS . SENT Opening NN opens VVZ STDIN NP and CC opening NN opens VVZ STDOUT NP . SENT Open JJ returns NNS non JJ zero CD upon IN success NN , , the DT undefined JJ value NN otherwise RB . SENT If IN the DT open RB involved VVN a DT pipe NN , , the DT return NN value NN happens VVZ to TO be VB the DT pid NN of IN the DT subprocess NN . SENT If IN you're NN unfortunate JJ enough RB to TO be VB running VVG Perl NP on IN a DT system NN that WDT distinguishes VVZ between IN text NN files NNS and CC binary JJ files NNS modern JJ operating NN systems NNS don't NN care NN , , then RB you PP should MD check VV out RP binmode NN for IN tips NNS for IN dealing VVG with IN this DT . SENT The DT key JJ distinction NN between IN systems NNS that WDT need VVP binmode NN and CC those DT that WDT don't NN is VBZ their PP$ text NN file NN formats NNS . SENT Systems NNS like IN Unix NP and CC Plan NP 9 CD that WDT delimit VV lines NNS with IN a DT single JJ character NN , , and CC that IN encode VV that DT character NN in IN C NP as IN n NN , , do VVP not RB need VV binmode NN . SENT The DT rest NN need VVP it PP . SENT Examples NNS . SENT ARTICLE NN 100 CD . SENT open JJ ARTICLE NN or CC die VV Can't NP find VV article NN ARTICLE NN . SENT . SENT n NN . SENT while NN . SENT . SENT . SENT open JJ LOG NN , , usr NN spool NN news NN twitlog NN . SENT log NN is VBZ reserved VVN open JJ DBASE NP , , tmp NN Tmp NN . SENT is VBZ our PP$ process NN id NN process NN argument NN list NN of IN files NNS along IN with IN any DT includes VVZ foreach NN file VV ARGV NP process NN file NN , , fh NP 00 CD . SENT sub NN process NN local JJ filename NN , , input NN . SENT input NN . SENT this DT is VBZ a DT string NN increment NN unless IN open JJ input NN , , filename NN print NN STDERR NP Can't NP open JJ filename NN . SENT . SENT n NN . SENT return NN . SENT while IN note NN use NN of IN indirection NN if IN include VV . SENT process NN 1 CD , , input NN . SENT next JJ . SENT . SENT . SENT . SENT whatever WDT You PP may MD also RB , , in IN the DT Bourne NP shell NN tradition NN , , specify VV an DT EXPR NP beginning NN with IN , , in IN which WDT case NN the DT rest NN of IN the DT string NN is VBZ interpreted VVN as IN the DT name NN of IN a DT filehandle NN or CC file NN descriptor NN , , if IN numeric JJ which WDT is VBZ to TO be VB duped VVN and CC opened VVN . SENT You PP may MD use VV after RB , , , , , , , , and NP . SENT The DT mode NN you PP specify VV should MD match VV the DT mode NN of IN the DT original JJ filehandle NN . SENT Duping VVG a DT filehandle NN does VVZ not RB take VV into IN acount NN any DT existing JJ contents NNS of IN stdio NN buffers NNS . SENT Here RB is VBZ a DT script NN that WDT saves VVZ , , redirects VVZ , , and CC restores VVZ STDOUT NP and CC STDERR NP . SENT . SENT usr NN bin NN perl NP open JJ SAVEOUT NP , , STDOUT NP . SENT open JJ SAVEERR NP , , STDERR NP . SENT open JJ STDOUT NP , , foo NP . SENT out RB die VV Can't NP redirect VV stdout NN . SENT open JJ STDERR NP , , STDOUT NP die VVP Can't NP dup VV stdout NN . SENT select JJ STDERR NP . SENT 1 LS . SENT make VV unbuffered JJ select JJ STDOUT NN . SENT 1 LS . SENT make VV unbuffered JJ print NN STDOUT NP stdout NN 1 CD n NN . SENT this DT works NNS for IN print NN STDERR NP stderr NP 1 CD n NN . SENT subprocesses NNS too RB close VV STDOUT NP . SENT close JJ STDERR NP . SENT open JJ STDOUT NP , , SAVEOUT NP . SENT open JJ STDERR NP , , SAVEERR NP . SENT print VV STDOUT NP stdout NN 2 CD n NN . SENT print VV STDERR NP stderr NP 2 CD n NN . SENT If IN you PP specify VV N NP , , where WRB N NP is VBZ a DT number NN , , then RB Perl NP will MD do VV an DT equivalent NN of IN C's NP fdopen NN of IN that DT file NN descriptor NN . SENT this DT is VBZ more RBR parsimonious JJ of IN file NN descriptors NNS . SENT For IN example NN . SENT open JJ FILEHANDLE NP , , If IN you PP open VVP a DT pipe NN on IN the DT command NN , , i NP . SENT e SYM . SENT either CC or CC , , then RB there EX is VBZ an DT implicit JJ fork VV done VVN , , and CC the DT return NN value NN of IN open JJ is VBZ the DT pid NN of IN the DT child NN within IN the DT parent NN process NN , , and CC 0 CD within IN the DT child NN process NN . SENT Use NN defined VVD pid NN to TO determine VV whether IN the DT open JJ was VBD successful JJ . SENT The DT filehandle NN behaves VVZ normally RB for IN the DT parent NN , , but CC i NP o NN to TO that DT filehandle NN is VBZ piped VVN from IN to TO the DT STDOUT NP STDIN NP of IN the DT child NN process NN . SENT In IN the DT child NN process NN the DT filehandle NN isn't NN opened VVN i NP o NN happens VVZ from IN to TO the DT new JJ STDOUT NP or CC STDIN NP . SENT Typically RB this DT is VBZ used VVN like IN the DT normal JJ piped VVN open JJ when WRB you PP want VVP to TO exercise VV more JJR control NN over IN just RB how WRB the DT pipe NN command NN gets VVZ executed JJ , , such JJ as IN when WRB you PP are VBP running VVG setuid NN , , and CC don't NN want VVP to TO have VH to TO scan VV shell NN commands NNS for IN metacharacters NNS . SENT The DT following VVG pairs NNS are VBP more JJR or CC less RBR equivalent JJ . SENT open JJ FOO NP , , tr NP a DT z NN A DT Z NN . SENT open JJ FOO NP , , exec NP tr NP , , a DT z NN , , A DT Z NP . SENT open JJ FOO NP , , cat NN n NN file NN . SENT open JJ FOO NP , , exec NP cat NN , , n NN , , file VV . SENT See VV Safe NP Pipe NP Opens VVZ for IN more JJR examples NNS of IN this DT . SENT Explicitly RB closing VVG any DT piped VVN filehandle NN causes VVZ the DT parent NN process NN to TO wait VV for IN the DT child NN to TO finish VV , , and CC returns VVZ the DT status NN value NN in IN . SENT . SENT Note NN . SENT on IN any DT operation NN which WDT may MD do VV a DT fork VV , , unflushed JJ buffers NNS remain VVP unflushed JJ in IN both DT processes NNS , , which WDT means VVZ you PP may MD need VV to TO set VV to TO avoid VV duplicate JJ output NN . SENT Using VVG the DT FileHandle NP constructor NN from IN the DT FileHandle NP package NN , , you PP can MD generate VV anonymous JJ filehandles NNS which WDT have VHP the DT scope NN of IN whatever WDT variables NNS hold VVP references NNS to TO them PP , , and CC automatically RB close VV whenever WRB and CC however RB you PP leave VVP that DT scope NN . SENT use VV FileHandle NP . SENT . SENT . SENT . SENT sub NN read VVD myfile NN munged VVD my PP$ ALL RB shift NN . SENT my PP$ handle VV new JJ FileHandle NP . SENT open VV handle VV , , myfile NN or CC die VV myfile NN . SENT . SENT . SENT first JJ or CC return NN . SENT Automatically RB closed VVN here RB . SENT mung JJ first JJ or CC die NN mung NN failed VVD . SENT Or CC here RB . SENT return NN first RB , , if IN ALL DT . SENT Or CC here RB . SENT first JJ . SENT Or CC here RB . SENT The DT filename NN that WDT is VBZ passed VVN to TO open VV will MD have VH leading JJ and CC trailing VVG whitespace NN deleted VVN . SENT In IN order NN to TO open VV a DT file NN with IN arbitrary JJ weird JJ characters NNS in IN it PP , , it's NNS necessary JJ to TO protect VV any DT leading VVG and CC trailing VVG whitespace NN thusly RB . SENT file VV s PP s PP . SENT 1 LS . SENT open JJ FOO NP , , If IN you PP want VVP a DT real JJ C NP open NN see VVP open RB 2 CD on IN your PP$ system NN , , then RB you PP should MD use VV the DT sysopen JJ function NN . SENT This DT is VBZ another DT way NN to TO protect VV your PP$ filenames NNS from IN interpretation NN . SENT For IN example NN . SENT use VV FileHandle NP . SENT sysopen VV HANDLE VV , , path NN , , O NP RDWR NP O NP CREAT NP O NP EXCL NP , , 0700 CD or CC die VV sysopen JJ path NN . SENT . SENT . SENT HANDLE VV autoflush NP 1 CD . SENT HANDLE VV print NN stuff NN n NN . SENT seek VV HANDLE VV , , 0 CD , , 0 CD . SENT print NN File NP contains VVZ . SENT , , . SENT See VV seek VV for IN some DT details NNS about IN mixing VVG reading NN and CC writing NN . SENT opendir NP DIRHANDLE NP , , EXPR NP Opens VVZ a DT directory NN named VVN EXPR NP for IN processing VVG by IN readdir NN , , telldir NP , , seekdir NP , , rewinddir NN and CC closedir NN . SENT Returns NNS TRUE JJ if IN successful JJ . SENT DIRHANDLEs NNS have VHP their PP$ own JJ namespace NN separate JJ from IN FILEHANDLEs NP . SENT ord NP EXPR NP Returns VVZ the DT numeric JJ ascii NP value NN of IN the DT first JJ character NN of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , uses VVZ . SENT pack NN TEMPLATE NN , , LIST NN Takes VVZ an DT array NN or CC list NN of IN values NNS and CC packs VVZ it PP into IN a DT binary JJ structure NN , , returning VVG the DT string NN containing VVG the DT structure NN . SENT The DT TEMPLATE NN is VBZ a DT sequence NN of IN characters NNS that WDT give VVP the DT order NN and CC type NN of IN values NNS , , as RB follows VVZ . SENT A DT An NP ascii NP string NN , , will MD be VB space NN padded VVD . SENT a DT An NP ascii NP string NN , , will MD be VB null JJ padded VVN . SENT b SYM A DT bit NN string NN ascending VVG bit NN order NN , , like IN vec NN . SENT B SYM A DT bit NN string NN descending VVG bit NN order NN . SENT h NN A DT hex NN string NN low JJ nybble NN first RB . SENT H NP A NP hex NN string NN high JJ nybble NN first RB . SENT c SYM A DT signed VVN char NN value NN . SENT C SYM An DT unsigned JJ char NN value NN . SENT s PP A DT signed VVD short JJ value NN . SENT S NP An DT unsigned JJ short JJ value NN . SENT i NP A NP signed VVD integer NN value NN . SENT I PP An DT unsigned JJ integer NN value NN . SENT l NN A DT signed VVN long JJ value NN . SENT L NP An DT unsigned JJ long JJ value NN . SENT n NN A DT short JJ in IN network NN order NN . SENT N NP A NP long RB in IN network NN order NN . SENT v NN A DT short JJ in IN VAX NP little JJ endian NN order NN . SENT V NN A DT long JJ in IN VAX NP little JJ endian NN order NN . SENT f SYM A DT single JJ precision NN float NN in IN the DT native JJ format NN . SENT d SYM A DT double JJ precision NN float NN in IN the DT native JJ format NN . SENT p NN A DT pointer NN to TO a DT null NN terminated VVD string NN . SENT P NN A DT pointer NN to TO a DT structure NN fixed JJ length NN string NN . SENT u NN A DT uuencoded JJ string NN . SENT x SYM A DT null JJ byte NN . SENT X SYM Back RB up RB a DT byte NN . SENT Null JJ fill NN to TO absolute JJ position NN . SENT Each DT letter NN may MD optionally RB be VB followed VVN by IN a DT number NN which WDT gives VVZ a DT repeat NN count NN . SENT With IN all DT types NNS except IN a DT , , A NP , , b LS , , B NP , , h NN and CC H NN , , and CC P NN the DT pack NN function NN will MD gobble VV up RP that IN many JJ values NNS from IN the DT LIST NN . SENT A DT for IN the DT repeat NN count NN means VVZ to TO use VV however RB many JJ items NNS are VBP left VVN . SENT The DT a DT and CC A DT types NNS gobble VV just RB one CD value NN , , but CC pack VV it PP as IN a DT string NN of IN length NN count NN , , padding NN with IN nulls NNS or CC spaces NNS as IN necessary JJ . SENT When WRB unpacking VVG , , A DT strips NNS trailing VVG spaces NNS and CC nulls NNS , , but CC a DT does VVZ not RB . SENT Likewise RB , , the DT b NN and CC B NN fields NNS pack VVP a DT string NN that IN many JJ bits NNS long RB . SENT The DT h NN and CC H NN fields NNS pack VVP a DT string NN that IN many JJ nybbles NNS long RB . SENT The DT P NN packs VVZ a DT pointer NN to TO a DT structure NN of IN the DT size NN indicated VVD by IN the DT length NN . SENT Real JJ numbers NNS floats VVZ and CC doubles VVZ are NN in IN the DT native JJ machine NN format NN only RB . SENT due JJ to TO the DT multiplicity NN of IN floating VVG formats NNS around RP , , and CC the DT lack NN of IN a DT standard JJ network NN representation NN , , no DT facility NN for IN interchange VV has VHZ been VBN made VVN . SENT This DT means NNS that WDT packed VVD floating JJ point NN data NNS written VVN on IN one CD machine NN may MD not RB be VB readable JJ on IN another DT even RB if IN both DT use NN IEEE NP floating JJ point NN arithmetic NN as IN the DT endian JJ ness NN of IN the DT memory NN representation NN is VBZ not RB part NN of IN the DT IEEE NP spec NN . SENT Note NN that IN Perl NP uses NNS doubles VVZ internally RB for IN all DT numeric JJ calculation NN , , and CC converting VVG from IN double RB into IN float NN and CC thence RB back RB to TO double VV again RB will MD lose VV precision NN i NP . SENT e SYM . SENT unpack VV f NN , , pack NN f NN , , foo NP will MD not RB in IN general JJ equal JJ foo NP . SENT Examples NNS . SENT foo NP pack NN cccc NN , , 65 CD , , 66 CD , , 67 CD , , 68 CD . SENT foo NP eq NP ABCD NP foo NP pack NN c SYM 4 CD , , 65 CD , , 66 CD , , 67 CD , , 68 CD . SENT same JJ thing NN foo NP pack NN ccxxcc NN , , 65 CD , , 66 CD , , 67 CD , , 68 CD . SENT foo NP eq NP AB NP 0 CD 0 CD CD NP foo NP pack VVP s PP 2 CD , , 1 CD , , 2 CD . SENT 1 CD 0 CD 2 CD 0 CD on IN little JJ endian JJ 0 CD 1 CD 0 CD 2 CD on IN big JJ endian JJ foo NP pack NN a DT 4 CD , , abcd NP , , x NN , , y NP , , z NN . SENT abcd JJ foo NP pack NN aaaa NN , , abcd NP , , x NN , , y NP , , z NN . SENT axyz NP foo NP pack VVP a DT 14 CD , , abcdefg NN . SENT abcdefg NN 0 CD 0 CD 0 CD 0 CD 0 CD 0 CD 0 CD foo NP pack NN i NP 9 CD pl NP , , gmtime NN . SENT a DT real JJ struct NN tm NN on IN my PP$ system NN anyway RB sub VV bintodec NP unpack VV N NP , , pack NN B NP 32 CD , , substr NP 0 CD x SYM 32 CD . SENT shift NN , , 32 CD . SENT The DT same JJ template NN may MD generally RB also RB be VB used VVN in IN the DT unpack VV function NN . SENT package NN NAMESPACE NN Declares VVZ the DT compilation NN unit NN as IN being VBG in IN the DT given VVN namespace NN . SENT The DT scope NN of IN the DT package NN declaration NN is VBZ from IN the DT declaration NN itself PP through IN the DT end NN of IN the DT enclosing VVG block NN the DT same JJ scope NN as IN the DT local JJ operator NN . SENT All DT further RBR unqualified JJ dynamic JJ identifiers NNS will MD be VB in IN this DT namespace NN . SENT A DT package NN statement NN only RB affects VVZ dynamic JJ variables NNS including VVG those DT you've NN used VVD local JJ on IN but CC not RB lexical JJ variables NNS created VVN with IN my PP$ . SENT Typically RB it PP would MD be VB the DT first JJ declaration NN in IN a DT file NN to TO be VB included VVN by IN the DT require VVP or CC use VVP operator NN . SENT You PP can MD switch VV into IN a DT package NN in IN more JJR than IN one CD place NN . SENT it PP merely RB influences VVZ which WDT symbol NN table NN is VBZ used VVN by IN the DT compiler NN for IN the DT rest NN of IN that DT block NN . SENT You PP can MD refer VV to TO variables NNS and CC filehandles NNS in IN other JJ packages NNS by IN prefixing VVG the DT identifier NN with IN the DT package NN name NN and CC a DT double JJ colon NN . SENT Package NN . SENT . SENT Variable JJ . SENT If IN the DT package NN name NN is VBZ null JJ , , the DT main JJ package NN as IN assumed VVN . SENT That DT is VBZ , , . SENT . SENT sail NN is VBZ equivalent JJ to TO main JJ . SENT . SENT sail NN . SENT See VV Packages NNS for IN more JJR information NN about IN packages NNS , , modules NNS , , and CC classes NNS . SENT See VV the DT perlsub NN manpage NN for IN other JJ scoping NN issues NNS . SENT pipe NN READHANDLE NP , , WRITEHANDLE NP Opens VVZ a DT pair NN of IN connected JJ pipes NNS like IN the DT corresponding JJ system NN call NN . SENT Note NN that IN if IN you PP set VVD up RP a DT loop NN of IN piped VVN processes NNS , , deadlock NN can MD occur VV unless IN you PP are VBP very RB careful JJ . SENT In IN addition NN , , note NN that IN Perl's NP pipes NNS use VVP stdio NN buffering VVG , , so RB you PP may MD need VV to TO set VV to TO flush VV your PP$ WRITEHANDLE NN after IN each DT command NN , , depending VVG on IN the DT application NN . SENT See VV open JJ 2 CD , , open RB 3 CD , , and CC Bidirectional NP Communication NP for IN examples NNS of IN such JJ things NNS . SENT pop NN ARRAY NN Pops VVZ and CC returns VVZ the DT last JJ value NN of IN the DT array NN , , shortening VVG the DT array NN by IN 1 CD . SENT Has VHZ a DT similar JJ effect NN to TO tmp NN ARRAY NN ARRAY NN . SENT If IN there EX are VBP no DT elements NNS in IN the DT array NN , , returns VVZ the DT undefined JJ value NN . SENT If IN ARRAY NN is VBZ omitted VVN , , pops VVZ the DT ARGV NP array NN in IN the DT main JJ program NN , , and CC the DT array NN in IN subroutines NNS , , just RB like IN shift NN . SENT pos NNS SCALAR JJ Returns NNS the DT offset VVP of IN where WRB the DT last JJ m NN g NN search NN left VVD off RP for IN the DT variable NN in IN question NN . SENT May MD be VB modified VVN to TO change VV that IN offset VVN . SENT print VV FILEHANDLE NP LIST NN print NN LIST NN print NN Prints NP a DT string NN or CC a DT comma NN separated JJ list NN of IN strings NNS . SENT Returns NNS TRUE JJ if IN successful JJ . SENT FILEHANDLE NP may MD be VB a DT scalar JJ variable JJ name NN , , in IN which WDT case NN the DT variable NN contains VVZ the DT name NN of IN or CC a DT reference NN to TO the DT filehandle NN , , thus RB introducing VVG one CD level NN of IN indirection NN . SENT NOTE NN . SENT If IN FILEHANDLE NP is VBZ a DT variable NN and CC the DT next JJ token JJ is VBZ a DT term NN , , it PP may MD be VB misinterpreted VVN as IN an DT operator NN unless IN you PP interpose VV a DT or CC put VV parens NNS around IN the DT arguments NNS . SENT If IN FILEHANDLE NP is VBZ omitted VVN , , prints NNS by IN default NN to TO standard JJ output NN or CC to TO the DT last JJ selected JJ output NN channel NN see VVP select JJ . SENT If IN LIST NN is VBZ also RB omitted VVN , , prints NNS to TO STDOUT NP . SENT To TO set VV the DT default NN output NN channel NN to TO something NN other JJ than IN STDOUT NP use VVP the DT select JJ operation NN . SENT Note NN that IN , , because IN print NN takes VVZ a DT LIST NN , , anything NN in IN the DT LIST NN is VBZ evaluated VVN in IN a DT list NN context NN , , and CC any DT subroutine NN that IN you PP call VVP will MD have VH one CD or CC more JJR of IN its PP$ expressions NNS evaluated VVN in IN a DT list NN context NN . SENT Also RB be VB careful JJ not RB to TO follow VV the DT print NN keyword NN with IN a DT left VVN parenthesis NN unless IN you PP want VVP the DT corresponding JJ right JJ parenthesis NN to TO terminate VV the DT arguments NNS to TO the DT print NN interpose VV a DT or CC put VV parens NNS around IN all PDT the DT arguments NNS . SENT Note NN that IN if IN you're NN storing VVG FILEHANDLES NP in IN an DT array NN or CC other JJ expression NN , , you PP will MD have VH to TO use VV a DT block NN returning VVG its PP$ value NN instead RB print NN files VVZ i NP stuff NN n NN . SENT print VV OK UH . SENT STDOUT NP . SENT STDERR NP stuff NN n NN . SENT printf NP FILEHANDLE NP LIST NN printf NN LIST NN Equivalent NN to TO a DT print NN FILEHANDLE NP sprintf NN LIST NN . SENT The DT first JJ argument NN of IN the DT list NN will MD be VB interpreted VVN as IN the DT printf NN format NN . SENT push NN ARRAY NN , , LIST NN Treats VVZ ARRAY NN as IN a DT stack NN , , and CC pushes VVZ the DT values NNS of IN LIST NN onto IN the DT end NN of IN ARRAY NN . SENT The DT length NN of IN ARRAY NN increases NNS by IN the DT length NN of IN LIST NN . SENT Has VHZ the DT same JJ effect NN as IN for IN value NN LIST NN ARRAY NN ARRAY NN value NN . SENT but CC is VBZ more RBR efficient JJ . SENT Returns VVZ the DT new JJ number NN of IN elements NNS in IN the DT array NN . SENT q NN STRING NN qq JJ STRING NN qx NN STRING NN qw JJ STRING NN Generalized VVD quotes NNS . SENT See VV the DT perlop NN manpage NN . SENT quotemeta NP EXPR NP Returns VVZ the DT value NN of IN EXPR NP with IN with IN all DT regular JJ expression NN metacharacters NNS backslashed VVD . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT Q NP escape NN in IN double JJ quoted VVN strings NNS . SENT rand NNS EXPR NP rand NN Returns VVZ a DT random JJ fractional JJ number NN between IN 0 CD and CC the DT value NN of IN EXPR NP . SENT EXPR NP should MD be VB positive JJ . SENT If IN EXPR NP is VBZ omitted VVN , , returns VVZ a DT value NN between IN 0 CD and CC 1 CD . SENT This DT function NN produces VVZ repeatable JJ sequences NNS unless IN srand NN is VBZ invoked VVN . SENT See VV also RB srand NN . SENT Note NN . SENT if IN your PP$ rand NN function NN consistently RB returns VVZ numbers NNS that WDT are VBP too RB large JJ or CC too RB small JJ , , then RB your PP$ version NN of IN Perl NP was VBD probably RB compiled VVN with IN the DT wrong JJ number NN of IN RANDBITS NP . SENT As IN a DT workaround NN , , you PP can MD usually RB multiply VV EXPR NP by IN the DT correct JJ power NN of IN 2 CD to TO get VV the DT range NN you PP want VVP . SENT This DT will MD make VV your PP$ script NN unportable NN , , however RB . SENT It's NNS better RBR to TO recompile VV if IN you PP can MD . SENT read VV FILEHANDLE NP , , SCALAR NN , , LENGTH NN , , OFFSET VV read VV FILEHANDLE NP , , SCALAR NN , , LENGTH NN Attempts NNS to TO read VV LENGTH NN bytes NNS of IN data NNS into IN variable JJ SCALAR NN from IN the DT specified JJ FILEHANDLE NP . SENT Returns VVZ the DT number NN of IN bytes NNS actually RB read VVP , , or CC undef JJ if IN there EX was VBD an DT error NN . SENT SCALAR NN will MD be VB grown VVN or CC shrunk VVN to TO the DT length NN actually RB read VVN . SENT An DT OFFSET VVN may MD be VB specified VVN to TO place VV the DT read VVN data NNS at IN some DT other JJ place NN than IN the DT beginning NN of IN the DT string NN . SENT This DT call NN is VBZ actually RB implemented VVN in IN terms NNS of IN stdio's JJ fread NN call NN . SENT To TO get VV a DT true JJ read NN system NN call NN , , see VV sysread NN . SENT readdir NP DIRHANDLE NP Returns VVZ the DT next JJ directory NN entry NN for IN a DT directory NN opened VVD by IN opendir NN . SENT If IN used VVN in IN a DT list NN context NN , , returns VVZ all PDT the DT rest NN of IN the DT entries NNS in IN the DT directory NN . SENT If IN there EX are VBP no RB more JJR entries NNS , , returns VVZ an DT undefined JJ value NN in IN a DT scalar JJ context NN or CC a DT null JJ list NN in IN a DT list NN context NN . SENT If IN you're NN planning VVG to TO filetest NNS the DT return NN values VVZ out RP of IN a DT readdir NN , , you'd NN better RBR prepend VV the DT directory NN in IN question NN . SENT Otherwise RB , , since IN we PP didn't VVD chdir NN there RB , , it PP would MD have VH been VBN testing VVG the DT wrong JJ file NN . SENT opendir NP DIR NP , , some DT dir NN die VV can't JJ opendir NN some DT dir NN . SENT . SENT . SENT dots NNS grep NN . SENT f SYM some DT dir NN readdir NN DIR NP . SENT closedir NP DIR NP . SENT readlink NP EXPR NP Returns VVZ the DT value NN of IN a DT symbolic JJ link NN , , if IN symbolic JJ links NNS are VBP implemented VVN . SENT If IN not RB , , gives VVZ a DT fatal JJ error NN . SENT If IN there EX is VBZ some DT system NN error NN , , returns VVZ the DT undefined JJ value NN and CC sets NNS . SENT errno NN . SENT If IN EXPR NP is VBZ omitted VVN , , uses VVZ . SENT recv NP SOCKET NN , , SCALAR NN , , LEN NP , , FLAGS NNS Receives VVZ a DT message NN on IN a DT socket NN . SENT Attempts NNS to TO receive VV LENGTH NN bytes NNS of IN data NNS into IN variable JJ SCALAR NN from IN the DT specified JJ SOCKET NN filehandle NN . SENT Actually RB does VVZ a DT C NP recvfrom NP , , so RB that IN it PP can MD returns NNS the DT address NN of IN the DT sender NN . SENT Returns VVZ the DT undefined JJ value NN if IN there's RB an DT error NN . SENT SCALAR NN will MD be VB grown VVN or CC shrunk VVN to TO the DT length NN actually RB read VVN . SENT Takes VVZ the DT same JJ flags NNS as IN the DT system NN call NN of IN the DT same JJ name NN . SENT See VV UDP NP . SENT Message NN Passing NN for IN examples NNS . SENT redo VV LABEL NN redo VV The DT redo VV command NN restarts NN the DT loop NN block NN without IN evaluating VVG the DT conditional JJ again RB . SENT The DT continue VVP block NN , , if IN any DT , , is VBZ not RB executed VVN . SENT If IN the DT LABEL NN is VBZ omitted VVN , , the DT command NN refers VVZ to TO the DT innermost JJ enclosing VVG loop NN . SENT This DT command NN is VBZ normally RB used VVN by IN programs NNS that WDT want VVP to TO lie VV to TO themselves PP about IN what WP was VBD just RB input NN . SENT a DT simpleminded JJ Pascal NP comment NN stripper NN warning NN . SENT assumes VVZ no RB or CC in IN strings NNS LINE NN . SENT while IN while IN s PP . SENT . SENT . SENT 1 LS s PP . SENT . SENT if IN s PP . SENT front NN . SENT while IN if IN end NN of IN comment NN . SENT s PP front RB . SENT redo VV LINE NN . SENT print NN . SENT ref NN EXPR NP Returns VVZ a DT TRUE JJ value NN if IN EXPR NP is VBZ a DT reference NN , , FALSE JJ otherwise RB . SENT The DT value NN returned VVD depends VVZ on IN the DT type NN of IN thing NN the DT reference NN is VBZ a DT reference NN to TO . SENT Builtin JJ types NNS include VVP . SENT REF NN SCALAR NN ARRAY NN HASH NN CODE NN GLOB NN If IN the DT referenced VVN object NN has VHZ been VBN blessed VVN into IN a DT package NN , , then RB that IN package NN name NN is VBZ returned VVN instead RB . SENT You PP can MD think VV of IN ref NN as IN a DT typeof JJ operator NN . SENT if IN ref NN r NN eq NP HASH NN print NN r NN is VBZ a DT reference NN to TO an DT associative JJ array NN . SENT n NN . SENT if IN . SENT ref NN r SYM print NN r NN is VBZ not RB a DT reference NN at IN all DT . SENT n NN . SENT See VV also RB the DT perlref NN manpage NN . SENT rename VV OLDNAME NP , , NEWNAME NP Changes NP the DT name NN of IN a DT file NN . SENT Returns NNS 1 CD for IN success NN , , 0 CD otherwise RB . SENT Will MD not RB work VV across IN filesystem NN boundaries NNS . SENT require VV EXPR NP require VV Demands NNS some DT semantics NNS specified VVN by IN EXPR NP , , or CC by IN if IN EXPR NP is VBZ not RB supplied VVN . SENT If IN EXPR NP is VBZ numeric JJ , , demands NNS that IN the DT current JJ version NN of IN Perl NP or CC PERL NP VERSION NN be VB equal JJ or CC greater JJR than IN EXPR NP . SENT Otherwise RB , , demands NNS that IN a DT library NN file NN be VB included VVN if IN it PP hasn't VVD already RB been VBN included VVN . SENT The DT file NN is VBZ included VVN via IN the DT do VVP FILE NN mechanism NN , , which WDT is VBZ essentially RB just RB a DT variety NN of IN eval NP . SENT Has VHZ semantics NNS similar JJ to TO the DT following VVG subroutine NN . SENT sub VV require VV local JJ filename NN . SENT return NN 1 CD if IN INC NP filename NN . SENT local JJ realfilename NN , , result NN . SENT ITER NNS . SENT foreach NN prefix NN INC NP realfilename JJ prefix NN filename NN . SENT if IN f NN realfilename NN result NN do VVP realfilename NN . SENT last JJ ITER NNS . SENT die VV Can't NP find VV filename NN in IN INC NP . SENT die VV if IN . SENT die NN filename NN did VVD not RB return VV true JJ value NN unless IN result NN . SENT INC NP filename NN realfilename NN . SENT result NN . SENT Note NN that IN the DT file NN will MD not RB be VB included VVN twice RB under IN the DT same JJ specified JJ name NN . SENT The DT file NN must MD return VV TRUE JJ as IN the DT last JJ statement NN to TO indicate VV successful JJ execution NN of IN any DT initialization NN code NN , , so RB it's NNS customary JJ to TO end VV such PDT a DT file NN with IN 1 CD . SENT unless IN you're JJ sure JJ it'll NN return NN TRUE JJ otherwise RB . SENT But CC it's NNS better RBR just RB to TO put VV the DT 1 CD . SENT , , in IN case NN you PP add VVP more JJR statements NNS . SENT If IN EXPR NP is VBZ a DT bare JJ word NN , , the DT require VVP assumes VVZ a DT . SENT pm NN extension NN for IN you PP , , to TO make VV it PP easy JJ to TO load VV standard JJ modules NNS . SENT This DT form NN of IN loading NN of IN modules NNS does VVZ not RB risk VV altering VVG your PP$ namespace NN . SENT For IN a DT yet RB more RBR powerful JJ import NN facility NN , , see VVP the DT use NN and CC the DT perlmod JJ manpage NN . SENT reset JJ EXPR NP reset NN Generally RB used VVN in IN a DT continue VVP block NN at IN the DT end NN of IN a DT loop NN to TO clear JJ variables NNS and CC reset NN . SENT . SENT searches NNS so RB that IN they PP work VVP again RB . SENT The DT expression NN is VBZ interpreted VVN as IN a DT list NN of IN single JJ characters NNS hyphens NNS allowed VVN for IN ranges NNS . SENT All DT variables NNS and CC arrays NNS beginning VVG with IN one CD of IN those DT letters NNS are VBP reset JJ to TO their PP$ pristine JJ state NN . SENT If IN the DT expression NN is VBZ omitted VVN , , one PP match VVP searches NNS . SENT pattern NN . SENT are VBP reset JJ to TO match VV again RB . SENT Only RB resets VVZ variables NNS or CC searches NNS in IN the DT current JJ package NN . SENT Always RB returns VVZ 1 CD . SENT Examples NNS . SENT reset JJ X NN . SENT reset VV all DT X NP variables NNS reset VV a DT z NN . SENT reset VV lower JJR case NN variables NNS reset JJ . SENT just RB reset JJ . SENT . SENT searches NNS Resetting VVG A DT Z NN is VBZ not RB recommended VVN since IN you'll NN wipe VV out RP your PP$ ARGV NP and CC ENV NP arrays VVZ . SENT Only RB resets VVZ package NN variables NNS lexical JJ variables NNS are VBP unaffected JJ , , but CC they PP clean VV themselves PP up RP on IN scope NN exit NN anyway RB , , so RB anymore RB you PP probably RB want VVP to TO use VV them PP instead RB . SENT See VV my PP$ . SENT return NN LIST NN Returns NNS from IN a DT subroutine NN or CC eval NN with IN the DT value NN specified VVN . SENT Note NN that IN in IN the DT absence NN of IN a DT return NN a DT subroutine NN or CC eval NN will MD automatically RB return VV the DT value NN of IN the DT last JJ expression NN evaluated VVD . SENT reverse JJ LIST NN In IN a DT list NN context NN , , returns VVZ a DT list NN value NN consisting VVG of IN the DT elements NNS of IN LIST NN in IN the DT opposite JJ order NN . SENT In IN a DT scalar JJ context NN , , returns VVZ a DT string NN value NN consisting VVG of IN the DT bytes NNS of IN the DT first JJ element NN of IN LIST NN in IN the DT opposite JJ order NN . SENT print NN reverse NN . SENT line NN tac NP undef NP . SENT print NN scalar NN reverse NN scalar NN . SENT byte NN tac NP rewinddir NP DIRHANDLE NP Sets VVZ the DT current JJ position NN to TO the DT beginning NN of IN the DT directory NN for IN the DT readdir NN routine NN on IN DIRHANDLE NP . SENT rindex NP STR NP , , SUBSTR NP , , POSITION NN rindex NN STR NP , , SUBSTR NP Works NP just RB like IN index NN except IN that WDT it PP returns VVZ the DT position NN of IN the DT LAST JJ occurrence NN of IN SUBSTR NP in IN STR NP . SENT If IN POSITION NN is VBZ specified VVN , , returns VVZ the DT last JJ occurrence NN at IN or CC before IN that DT position NN . SENT rmdir NP FILENAME NP Deletes VVZ the DT directory NN specified VVN by IN FILENAME NP if IN it PP is VBZ empty JJ . SENT If IN it PP succeeds VVZ it PP returns VVZ 1 CD , , otherwise RB it PP returns VVZ 0 CD and CC sets NNS . SENT errno NN . SENT If IN FILENAME NP is VBZ omitted VVN , , uses VVZ . SENT s PP The DT substitution NN operator NN . SENT See VV the DT perlop NN manpage NN . SENT scalar JJ EXPR NP Forces NPS EXPR NP to TO be VB interpreted VVN in IN a DT scalar JJ context NN and CC returns VVZ the DT value NN of IN EXPR NP . SENT counts NNS scalar JJ a DT , , scalar JJ b NN , , scalar JJ c NN . SENT There EX is VBZ no DT equivalent JJ operator NN to TO force VV an DT expression NN to TO be VB interpolated VVN in IN a DT list NN context NN because IN it's NNS in IN practice NN never RB needed VVN . SENT If IN you PP really RB wanted VVD to TO do VV so RB , , however RB , , you PP could MD use VV the DT construction NN some DT expression NN , , but CC usually RB a DT simple JJ some DT expression NN suffices VVZ . SENT seek VV FILEHANDLE NP , , POSITION NN , , WHENCE RB Randomly RB positions VVZ the DT file NN pointer NN for IN FILEHANDLE NP , , just RB like IN the DT fseek NN call NN of IN stdio NN . SENT FILEHANDLE NP may MD be VB an DT expression NN whose WP$ value NN gives VVZ the DT name NN of IN the DT filehandle NN . SENT The DT values NNS for IN WHENCE RB are VBP 0 CD to TO set VV the DT file NN pointer NN to TO POSITION NN , , 1 CD to TO set VV the DT it PP to IN current JJ plus NN POSITION NN , , and CC 2 LS to TO set VV it PP to TO EOF NP plus CC offset VVN . SENT You PP may MD use VV the DT values NNS SEEK VVP SET VVN , , SEEK VV CUR NN , , and CC SEEK VV END NN for IN this DT from IN POSIX NP module NN . SENT Returns NNS 1 CD upon IN success NN , , 0 CD otherwise RB . SENT On IN some DT systems NNS you PP have VHP to TO do VV a DT seek VV whenever WRB you PP switch VVP between IN reading VVG and CC writing VVG . SENT Amongst IN other JJ things NNS , , this DT may MD have VH the DT effect NN of IN calling VVG stdio's NNS clearerr NP 3 CD . SENT A DT whence RB of IN 1 CD SEEK VVP CUR NN is VBZ useful JJ for IN not RB moving VVG the DT file NN pointer NN . SENT seek VV TEST NN , , 0 CD , , 1 CD . SENT This DT is VBZ also RB useful JJ for IN applications NNS emulating VVG tail JJ f NN . SENT Once RB you PP hit VVD EOF NP on IN your PP$ read NN , , and CC then RB sleep VV for IN a DT while NN , , you PP might MD have VH to TO stick VV in IN a DT seek VVP to TO reset VV things NNS . SENT First RB the DT simple JJ trick NN listed VVN above IN to TO clear VV the DT filepointer NN . SENT The DT seek VVP doesn't JJ change NN the DT current JJ position NN , , but CC it PP does VVZ clear VV the DT end NN of IN file NN condition NN on IN the DT handle VVP , , so RB that IN the DT next JJ FILE NN makes VVZ Perl NP try VV again RB to TO read VV something NN . SENT Hopefully RB . SENT If IN that DT doesn't JJ work NN some DT stdios NNS are VBP particularly RB cantankerous JJ , , then RB you PP may MD need VV something NN more JJR like IN this DT . SENT for IN . SENT . SENT for IN curpos NNS tell VVP FILE VV . SENT . SENT curpos NNS tell VVP FILE VV search NN for IN some DT stuff NN and CC put VV it PP into IN files NNS sleep VVP for IN a DT while NN . SENT seek VV FILE VV , , curpos NNS , , 0 CD . SENT seekdir NP DIRHANDLE NP , , POS NNS Sets VVZ the DT current JJ position NN for IN the DT readdir NN routine NN on IN DIRHANDLE NP . SENT POS NNS must MD be VB a DT value NN returned VVN by IN telldir NP . SENT Has VHZ the DT same JJ caveats NNS about IN possible JJ directory NN compaction NN as IN the DT corresponding JJ system NN library NN routine NN . SENT select JJ FILEHANDLE NP select JJ Returns NNS the DT currently RB selected VVN filehandle NN . SENT Sets VVZ the DT current JJ default NN filehandle NN for IN output NN , , if IN FILEHANDLE NP is VBZ supplied VVN . SENT This DT has VHZ two CD effects NNS . SENT first RB , , a DT write VVP or CC a DT print NN without IN a DT filehandle NN will MD default VV to TO this DT FILEHANDLE NP . SENT Second RB , , references NNS to TO variables NNS related VVN to TO output NN will MD refer VV to TO this DT output NN channel NN . SENT For IN example NN , , if IN you PP have VHP to TO set VV the DT top NN of IN form NN format NN for IN more JJR than IN one CD output NN channel NN , , you PP might MD do VV the DT following NN . SENT select JJ REPORT NN 1 CD . SENT report NN 1 CD top NN . SENT select JJ REPORT NN 2 CD . SENT report NN 2 CD top NN . SENT FILEHANDLE NP may MD be VB an DT expression NN whose WP$ value NN gives VVZ the DT name NN of IN the DT actual JJ filehandle NN . SENT Thus RB . SENT oldfh NP select JJ STDERR NP . SENT 1 LS . SENT select JJ oldfh NN . SENT Some DT programmers NNS may MD prefer VV to TO think VV of IN filehandles NNS as IN objects NNS with IN methods NNS , , preferring VVG to TO write VV the DT last JJ example NN as RB . SENT use VV FileHandle NP . SENT STDERR NP autoflush NP 1 CD . SENT select JJ RBITS NP , , WBITS NP , , EBITS NP , , TIMEOUT NN This DT calls VVZ the DT select JJ 2 CD system NN call NN with IN the DT bitmasks NNS specified VVN , , which WDT can MD be VB constructed VVN using VVG fileno NN and CC vec NN , , along IN these DT lines NNS . SENT rin NP win VVP ein NP . SENT vec NP rin NP , , fileno NP STDIN NP , , 1 CD 1 CD . SENT vec NN win NN , , fileno NP STDOUT NP , , 1 CD 1 CD . SENT ein NP rin NP win VV . SENT If IN you PP want VVP to TO select VV on IN many JJ filehandles NNS you PP might MD wish VV to TO write VV a DT subroutine NN . SENT sub NN fhbits NNS local JJ fhlist NN split NN , , 0 CD . SENT local JJ bits NNS . SENT for IN fhlist NN vec NN bits NNS , , fileno NN , , 1 CD 1 CD . SENT bits NNS . SENT rin NP fhbits VVZ STDIN NP TTY NP SOCK VV . SENT The DT usual JJ idiom NN is VBZ . SENT nfound NN , , timeleft NN select JJ rout NN rin NP , , wout NNS win VVP , , eout JJ ein NP , , timeout NN . SENT or CC to TO block VV until IN something NN becomes VVZ ready JJ just RB do VVP this DT nfound JJ select JJ rout NN rin NP , , wout NNS win VVP , , eout JJ ein NP , , undef JJ . SENT Most JJS systems NNS do VVP not RB both CC to TO return VV anything NN useful JJ in IN timeleft NN , , so RB calling VVG select JJ in IN a DT scalar JJ context NN just RB returns VVZ nfound NN . SENT Any DT of IN the DT bitmasks NNS can MD also RB be VB undef JJ . SENT The DT timeout NN , , if IN specified VVN , , is VBZ in IN seconds NNS , , which WDT may MD be VB fractional JJ . SENT Note NN . SENT not RB all DT implementations NNS are VBP capable JJ of IN returning VVG the DT timeleft NN . SENT If IN not RB , , they PP always RB return VV timeleft NN equal JJ to TO the DT supplied VVN timeout NN . SENT You PP can MD effect VV a DT 250 CD microsecond NN sleep VVP this DT way NN . SENT select JJ undef JJ , , undef JJ , , undef JJ , , 0 CD . SENT 25 CD . SENT WARNING NN . SENT Do VVP not RB attempt VV to TO mix NN buffered VVD I PP O NN like IN read NN or CC FH NP with IN select JJ . SENT You PP have VHP to TO use VV sysread NN instead RB . SENT semctl NN ID NN , , SEMNUM NP , , CMD NP , , ARG NP Calls VVZ the DT System NP V NN IPC NP function NN semctl NN . SENT If IN CMD NP is VBZ IPC NP STAT NN or CC GETALL NP , , then RB ARG NP must MD be VB a DT variable NN which WDT will MD hold VV the DT returned VVN semid JJ ds NP structure NN or CC semaphore NN value NN array NN . SENT Returns NNS like IN ioctl NN . SENT the DT undefined JJ value NN for IN error NN , , 0 CD but CC true JJ for IN zero CD , , or CC the DT actual JJ return NN value NN otherwise RB . SENT semget NN KEY NN , , NSEMS NP , , FLAGS NNS Calls VVZ the DT System NP V NN IPC NP function NN semget NN . SENT Returns VVZ the DT semaphore NN id NN , , or CC the DT undefined JJ value NN if IN there EX is VBZ an DT error NN . SENT semop NN KEY NN , , OPSTRING NP Calls VVZ the DT System NP V NN IPC NP function NN semop NN to TO perform VV semaphore NN operations NNS such JJ as IN signaling VVG and CC waiting VVG . SENT OPSTRING NP must MD be VB a DT packed JJ array NN of IN semop NN structures NNS . SENT Each DT semop NN structure NN can MD be VB generated VVN with IN pack NN sss NN , , semnum NN , , semop NN , , semflag NN . SENT The DT number NN of IN semaphore NN operations NNS is VBZ implied VVN by IN the DT length NN of IN OPSTRING NP . SENT Returns NNS TRUE JJ if IN successful JJ , , or CC FALSE JJ if IN there EX is VBZ an DT error NN . SENT As IN an DT example NN , , the DT following VVG code NN waits VVZ on IN semaphore NN semnum NN of IN semaphore NN id NN semid NN . SENT semop NN pack NN sss NN , , semnum NN , , 1 CD , , 0 CD . SENT die VV Semaphore NN trouble NN . SENT . SENT n NN unless IN semop NN semid NN , , semop NN . SENT To TO signal VV the DT semaphore NN , , replace VV 1 CD with IN 1 CD . SENT send VV SOCKET NN , , MSG NP , , FLAGS NNS , , TO TO send VV SOCKET NN , , MSG NP , , FLAGS NNS Sends VVZ a DT message NN on IN a DT socket NN . SENT Takes VVZ the DT same JJ flags NNS as IN the DT system NN call NN of IN the DT same JJ name NN . SENT On IN unconnected JJ sockets NNS you PP must MD specify VV a DT destination NN to TO send VV TO TO , , in IN which WDT case NN it PP does VVZ a DT C NP sendto NN . SENT Returns VVZ the DT number NN of IN characters NNS sent VVN , , or CC the DT undefined JJ value NN if IN there EX is VBZ an DT error NN . SENT See VV UDP NP . SENT Message NN Passing NN for IN examples NNS . SENT setpgrp NP PID NP , , PGRP NP Sets VVZ the DT current JJ process NN group NN for IN the DT specified JJ PID NN , , 0 CD for IN the DT current JJ process NN . SENT Will MD produce VV a DT fatal JJ error NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV setpgrp NP 2 CD . SENT setpriority NN WHICH WDT , , WHO WP , , PRIORITY NN Sets VVZ the DT current JJ priority NN for IN a DT process NN , , a DT process NN group NN , , or CC a DT user NN . SENT See VV setpriority NN 2 CD . SENT Will MD produce VV a DT fatal JJ error NN if IN used VVN on IN a DT machine NN that WDT doesn't VVD implement VV setpriority NN 2 CD . SENT setsockopt JJ SOCKET NN , , LEVEL NN , , OPTNAME NP , , OPTVAL NP Sets VVZ the DT socket NN option NN requested VVD . SENT Returns NNS undefined JJ if IN there EX is VBZ an DT error NN . SENT OPTVAL NP may MD be VB specified VVN as RB undef JJ if IN you PP don't VVD want VV to TO pass VV an DT argument NN . SENT shift NN ARRAY NN shift NN Shifts VVZ the DT first JJ value NN of IN the DT array NN off RB and CC returns VVZ it PP , , shortening VVG the DT array NN by IN 1 CD and CC moving VVG everything NN down RB . SENT If IN there EX are VBP no DT elements NNS in IN the DT array NN , , returns VVZ the DT undefined JJ value NN . SENT If IN ARRAY NN is VBZ omitted VVN , , shifts VVZ the DT ARGV NP array NN in IN the DT main JJ program NN , , and CC the DT array NN in IN subroutines NNS . SENT This DT is VBZ determined VVN lexically RB . SENT See VV also RB unshift NN , , push VV , , and CC pop NN . SENT Shift NN and CC unshift NN do VVP the DT same JJ thing NN to TO the DT left VVN end NN of IN an DT array NN that IN push NN and CC pop NN do VVP to TO the DT right JJ end NN . SENT shmctl NN ID NN , , CMD NP , , ARG NP Calls VVZ the DT System NP V NN IPC NP function NN shmctl NN . SENT If IN CMD NP is VBZ IPC NP STAT NN , , then RB ARG NP must MD be VB a DT variable NN which WDT will MD hold VV the DT returned VVN shmid NN ds NP structure NN . SENT Returns NNS like IN ioctl NN . SENT the DT undefined JJ value NN for IN error NN , , 0 CD but CC true JJ for IN zero CD , , or CC the DT actual JJ return NN value NN otherwise RB . SENT shmget NN KEY NN , , SIZE NN , , FLAGS NNS Calls VVZ the DT System NP V NN IPC NP function NN shmget NN . SENT Returns VVZ the DT shared VVN memory NN segment NN id NN , , or CC the DT undefined JJ value NN if IN there EX is VBZ an DT error NN . SENT shmread NN ID NN , , VAR NN , , POS NNS , , SIZE NN shmwrite NN ID NN , , STRING NN , , POS NNS , , SIZE NN Reads VVZ or CC writes VVZ the DT System NP V NN shared VVD memory NN segment NN ID NN starting VVG at IN position NN POS NNS for IN size NN SIZE NN by IN attaching VVG to TO it PP , , copying VVG in IN out RB , , and CC detaching VVG from IN it PP . SENT When WRB reading NN , , VAR NN must MD be VB a DT variable NN which WDT will MD hold VV the DT data NNS read VVP . SENT When WRB writing VVG , , if IN STRING NN is VBZ too RB long JJ , , only JJ SIZE NN bytes NNS are VBP used VVN . SENT if IN STRING NN is VBZ too RB short JJ , , nulls NNS are VBP written VVN to TO fill VV out RP SIZE NN bytes NNS . SENT Return NN TRUE JJ if IN successful JJ , , or CC FALSE JJ if IN there EX is VBZ an DT error NN . SENT shutdown NN SOCKET NN , , HOW WRB Shuts VVZ down RP a DT socket NN connection NN in IN the DT manner NN indicated VVD by IN HOW WRB , , which WDT has VHZ the DT same JJ interpretation NN as IN in IN the DT system NN call NN of IN the DT same JJ name NN . SENT sin NN EXPR NP Returns VVZ the DT sine NN of IN EXPR NP expressed VVD in IN radians NNS . SENT If IN EXPR NP is VBZ omitted VVN , , returns NNS sine IN of IN . SENT sleep VV EXPR NP sleep NN Causes VVZ the DT script NN to TO sleep VV for IN EXPR NP seconds NNS , , or CC forever RB if IN no DT EXPR NP . SENT May MD be VB interrupted VVN by IN sending VVG the DT process NN a DT SIGALRM NN . SENT Returns VVZ the DT number NN of IN seconds NNS actually RB slept VVD . SENT You PP probably RB cannot JJ mix NN alarm NN and CC sleep NN calls NNS , , since IN sleep NN is VBZ often RB implemented VVN using VVG alarm NN . SENT On IN some DT older JJR systems NNS , , it PP may MD sleep VV up RP to TO a DT full JJ second JJ less JJR than IN what WP you PP requested VVD , , depending VVG on IN how WRB it PP counts VVZ seconds NNS . SENT Most RBS modern JJ systems NNS always RB sleep VVP the DT full JJ amount NN . SENT For IN delays NNS of IN finer JJR granularity NN than IN one CD second NN , , you PP may MD use VV Perl's NP syscall NN interface NN to TO access NN setitimer NN 2 CD if IN your PP$ system NN supports VVZ it PP , , or CC else RB see VVP select VV below RB . SENT socket NN SOCKET NN , , DOMAIN NN , , TYPE NN , , PROTOCOL NN Opens VVZ a DT socket NN of IN the DT specified JJ kind NN and CC attaches VVZ it PP to TO filehandle NN SOCKET NN . SENT DOMAIN NN , , TYPE NN and CC PROTOCOL NN are VBP specified VVN the DT same JJ as RB for IN the DT system NN call NN of IN the DT same JJ name NN . SENT You PP should MD use VV Socket NN . SENT first JJ to TO get VV the DT proper JJ definitions NNS imported VVN . SENT See VV the DT example NN in IN Sockets NNS . SENT Client NN Server NP Communication NP . SENT socketpair NN SOCKET NN 1 CD , , SOCKET NN 2 CD , , DOMAIN NN , , TYPE NN , , PROTOCOL NN Creates VVZ an DT unnamed JJ pair NN of IN sockets NNS in IN the DT specified JJ domain NN , , of IN the DT specified JJ type NN . SENT DOMAIN NN , , TYPE NN and CC PROTOCOL NN are VBP specified VVN the DT same JJ as RB for IN the DT system NN call NN of IN the DT same JJ name NN . SENT If IN unimplemented JJ , , yields VVZ a DT fatal JJ error NN . SENT Returns NNS TRUE JJ if IN successful JJ . SENT sort NN SUBNAME NP LIST NN sort NN BLOCK NN LIST NN sort NN LIST NN Sorts NNS the DT LIST NN and CC returns VVZ the DT sorted VVN list NN value NN . SENT Nonexistent JJ values NNS of IN arrays NNS are VBP stripped VVN out RP . SENT If IN SUBNAME NP or CC BLOCK NN is VBZ omitted VVN , , sorts NNS in IN standard JJ string NN comparison NN order NN . SENT If IN SUBNAME NP is VBZ specified VVN , , it PP gives VVZ the DT name NN of IN a DT subroutine NN that WDT returns VVZ an DT integer NN less RBR than IN , , equal JJ to TO , , or CC greater JJR than IN 0 CD , , depending VVG on IN how WRB the DT elements NNS of IN the DT array NN are VBP to TO be VB ordered VVN . SENT The DT and CC cmp NN operators NNS are VBP extremely RB useful JJ in IN such JJ routines NNS . SENT SUBNAME NP may MD be VB a DT scalar JJ variable JJ name NN , , in IN which WDT case NN the DT value NN provides VVZ the DT name NN of IN the DT subroutine NN to TO use VV . SENT In IN place NN of IN a DT SUBNAME NP , , you PP can MD provide VV a DT BLOCK NN as IN an DT anonymous JJ , , in IN line NN sort NN subroutine NN . SENT In IN the DT interests NNS of IN efficiency NN the DT normal JJ calling VVG code NN for IN subroutines NNS is VBZ bypassed VVN , , with IN the DT following VVG effects NNS . SENT the DT subroutine NN may MD not RB be VB a DT recursive JJ subroutine NN , , and CC the DT two CD elements NNS to TO be VB compared VVN are VBP passed VVN into IN the DT subroutine NN not RB via IN but CC as IN the DT package NN global JJ variables NNS a DT and CC b LS see VV example NN below RB . SENT They PP are VBP passed VVN by IN reference NN , , so RB don't VVD modify VV a DT and CC b LS . SENT And CC don't NN try VVP to TO declare VV them PP as IN lexicals NNS either RB . SENT Examples NNS . SENT sort VV lexically RB articles NNS sort NN files NNS . SENT same JJ thing NN , , but CC with IN explicit JJ sort NN routine JJ articles NNS sort VV a DT cmp NN b SYM files NNS . SENT now RB case NN insensitively RB articles NNS sort NN uc NN a DT cmp NN uc NN b SYM files NNS . SENT same JJ thing NN in IN reversed JJ order NN articles NNS sort RB b SYM cmp NN a DT files NNS . SENT sort NN numerically RB ascending VVG articles NNS sort VV a DT b NN files NNS . SENT sort NN numerically RB descending VVG articles NNS sort RB b SYM a DT files NNS . SENT sort NN using VVG explicit JJ subroutine NN name NN sub NN byage NN age NN a DT age NN b SYM . SENT presuming VVG integers NNS sortedclass JJ sort NN byage NN class NN . SENT this DT sorts NNS the DT age NN associative JJ arrays NNS by IN value NN instead RB of IN key NN using VVG an DT inline NN function NN eldest JJ sort NN age NN b SYM age NN a DT keys NNS age NN . SENT sub NN backwards RB b SYM cmp NN a DT . SENT harry VV dog NN , , cat NN , , x NN , , Cain NP , , Abel NP . SENT george NP gone VVN , , chased VVD , , yz NP , , Punished VVN , , Axed VVD . SENT print NN sort NN harry VV . SENT prints VVZ AbelCaincatdogx NP print NN sort NN backwards RB harry VV . SENT prints NNS xdogcatCainAbel NN print NN sort NN george NP , , to TO , , harry VV . SENT prints VVZ AbelAxedCainPunishedcatchaseddoggonetoxyz NP inefficiently RB sort NN by IN descending VVG numeric JJ compare VVP using VVG the DT first JJ integer NN after IN the DT first JJ sign NN , , or CC the DT whole JJ record NN case NN insensitively RB otherwise RB new JJ sort NN b NN d SYM 0 CD a NN d SYM 0 CD uc NN a DT cmp NN uc NN b SYM old JJ . SENT same JJ thing NN , , but CC much RB more RBR efficiently RB . SENT we'll JJ build VVP auxiliary JJ indices NN instead RB for IN speed NN nums NNS caps NNS . SENT for IN old JJ push NN nums NNS , , d LS . SENT push NN caps NNS , , uc NN . SENT new JJ old JJ sort NN nums NNS b SYM nums NNS a DT caps NNS a DT cmp NN caps NNS b SYM 0 CD . SENT . SENT old JJ . SENT same JJ thing NN using VVG a DT Schwartzian NP Transform VV no DT temps NNS new JJ map VVP 0 CD sort NN b SYM 1 CD a NN 1 LS a DT 2 CD cmp NN b SYM 2 CD map NN , , d NN , , uc NN old JJ . SENT If IN you're NN and CC using VVG strict JJ , , you PP MUST MD NOT RB declare VV a DT and CC b LS as IN lexicals NNS . SENT They PP are VBP package NN globals NNS . SENT That DT means VVZ if IN you're NN in IN the DT main JJ package NN , , it's NNS articles NNS sort RB main JJ . SENT . SENT b SYM main JJ . SENT . SENT a DT files NNS . SENT or CC just RB articles NNS sort NN . SENT . SENT b LS . SENT . SENT a DT files NNS . SENT but CC if IN you're NN in IN the DT FooPack NP package NN , , it's NNS articles NNS sort NN FooPack NP . SENT . SENT b SYM FooPack NP . SENT . SENT a DT files NNS . SENT splice NN ARRAY NN , , OFFSET VVN , , LENGTH NN , , LIST NN splice NN ARRAY NN , , OFFSET VVN , , LENGTH NN splice NN ARRAY NN , , OFFSET VVP Removes VVZ the DT elements NNS designated VVN by IN OFFSET VVN and CC LENGTH NN from IN an DT array NN , , and CC replaces VVZ them PP with IN the DT elements NNS of IN LIST NN , , if IN any DT . SENT Returns VVZ the DT elements NNS removed VVN from IN the DT array NN . SENT The DT array NN grows VVZ or CC shrinks VVZ as RB necessary JJ . SENT If IN LENGTH NN is VBZ omitted VVN , , removes VVZ everything NN from IN OFFSET VVN onward RB . SENT The DT following VVG equivalencies NNS hold VVP assuming VVG 0 CD . SENT push VV a DT , , x NN , , y NN splice NN a DT , , a DT 1 CD , , 0 CD , , x NN , , y NN pop NN a DT splice NN a DT , , 1 CD shift NN a DT splice NN a DT , , 0 CD , , 1 CD unshift NN a DT , , x NN , , y NN splice NN a DT , , 0 CD , , 0 CD , , x NN , , y NP a DT x NN y NN splice VV a DT , , x NN , , 1 CD , , y NP . SENT Example NN , , assuming VVG array NN lengths NNS are VBP passed VVN before IN arrays NNS . SENT sub NN aeq NNS compare VVP two CD list NN values VVZ local JJ a DT splice NN , , 0 CD , , shift NN . SENT local NN b SYM splice NN , , 0 CD , , shift NN . SENT return NN 0 CD unless IN a DT b NN . SENT same JJ len NP . SENT while IN a DT return NN 0 CD if IN pop NN a DT ne RB pop JJ b NN . SENT return NN 1 CD . SENT if IN aeq NP len NP , , foo NP 1 CD . SENT . SENT len NP , , 0 CD bar NN , , bar NN . SENT . SENT . SENT split NN PATTERN NN , , EXPR NP , , LIMIT NN split NN PATTERN NN , , EXPR NP split NN PATTERN NN split VVD Splits NPS a DT string NN into IN an DT array NN of IN strings NNS , , and CC returns VVZ it PP . SENT If IN not RB in IN a DT list NN context NN , , returns VVZ the DT number NN of IN fields NNS found VVN and CC splits VVZ into IN the DT array NN . SENT In IN a DT list NN context NN , , you PP can MD force VV the DT split NN into IN by IN using VVG . SENT . SENT as IN the DT pattern NN delimiters NNS , , but CC it PP still RB returns VVZ the DT array NN value NN . SENT The DT use NN of IN implicit JJ split NN to TO is VBZ deprecated VVN , , however RB . SENT If IN EXPR NP is VBZ omitted VVN , , splits VVZ the DT string NN . SENT If IN PATTERN NN is VBZ also RB omitted VVN , , splits VVZ on IN whitespace NN after IN skipping VVG any DT leading JJ whitespace NN . SENT Anything NN matching NN PATTERN NN is VBZ taken VVN to TO be VB a DT delimiter NN separating VVG the DT fields NNS . SENT Note NN that IN the DT delimiter NN may MD be VB longer JJR than IN one CD character NN . SENT If IN LIMIT NN is VBZ specified VVN and CC is VBZ not RB negative JJ , , splits VVZ into IN no DT more JJR than IN that DT many JJ fields NNS though IN it PP may MD split VV into IN fewer JJR . SENT If IN LIMIT NN is VBZ unspecified JJ , , trailing VVG null JJ fields NNS are VBP stripped JJ which WDT potential JJ users NNS of IN pop NN would MD do VV well RB to TO remember VV . SENT If IN LIMIT NN is VBZ negative JJ , , it PP is VBZ treated VVN as RB if IN an DT arbitrarily RB large JJ LIMIT NN had VHD been VBN specified VVN . SENT A DT pattern NN matching VVG the DT null JJ string NN not RB to TO be VB confused VVN with IN a DT null JJ pattern NN , , which WDT is VBZ just RB one CD member NN of IN the DT set NN of IN patterns NNS matching VVG a DT null JJ string NN will MD split VV the DT value NN of IN EXPR NP into IN separate JJ characters NNS at IN each DT point NN it PP matches VVZ that DT way NN . SENT For IN example NN . SENT print VV join VV . SENT , , split NN , , hi NP there RB . SENT produces VVZ the DT output NN h NN . SENT i NP . SENT t NN . SENT h NN . SENT e SYM . SENT r SYM . SENT e SYM . SENT The DT LIMIT NN parameter NN can MD be VB used VVN to TO partially RB split VV a DT line NN login NN , , passwd NP , , remainder NN split NN . SENT , , , , 3 CD . SENT When WRB assigning VVG to TO a DT list NN , , if IN LIMIT NN is VBZ omitted VVN , , Perl NP supplies VVZ a DT LIMIT NN one CD larger JJR than IN the DT number NN of IN variables NNS in IN the DT list NN , , to TO avoid VV unnecessary JJ work NN . SENT For IN the DT list NN above IN LIMIT NN would MD have VH been VBN 4 CD by IN default NN . SENT In IN time NN critical JJ applications NNS it PP behooves VVZ you PP not RB to TO split VV into IN more JJR fields NNS than IN you PP really RB need VVP . SENT If IN the DT PATTERN NN contains VVZ parentheses NNS , , additional JJ array NN elements NNS are VBP created VVN from IN each DT matching JJ substring NN in IN the DT delimiter NN . SENT split JJ , , , , 1 CD 10 CD , , 20 CD . SENT produces VVZ the DT list NN value NN 1 CD , , , , 10 CD , , , , , , 20 CD If IN you PP had VHD the DT entire JJ header NN of IN a DT normal JJ Unix NP email NP message NN in IN header NN , , you PP could MD split VV it PP up RP into IN fields NNS and CC their PP$ values NNS this DT way NN . SENT header NN s PP n NN s PP g NN . SENT fix VV continuation NN lines NNS hdrs NNS UNIX NP FROM IN split NN . SENT . SENT . SENT s PP m NN , , header NN . SENT The DT pattern NN PATTERN NN may MD be VB replaced VVN with IN an DT expression NN to TO specify VV patterns NNS that WDT vary VVP at IN runtime NN . SENT To TO do VV runtime NN compilation NN only RB once RB , , use VVP variable JJ o NN . SENT As IN a DT special JJ case NN , , specifying VVG a DT PATTERN NN of IN space NN will MD split VV on IN white JJ space NN just RB as IN split NN with IN no DT arguments NNS does VVZ . SENT Thus RB , , split NN can MD be VB used VVN to TO emulate VV awk's JJ default NN behavior NN , , whereas IN split NN will MD give VV you PP as IN many JJ null JJ initial JJ fields NNS as IN there EX are VBP leading VVG spaces NNS . SENT A DT split NN on IN s PP is VBZ like IN a DT split NN except IN that WDT any DT leading JJ whitespace NN produces VVZ a DT null JJ first JJ field NN . SENT A DT split NN with IN no DT arguments NNS really RB does VVZ a DT split NN , , internally RB . SENT Example NN . SENT open JJ passwd NN , , etc FW passwd NN . SENT while IN login NN , , passwd NP , , uid NN , , gid NN , , gcos NNS , , home NN , , shell NN split NN . SENT . SENT . SENT . SENT . SENT Note NN that IN shell NN above RB will MD still RB have VH a DT newline NN on IN it PP . SENT See VV chop VV , , chomp VV , , and CC join VV . SENT sprintf NN FORMAT NN , , LIST NN Returns NNS a DT string NN formatted VVN by IN the DT usual JJ printf NN conventions NNS of IN the DT C NP language NN . SENT See VV sprintf NP 3 CD or CC printf NP 3 CD on IN your PP$ system NN for IN details NNS . SENT The DT character NN for IN an DT indirectly RB specified VVN length NN is VBZ not RB supported VVN , , but CC you PP can MD get VV the DT same JJ effect NN by IN interpolating VVG a DT variable NN into IN the DT pattern NN . SENT Some DT C NP libraries NNS implementations NNS of IN sprintf NN can MD dump VV core NN when WRB fed VVN ludicrous JJ arguments NNS . SENT sqrt NP EXPR NP Return NN the DT square JJ root NN of IN EXPR NP . SENT If IN EXPR NP is VBZ omitted VVN , , returns VVZ square JJ root NN of IN . SENT srand NP EXPR NP Sets VVZ the DT random JJ number NN seed NN for IN the DT rand NN operator NN . SENT If IN EXPR NP is VBZ omitted VVN , , does VVZ srand NN time NN . SENT Many JJ folks NNS use VVP an DT explicit JJ srand NN time NN instead RB . SENT Of IN course NN , , you'd JJ need NN something NN much RB more RBR random JJ than IN that DT for IN cryptographic JJ purposes NNS , , since IN it's NNS easy JJ to TO guess VV the DT current JJ time NN . SENT Checksumming VVG the DT compressed VVN output NN of IN rapidly RB changing VVG operating VVG system NN status NN programs NNS is VBZ the DT usual JJ method NN . SENT Examples NNS are VBP posted VVN regularly RB to TO the DT comp NN . SENT security NN . SENT unix NP newsgroup NN . SENT stat NN FILEHANDLE NP stat NN EXPR NP Returns VVZ a DT 13 CD element NN array NN giving VVG the DT status NN info NN for IN a DT file NN , , either CC the DT file NN opened VVD via IN FILEHANDLE NP , , or CC named VVN by IN EXPR NP . SENT Returns VVZ a DT null JJ list NN if IN the DT stat NN fails VVZ . SENT Typically RB used VVN as RB follows VVZ . SENT dev NP , , ino NP , , mode NN , , nlink NP , , uid NN , , gid NN , , rdev NP , , size NN , , atime NN , , mtime NN , , ctime NN , , blksize JJ , , blocks NNS stat NN filename NN . SENT Not RB all DT fields NNS are VBP supported VVN on IN all DT filesystem NN types NNS . SENT Here RB are VBP the DT meaning NN of IN the DT fields NNS . SENT dev NP device NN number NN of IN filesystem NN ino NN inode NN number NN mode NN file NN mode NN type NN and CC permissions NNS nlink NN number NN of IN hard JJ links NNS to TO the DT file NN uid NN numeric JJ user NN ID NN of IN file's NNS owner NN gid NN numer NN group NN ID NN of IN file's NNS owner NN rdev NN the DT device NN identifier NN special JJ files NNS only RB size VVP total JJ size NN of IN file NN , , in IN bytes NNS atime JJ last JJ access NN time NN since IN the DT epoch NN mtime RB last RB modify VV time NN since IN the DT epoch NN ctime NN inode NN change NN time NN NOT RB creation NN type NN . SENT since IN the DT epoch NN blksize JJ preferred JJ blocksize NN for IN file NN system NN I NP O NP blocks VVZ actual JJ number NN of IN blocks NNS allocated VVD The DT epoch NN was VBD at IN 00 CD . SENT 00 CD January NP 1 CD , , 1970 CD GMT NN . SENT If IN stat NN is VBZ passed VVN the DT special JJ filehandle NN consisting VVG of IN an DT underline NN , , no DT stat NN is VBZ done VVN , , but CC the DT current JJ contents NNS of IN the DT stat NN structure NN from IN the DT last JJ stat NN or CC filetest NNS are VBP returned VVN . SENT Example NN . SENT if IN x NN file NN d NN stat NN d SYM This DT only JJ works NNS on IN machines NNS for IN which WDT the DT device NN number NN is VBZ negative JJ under IN NFS NP . SENT study NN SCALAR NN study NN Takes VVZ extra JJ time NN to TO study VV SCALAR NN if IN unspecified JJ in IN anticipation NN of IN doing VVG many JJ pattern NN matches VVZ on IN the DT string NN before IN it PP is VBZ next RB modified VVN . SENT This DT may MD or CC may MD not RB save VV time NN , , depending VVG on IN the DT nature NN and CC number NN of IN patterns NNS you PP are VBP searching VVG on RP , , and CC on IN the DT distribution NN of IN character NN frequencies NNS in IN the DT string NN to TO be VB searched VVD you PP probably RB want VVP to TO compare VV runtimes NNS with IN and CC without IN it PP to TO see VV which WDT runs NNS faster RBR . SENT Those DT loops NNS which WDT scan VV for IN many JJ short JJ constant JJ strings NNS including VVG the DT constant JJ parts NNS of IN more JJR complex JJ patterns NNS will MD benefit VV most JJS . SENT You PP may MD have VH only RB one CD study NN active JJ at IN a DT time NN if IN you PP study VVP a DT different JJ scalar NN the DT first JJ is VBZ unstudied JJ . SENT The DT way NN study NN works NNS is VBZ this DT . SENT a DT linked VVN list NN of IN every DT character NN in IN the DT string NN to TO be VB searched VVD is VBZ made VVN , , so RB we PP know VVP , , for IN example NN , , where WRB all PDT the DT k NN characters NNS are VBP . SENT From IN each DT search NN string NN , , the DT rarest JJS character NN is VBZ selected VVN , , based VVN on IN some DT static JJ frequency NN tables NNS constructed VVN from IN some DT C NP programs NNS and CC English JJ text NN . SENT Only RB those DT places NNS that WDT contain VVP this DT rarest JJS character NN are VBP examined VVN . SENT For IN example NN , , here RB is VBZ a DT loop NN which WDT inserts NNS index NN producing VVG entries NNS before IN any DT line NN containing VVG a DT certain JJ pattern NN . SENT while IN study NN . SENT print NN . SENT IX NP foo NP n NN if IN bfoo NP b SYM . SENT print NN . SENT IX NP bar NN n NN if IN bbar NP b SYM . SENT print NN . SENT IX NP blurfl NN n NN if IN bblurfl NP b SYM . SENT . SENT . SENT . SENT print NN . SENT In IN searching VVG for IN bfoo NP b SYM , , only RB those DT locations NNS in IN that WDT contain VVP f NN will MD be VB looked VVN at IN , , because IN f NN is VBZ rarer JJR than IN o NN . SENT In IN general NN , , this DT is VBZ a DT big JJ win NN except IN in IN pathological JJ cases NNS . SENT The DT only JJ question NN is VBZ whether IN it PP saves VVZ you PP more JJR time NN than IN it PP took VVD to TO build VV the DT linked VVN list NN in IN the DT first JJ place NN . SENT Note NN that IN if IN you PP have VHP to TO look VV for IN strings NNS that IN you PP don't VVD know VV till IN runtime NN , , you PP can MD build VV an DT entire JJ loop NN as IN a DT string NN and CC eval NN that IN to TO avoid VV recompiling VVG all PDT your PP$ patterns NNS all RB the DT time NN . SENT Together RB with IN undefining JJ to TO input NN entire JJ files NNS as IN one CD record NN , , this DT can MD be VB very RB fast JJ , , often RB faster RBR than IN specialized JJ programs NNS like IN fgrep NN 1 CD . SENT The DT following NN scans VVZ a DT list NN of IN files NNS files NNS for IN a DT list NN of IN words NNS words NNS , , and CC prints NNS out IN the DT names NNS of IN those DT files NNS that WDT contain VVP a DT match NN . SENT search NN while IN study NN . SENT . SENT foreach NN word NN words NNS search NN . SENT seen VVN ARGV NP if IN b NN word NN b SYM . SENT n NN . SENT search NN . SENT . SENT ARGV NP files VVZ . SENT undef JJ . SENT eval JJ search NN . SENT this DT screams VVZ n NN . SENT put VV back RB to TO normal JJ input NN delim NN foreach NN file VV sort NN keys NNS seen VVN print NN file NN , , n NN . SENT sub NN BLOCK NN sub NN NAME NN sub NN NAME NN BLOCK VV This DT is VBZ subroutine NN definition NN , , not RB a DT real JJ function NN per FW se FW . SENT With IN just RB a DT NAME NN and CC possibly RB prototypes NNS , , it's NNS just RB a DT forward JJ declaration NN . SENT Without IN a DT NAME NN , , it's NN an DT anonymous JJ function NN declaration NN , , and CC does VVZ actually RB return VV a DT value NN . SENT the DT CODE NN ref NN of IN the DT closure NN you PP just RB created VVN . SENT See VV the DT perlsub NN manpage NN and CC the DT perlref NN manpage NN for IN details NNS . SENT substr NP EXPR NP , , OFFSET VVN , , LEN NP substr NP EXPR NP , , OFFSET VVP Extracts VVZ a DT substring VVG out RP of IN EXPR NP and CC returns VVZ it PP . SENT First JJ character NN is VBZ at IN offset VVN 0 CD , , or CC whatever WDT you've NN set VVD to TO . SENT If IN OFFSET VVN is VBZ negative JJ , , starts VVZ that IN far RB from IN the DT end NN of IN the DT string NN . SENT If IN LEN NP is VBZ omitted VVN , , returns NNS everything NN to TO the DT end NN of IN the DT string NN . SENT If IN LEN NP is VBZ negative JJ , , leaves VVZ that IN many JJ characters NNS off IN the DT end NN of IN the DT string NN . SENT You PP can MD use VV the DT substr NN function NN as IN an DT lvalue NN , , in IN which WDT case NN EXPR NP must MD be VB an DT lvalue NN . SENT If IN you PP assign VVP something NN shorter JJR than IN LEN NP , , the DT string NN will MD shrink VV , , and CC if IN you PP assign VVP something NN longer RBR than IN LEN NP , , the DT string NN will MD grow VV to TO accommodate VV it PP . SENT To TO keep VV the DT string NN the DT same JJ length NN you PP may MD need VV to TO pad NN or CC chop VV your PP$ value NN using VVG sprintf NN . SENT symlink NP OLDFILE NP , , NEWFILE NP Creates VVZ a DT new JJ filename NN symbolically RB linked VVN to TO the DT old JJ filename NN . SENT Returns NNS 1 CD for IN success NN , , 0 CD otherwise RB . SENT On IN systems NNS that IN don't JJ support NN symbolic JJ links NNS , , produces VVZ a DT fatal JJ error NN at IN run NN time NN . SENT To TO check VV for IN that DT , , use VV eval NN . SENT symlink NN exists VVZ eval NP symlink NP , , . SENT , , eq NP . SENT syscall NN LIST NN Calls VVZ the DT system NN call NN specified VVN as IN the DT first JJ element NN of IN the DT list NN , , passing VVG the DT remaining VVG elements NNS as IN arguments NNS to TO the DT system NN call NN . SENT If IN unimplemented JJ , , produces VVZ a DT fatal JJ error NN . SENT The DT arguments NNS are VBP interpreted VVN as RB follows VVZ . SENT if IN a DT given VVN argument NN is VBZ numeric JJ , , the DT argument NN is VBZ passed VVN as IN an DT int NP . SENT If IN not RB , , the DT pointer NN to TO the DT string NN value NN is VBZ passed VVN . SENT You PP are VBP responsible JJ to TO make VV sure RB a DT string NN is VBZ pre NP extended VVD long RB enough JJ to TO receive VV any DT result NN that WDT might MD be VB written VVN into IN a DT string NN . SENT If IN your PP$ integer NN arguments NNS are VBP not RB literals NNS and CC have VHP never RB been VBN interpreted VVN in IN a DT numeric JJ context NN , , you PP may MD need VV to TO add VV 0 CD to TO them PP to TO force VV them PP to TO look VV like IN numbers NNS . SENT require VV syscall NN . SENT ph NN . SENT may MD need VV to TO run VV h NN 2 CD ph NN syscall NP SYS NP write VV , , fileno NP STDOUT NP , , hi NP there RB n NN , , 9 CD . SENT Note NN that IN Perl NP only RB supports VVZ passing VVG of IN up RB to TO 14 CD arguments NNS to TO your PP$ system NN call NN , , which WDT in IN practice NN should MD usually RB suffice VV . SENT sysopen NP FILEHANDLE NP , , FILENAME NP , , MODE NN sysopen NN FILEHANDLE NP , , FILENAME NP , , MODE NN , , PERMS NNS Opens VVZ the DT file NN whose WP$ filename NN is VBZ given VVN by IN FILENAME NP , , and CC associates NNS it PP with IN FILEHANDLE NP . SENT If IN FILEHANDLE NP is VBZ an DT expression NN , , its PP$ value NN is VBZ used VVN as IN the DT name NN of IN the DT real JJ filehandle NN wanted VVD . SENT This DT function NN calls VVZ the DT underlying JJ operating NN system's NNS open JJ function NN with IN the DT parameters NNS FILENAME NP , , MODE NN , , PERMS NNS . SENT The DT possible JJ values NNS and CC flag NN bits NNS of IN the DT MODE NN parameter NN are VBP system NN dependent JJ . SENT they PP are VBP available JJ via IN the DT standard JJ module NN Fcntl NP . SENT However RB , , for IN historical JJ reasons NNS , , some DT values NNS are VBP universal JJ . SENT zero CD means NNS read VVP only RB , , one PP means VVZ write VV only RB , , and CC two CD means NNS read VVP write VV . SENT If IN the DT file NN named VVN by IN FILENAME NP does VVZ not RB exist VV and CC the DT open JJ call NN creates VVZ it PP typically RB because IN MODE NN includes VVZ the DT O NP CREAT NP flag NN , , then RB the DT value NN of IN PERMS NNS specifies VVZ the DT permissions NNS of IN the DT newly RB created VVN file NN . SENT If IN PERMS NNS is VBZ omitted VVN , , the DT default NN value NN is VBZ 0666 CD , , which WDT allows VVZ read VV and CC write VV for IN all DT . SENT This DT default NN is VBZ reasonable JJ . SENT see VV umask NN . SENT sysread NP FILEHANDLE NP , , SCALAR NN , , LENGTH NN , , OFFSET VVN sysread JJ FILEHANDLE NP , , SCALAR NN , , LENGTH NN Attempts NNS to TO read VV LENGTH NN bytes NNS of IN data NNS into IN variable JJ SCALAR NN from IN the DT specified JJ FILEHANDLE NP , , using VVG the DT system NN call NN read VVD 2 CD . SENT It PP bypasses VVZ stdio NN , , so RB mixing VVG this DT with IN other JJ kinds NNS of IN reads VVZ may MD cause VV confusion NN . SENT Returns VVZ the DT number NN of IN bytes NNS actually RB read VVP , , or CC undef JJ if IN there EX was VBD an DT error NN . SENT SCALAR NN will MD be VB grown VVN or CC shrunk VVN to TO the DT length NN actually RB read VVN . SENT An DT OFFSET VVN may MD be VB specified VVN to TO place VV the DT read VVN data NNS at IN some DT other JJ place NN than IN the DT beginning NN of IN the DT string NN . SENT system NN LIST NN Does VVZ exactly RB the DT same JJ thing NN as IN exec NP LIST NN except IN that WDT a DT fork NN is VBZ done VVN first RB , , and CC the DT parent NN process NN waits VVZ for IN the DT child NN process NN to TO complete VV . SENT Note NN that IN argument NN processing NN varies VVZ depending VVG on IN the DT number NN of IN arguments NNS . SENT The DT return NN value NN is VBZ the DT exit NN status NN of IN the DT program NN as RB returned VVD by IN the DT wait NN call NN . SENT To TO get VV the DT actual JJ exit NN value NN divide NN by IN 256 CD . SENT See VV also RB exec NP . SENT This DT is VBZ NOT RB what WP you PP want VVP to TO use VV to TO capture VV the DT output NN from IN a DT command NN , , for IN that WDT you PP should MD merely RB use VV backticks NNS , , as RB described VVN in IN STRING NN . SENT syswrite NP FILEHANDLE NP , , SCALAR NN , , LENGTH NN , , OFFSET VVD syswrite NP FILEHANDLE NP , , SCALAR NN , , LENGTH NN Attempts NNS to TO write VV LENGTH NN bytes NNS of IN data NNS from IN variable JJ SCALAR NN to TO the DT specified JJ FILEHANDLE NP , , using VVG the DT system NN call NN write VVP 2 CD . SENT It PP bypasses VVZ stdio NN , , so RB mixing VVG this DT with IN prints NNS may MD cause VV confusion NN . SENT Returns VVZ the DT number NN of IN bytes NNS actually RB written VVN , , or CC undef JJ if IN there EX was VBD an DT error NN . SENT An DT OFFSET VVN may MD be VB specified VVN to TO get VV the DT write VV data NNS from IN some DT other JJ place NN than IN the DT beginning NN of IN the DT string NN . SENT tell VV FILEHANDLE NP tell VV Returns NNS the DT current JJ file NN position NN for IN FILEHANDLE NP . SENT FILEHANDLE NP may MD be VB an DT expression NN whose WP$ value NN gives VVZ the DT name NN of IN the DT actual JJ filehandle NN . SENT If IN FILEHANDLE NP is VBZ omitted VVN , , assumes VVZ the DT file NN last JJ read NN . SENT telldir NP DIRHANDLE NP Returns VVZ the DT current JJ position NN of IN the DT readdir NN routines NNS on IN DIRHANDLE NP . SENT Value NN may MD be VB given VVN to TO seekdir VV to TO access VV a DT particular JJ location NN in IN a DT directory NN . SENT Has VHZ the DT same JJ caveats NNS about IN possible JJ directory NN compaction NN as IN the DT corresponding JJ system NN library NN routine NN . SENT tie NN VARIABLE NN , , CLASSNAME NP , , LIST NN This DT function NN binds VVZ a DT variable NN to TO a DT package NN class NN that WDT will MD provide VV the DT implementation NN for IN the DT variable NN . SENT VARIABLE NN is VBZ the DT name NN of IN the DT variable NN to TO be VB enchanted VVN . SENT CLASSNAME NP is VBZ the DT name NN of IN a DT class NN implementing VVG objects NNS of IN correct JJ type NN . SENT Any DT additional JJ arguments NNS are VBP passed VVN to TO the DT new JJ method NN of IN the DT class NN meaning VVG TIESCALAR NP , , TIEARRAY NP , , or CC TIEHASH NP . SENT Typically RB these DT are VBP arguments NNS such JJ as RB might MD be VB passed VVN to TO the DT dbm NP open JJ function NN of IN C NP . SENT The DT object NN returned VVN by IN the DT new JJ method NN is VBZ also RB returned VVN by IN the DT tie NN function NN , , which WDT would MD be VB useful JJ if IN you PP want VVP to TO access VV other JJ methods NNS in IN CLASSNAME NP . SENT Note NN that IN functions NNS such JJ as IN keys NNS and CC values NNS may MD return VV huge JJ array NN values NNS when WRB used VVN on IN large JJ objects NNS , , like IN DBM NP files NNS . SENT You PP may MD prefer VV to TO use VV the DT each DT function NN to TO iterate VV over RP such JJ . SENT Example NN . SENT print NN out IN history NN file NN offsets NNS use VVP NDBM NP File NP . SENT tie NN HIST NN , , NDBM NP File NP , , usr NN lib NN news NN history NN , , 1 CD , , 0 CD . SENT while IN key NN , , val NP each DT HIST NN print NN key JJ , , , , unpack VV L NP , , val NP , , n NN . SENT untie VV HIST NN . SENT A DT class NN implementing VVG an DT associative JJ array NN should MD have VH the DT following VVG methods NNS . SENT TIEHASH NP classname NP , , LIST NN DESTROY VVP this DT FETCH VV this DT , , key JJ STORE NN this DT , , key JJ , , value VVP DELETE VV this DT , , key JJ EXISTS VVZ this DT , , key JJ FIRSTKEY NP this DT NEXTKEY NP this DT , , lastkey VV A DT class NN implementing VVG an DT ordinary JJ array NN should MD have VH the DT following VVG methods NNS . SENT TIEARRAY NP classname NP , , LIST NN DESTROY VVP this DT FETCH VV this DT , , key JJ STORE NN this DT , , key JJ , , value NN others NNS TBD NP A DT class NN implementing VVG a DT scalar NN should MD have VH the DT following VVG methods NNS . SENT TIESCALAR JJ classname NN , , LIST VV DESTROY VV this DT FETCH VV this DT , , STORE VV this DT , , value NN Unlike IN dbmopen NP , , the DT tie NN function NN will MD not RB use VV or CC require VV a DT module NN for IN you PP you PP need VVP to TO do VV that IN explicitly RB yourself PP . SENT See VV DB NP File NP or CC the DT Config NP module NN for IN interesting JJ tie NN implementations NNS . SENT tied VVN VARIABLE JJ Returns NNS a DT reference NN to TO the DT object NN underlying VVG VARIABLE JJ the DT same JJ value NN that WDT was VBD originally RB returned VVN by IN the DT tie NN call NN which WDT bound JJ the DT variable NN to TO a DT package NN . SENT Returns VVZ the DT undefined JJ value NN if IN VARIABLE JJ isn't NN tied VVN to TO a DT package NN . SENT time NN Returns NNS the DT number NN of IN non JJ leap NN seconds NNS since IN 00 CD . SENT 00 CD . SENT 00 CD UTC NN , , January NP 1 CD , , 1970 CD . SENT Suitable JJ for IN feeding VVG to TO gmtime NN and CC localtime NN . SENT times NNS Returns VVZ a DT four CD element NN array NN giving VVG the DT user NN and CC system NN times NNS , , in IN seconds NNS , , for IN this DT process NN and CC the DT children NNS of IN this DT process NN . SENT user NN , , system NN , , cuser JJR , , csystem NN times NNS . SENT tr NP The DT translation NN operator NN . SENT See VV the DT perlop NN manpage NN . SENT truncate JJ FILEHANDLE NP , , LENGTH NN truncate JJ EXPR NP , , LENGTH NN Truncates VVZ the DT file NN opened VVD on IN FILEHANDLE NP , , or CC named VVN by IN EXPR NP , , to TO the DT specified JJ length NN . SENT Produces VVZ a DT fatal JJ error NN if IN truncate JJ isn't NN implemented VVN on IN your PP$ system NN . SENT uc NP EXPR NP Returns VVZ an DT uppercased VVN version NN of IN EXPR NP . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT U NP escape NN in IN double JJ quoted VVN strings NNS . SENT Should MD respect VV any DT POSIX NP setlocale NN settings NNS . SENT ucfirst NP EXPR NP Returns VVZ the DT value NN of IN EXPR NP with IN the DT first JJ character NN uppercased VVD . SENT This DT is VBZ the DT internal JJ function NN implementing VVG the DT u NN escape NN in IN double JJ quoted VVN strings NNS . SENT Should MD respect VV any DT POSIX NP setlocale NN settings NNS . SENT umask NP EXPR NP umask NN Sets VVZ the DT umask NN for IN the DT process NN and CC returns VVZ the DT old JJ one CD . SENT If IN EXPR NP is VBZ omitted VVN , , merely RB returns VVZ current JJ umask NN . SENT undef JJ EXPR NP undef JJ Undefines NNS the DT value NN of IN EXPR NP , , which WDT must MD be VB an DT lvalue NN . SENT Use VV only RB on IN a DT scalar JJ value NN , , an DT entire JJ array NN , , or CC a DT subroutine NN name NN using VVG . SENT Using VVG undef JJ will MD probably RB not RB do VV what WP you PP expect VVP on IN most JJS predefined JJ variables NNS or CC DBM NP list NN values NNS , , so RB don't NN do VVP that IN . SENT Always RB returns VVZ the DT undefined JJ value NN . SENT You PP can MD omit VV the DT EXPR NP , , in IN which WDT case NN nothing NN is VBZ undefined JJ , , but CC you PP still RB get VVP an DT undefined JJ value NN that IN you PP could MD , , for IN instance NN , , return NN from IN a DT subroutine NN . SENT Examples NNS . SENT undef JJ foo NP . SENT undef JJ bar NN blurfl NN . SENT undef JJ ary NP . SENT undef JJ assoc NN . SENT undef JJ mysub NN . SENT return NN wantarray NN . SENT . SENT undef JJ if IN they PP blew VVD it PP . SENT unlink NP LIST NN Deletes VVZ a DT list NN of IN files NNS . SENT Returns VVZ the DT number NN of IN files NNS successfully RB deleted VVN . SENT cnt NN unlink VV a DT , , b NN , , c LS . SENT unlink NP goners NNS . SENT unlink NP . SENT Note NN . SENT unlink NP will MD not RB delete VV directories NNS unless IN you PP are VBP superuser JJR and CC the DT U NP flag NN is VBZ supplied VVN to TO Perl NP . SENT Even RB if IN these DT conditions NNS are VBP met VVD , , be VB warned VVN that IN unlinking VVG a DT directory NN can MD inflict VV damage NN on IN your PP$ filesystem NN . SENT Use NN rmdir NN instead RB . SENT unpack VV TEMPLATE NN , , EXPR NP Unpack VV does NNS the DT reverse NN of IN pack NN . SENT it PP takes VVZ a DT string NN representing VVG a DT structure NN and CC expands VVZ it PP out RP into IN a DT list NN value NN , , returning VVG the DT array NN value NN . SENT In IN a DT scalar JJ context NN , , it PP merely RB returns VVZ the DT first JJ value NN produced VVD . SENT The DT TEMPLATE NN has VHZ the DT same JJ format NN as IN in IN the DT pack NN function NN . SENT Here's NP a DT subroutine NN that WDT does VVZ substring NN . SENT sub NN substr NN local JJ what WP , , where WRB , , howmuch RB . SENT unpack VV x NN where WRB a DT howmuch NN , , what WP . SENT and CC then RB there's RB sub VV ordinal NN unpack VV c NN , , 0 CD . SENT same JJ as IN ord NP In IN addition NN , , you PP may MD prefix VV a DT field NN with IN a DT number NN to TO indicate VV that IN you PP want VVP a DT number NN bit NN checksum NN of IN the DT items NNS instead RB of IN the DT items NNS themselves PP . SENT Default NN is VBZ a DT 16 CD bit NN checksum NN . SENT For IN example NN , , the DT following NN computes VVZ the DT same JJ number NN as IN the DT System NP V NN sum NN program NN . SENT while IN checksum NN unpack VV 16 CD C NP , , . SENT checksum NN 65536 CD . SENT The DT following NN efficiently RB counts VVZ the DT number NN of IN set VVN bits NNS in IN a DT bit NN vector NN . SENT setbits NNS unpack VV 32 CD b NN , , selectmask NN . SENT untie VV VARIABLE JJ Breaks NNS the DT binding JJ between IN a DT variable NN and CC a DT package NN . SENT See VV tie NN . SENT unshift NN ARRAY NN , , LIST NN Does VVZ the DT opposite NN of IN a DT shift NN . SENT Or CC the DT opposite NN of IN a DT push NN , , depending VVG on IN how WRB you PP look VVP at IN it PP . SENT Prepends NNS list VVP to TO the DT front NN of IN the DT array NN , , and CC returns VVZ the DT new JJ number NN of IN elements NNS in IN the DT array NN . SENT unshift NP ARGV NP , , e NN unless IN ARGV NP 0 CD . SENT Note VV the DT LIST NN is VBZ prepended JJ whole NN , , not RB one CD element NN at IN a DT time NN , , so RB the DT prepended JJ elements NNS stay VVP in IN the DT same JJ order NN . SENT Use VV reverse VV to TO do VV the DT reverse NN . SENT use NN Module NN LIST NN use NN Module NN Imports NNS some DT semantics NNS into IN the DT current JJ package NN from IN the DT named VVN module NN , , generally RB by IN aliasing VVG certain JJ subroutine NN or CC variable JJ names NNS into IN your PP$ package NN . SENT It PP is VBZ exactly RB equivalent JJ to TO BEGIN VV require VV Module NN . SENT import NN Module NN LIST NN . SENT The DT BEGIN VVP forces NNS the DT require VVP and CC import VVP to TO happen VV at IN compile VV time NN . SENT The DT require VVP makes VVZ sure RB the DT module NN is VBZ loaded VVN into IN memory NN if IN it PP hasn't NNS been VBN yet RB . SENT The DT import NN is VBZ not RB a DT builtin JJ it's NNS just RB an DT ordinary JJ static JJ method NN call NN into IN the DT Module NN package NN to TO tell VV the DT module NN to TO import VV the DT list NN of IN features NNS back RB into IN the DT current JJ package NN . SENT The DT module NN can MD implement VV its PP$ import NN method NN any DT way NN it PP likes VVZ , , though IN most JJS modules NNS just RB choose VVP to TO derive VV their PP$ import NN method NN via IN inheritance NN from IN the DT Exporter NN class NN that WDT is VBZ defined VVN in IN the DT Exporter NN module NN . SENT See VV Exporter NN . SENT If IN you PP don't VVD want VV your PP$ namespace NN altered VVD , , explicitly RB supply VV an DT empty JJ list NN . SENT use NN Module NN . SENT That DT is VBZ exactly RB equivalent JJ to TO BEGIN VV require VV Module NN . SENT Because IN this DT is VBZ a DT wide JJ open JJ interface NN , , pragmas NNS compiler NN directives NNS are VBP also RB implemented VVN this DT way NN . SENT Currently RB implemented VVN pragmas NNS are VBP . SENT use NN integer NN . SENT use NN diagnostics NNS . SENT use NN sigtrap NN qw JJ SEGV NP BUS NN . SENT use VV strict JJ qw JJ subs NNS vars NNS refs NNS . SENT use NN subs VVZ qw JJ afunc NN blurfl NN . SENT These DT pseudomodules NNS import VVP semantics NNS into IN the DT current JJ block NN scope NN , , unlike IN ordinary JJ modules NNS , , which WDT import VVP symbols NNS into IN the DT current JJ package NN which WDT are VBP effective JJ through IN the DT end NN of IN the DT file NN . SENT There's RB a DT corresponding JJ no DT command NN that IN unimports JJ meanings NNS imported VVN by IN use NN . SENT no DT integer NN . SENT no DT strict JJ refs NNS . SENT See VV the DT perlmod JJ manpage NN for IN a DT list NN of IN standard JJ modules NNS and CC pragmas NNS . SENT utime NN LIST NN Changes NP the DT access NN and CC modification NN times NNS on IN each DT file NN of IN a DT list NN of IN files NNS . SENT The DT first JJ two CD elements NNS of IN the DT list NN must MD be VB the DT NUMERICAL JJ access NN and CC modification NN times NNS , , in IN that DT order NN . SENT Returns VVZ the DT number NN of IN files NNS successfully RB changed VVN . SENT The DT inode NN modification NN time NN of IN each DT file NN is VBZ set VVN to TO the DT current JJ time NN . SENT Example NN of IN a DT touch NN command NN . SENT . SENT usr NN bin NN perl NP now RB time NN . SENT utime NN now RB , , now RB , , ARGV NP . SENT values NNS ASSOC NN ARRAY NN Returns VVZ a DT normal JJ array NN consisting VVG of IN all PDT the DT values NNS of IN the DT named VVN associative JJ array NN . SENT In IN a DT scalar JJ context NN , , returns VVZ the DT number NN of IN values NNS . SENT The DT values NNS are VBP returned VVN in IN an DT apparently RB random JJ order NN , , but CC it PP is VBZ the DT same JJ order NN as IN either CC the DT keys NNS or CC each DT function NN would MD produce VV on IN the DT same JJ array NN . SENT See VV also RB keys NNS , , each DT , , and CC sort NN . SENT vec NP EXPR NP , , OFFSET VVN , , BITS NNS Treats VVZ the DT string NN in IN EXPR NP as IN a DT vector NN of IN unsigned JJ integers NNS , , and CC returns VVZ the DT value NN of IN the DT bitfield NN specified VVN by IN OFFSET VVN . SENT BITS NNS specifies VVZ the DT number NN of IN bits NNS that WDT are VBP reserved VVN for IN each DT entry NN in IN the DT bit NN vector NN . SENT This DT must MD be VB a DT power NN of IN two CD from IN 1 CD to TO 32 CD . SENT vec NP may MD also RB be VB assigned VVN to TO , , in IN which WDT case NN parens NNS are VBP needed VVN to TO give VV the DT expression NN the DT correct JJ precedence NN as IN in IN vec NN image NN , , max NP x SYM x NN y NN , , 8 CD 3 CD . SENT Vectors NNS created VVN with IN vec NP can MD also RB be VB manipulated VVN with IN the DT logical JJ operators NNS , , and CC , , which WDT will MD assume VV a DT bit NN vector NN operation NN is VBZ desired VVN when WRB both DT operands NNS are VBP strings NNS . SENT To TO transform VV a DT bit NN vector NN into IN a DT string NN or CC array NN of IN 0 CD s PP and CC 1 CD s PP , , use VV these DT . SENT bits NNS unpack VV b NN , , vector NN . SENT bits NNS split VVD , , unpack VV b NN , , vector NN . SENT If IN you PP know VVP the DT exact JJ length NN in IN bits NNS , , it PP can MD be VB used VVN in IN place NN of IN the DT . SENT wait VV Waits NP for IN a DT child NN process NN to TO terminate VV and CC returns VVZ the DT pid NN of IN the DT deceased JJ process NN , , or CC 1 CD if IN there EX are VBP no DT child NN processes VVZ . SENT The DT status NN is VBZ returned VVN in IN . SENT . SENT waitpid NN PID NN , , FLAGS NNS Waits NP for IN a DT particular JJ child NN process NN to TO terminate VV and CC returns VVZ the DT pid NN of IN the DT deceased JJ process NN , , or CC 1 CD if IN there EX is VBZ no DT such JJ child NN process NN . SENT The DT status NN is VBZ returned VVN in IN . SENT . SENT If IN you PP say VVP use VV POSIX NP wait VV h NN . SENT . SENT . SENT . SENT waitpid NN 1 CD , , WNOHANG NP . SENT then RB you PP can MD do VV a DT non JJ blocking VVG wait NN for IN any DT process NN . SENT Non JJ blocking VVG wait NN is VBZ only RB available JJ on IN machines NNS supporting VVG either CC the DT waitpid JJ 2 CD or CC wait VV 4 CD 2 CD system NN calls NNS . SENT However RB , , waiting VVG for IN a DT particular JJ pid NN with IN FLAGS NNS of IN 0 CD is VBZ implemented VVN everywhere RB . SENT Perl NP emulates VVZ the DT system NN call NN by IN remembering VVG the DT status NN values VVZ of IN processes NNS that WDT have VHP exited VVD but CC have VHP not RB been VBN harvested VVN by IN the DT Perl NP script NN yet RB . SENT wantarray NN Returns NNS TRUE JJ if IN the DT context NN of IN the DT currently RB executing VVG subroutine NN is VBZ looking VVG for IN a DT list NN value NN . SENT Returns NNS FALSE JJ if IN the DT context NN is VBZ looking VVG for IN a DT scalar NN . SENT return NN wantarray NN . SENT . SENT undef JJ . SENT warn VVP LIST NN Produces VVZ a DT message NN on IN STDERR NP just RB like IN die NN , , but CC doesn't JJ exit NN or CC on IN an DT exception NN . SENT write VV FILEHANDLE NP write VV EXPR NP write VVP Writes VVZ a DT formatted VVN record NN possibly RB multi NNS line NN to TO the DT specified JJ file NN , , using VVG the DT format NN associated VVN with IN that DT file NN . SENT By IN default NN the DT format NN for IN a DT file NN is VBZ the DT one NN having VHG the DT same JJ name NN is VBZ the DT filehandle NN , , but CC the DT format NN for IN the DT current JJ output NN channel NN see VVP the DT select JJ function NN may MD be VB set VVN explicitly RB by IN assigning VVG the DT name NN of IN the DT format NN to TO the DT variable NN . SENT Top JJ of IN form NN processing NN is VBZ handled VVN automatically RB . SENT if IN there EX is VBZ insufficient JJ room NN on IN the DT current JJ page NN for IN the DT formatted VVN record NN , , the DT page NN is VBZ advanced JJ by IN writing VVG a DT form NN feed NN , , a DT special JJ top NN of IN page NN format NN is VBZ used VVN to TO format NN the DT new JJ page NN header NN , , and CC then RB the DT record NN is VBZ written VVN . SENT By IN default NN the DT top NN of IN page NN format NN is VBZ the DT name NN of IN the DT filehandle NN with IN TOP JJ appended VVN , , but CC it PP may MD be VB dynamically RB set VVN to TO the DT format NN of IN your PP$ choice NN by IN assigning VVG the DT name NN to TO the DT variable NN while IN the DT filehandle NN is VBZ selected VVN . SENT The DT number NN of IN lines NNS remaining VVG on IN the DT current JJ page NN is VBZ in IN variable NN , , which WDT can MD be VB set VVN to TO 0 CD to TO force VV a DT new JJ page NN . SENT If IN FILEHANDLE NP is VBZ unspecified JJ , , output NN goes VVZ to TO the DT current JJ default NN output NN channel NN , , which WDT starts VVZ out RP as IN STDOUT NP but CC may MD be VB changed VVN by IN the DT select JJ operator NN . SENT If IN the DT FILEHANDLE NP is VBZ an DT EXPR NP , , then RB the DT expression NN is VBZ evaluated VVN and CC the DT resulting VVG string NN is VBZ used VVN to TO look VV up RP the DT name NN of IN the DT FILEHANDLE NP at IN run NN time NN . SENT For IN more JJR on IN formats NNS , , see VVP the DT perlform NN manpage NN . SENT Note VVP that RB write VV is VBZ NOT RB the DT opposite NN of IN read NN . SENT Unfortunately RB . SENT y NP The DT translation NN operator NN . SENT See VV the DT perlop NN manpage NN . SENT . SENT