perlclib.html 50.2 KB
Newer Older
1 2 3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
4 5
<head>
  <title>perlclib - perldoc.perl.org</title>
6 7
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta http-equiv="Content-Language" content="en-gb">
8 9 10
  <link rel="search" type="application/opensearchdescription+xml" title="Search perldoc.perl.org" href="/static/search.xml"/>
  <link href="static/css-20100830.css" rel="stylesheet" rev="stylesheet" type="text/css" media="screen">
  <link href="static/exploreperl.css" rel="stylesheet" rev="stylesheet" type="text/css">
11 12
</head>

13 14 15 16 17 18 19
<body onLoad="perldoc.startup();" onPageShow="if (event.persisted) perldoc.startup();">
    <div id="page">
      
      <div id="header">
	<div id="homepage_link">
	  <a href="index.html"></a>
	</div>
20 21 22 23 24 25 26 27 28
	<div id="strapline">
	  Perl Programming Documentation
	</div>
	<div id="download_link" class="download">
	  <a href="http://www.perl.org/get.html">Download Perl</a>
	</div>
	<div id="explore_link" class="download">
	  <a id="explore_anchor" href="#">Explore</a>
	</div>
29
      </div>
30 31 32 33
      
      <div id="body">
        <div id="left_column">
          <div class="side_group">
34 35
            
	    <div class="side_panel doc_panel">
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
              <p>Manual</p>
              <ul>
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">History / Changes</a>
                <li><a href="index-licence.html">License</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Reference</p>
              <ul>
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Special Variables</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
54
                <li><a href="index-internals.html">Internals</a>
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
                <li><a href="index-platforms.html">Platform Specific</a>
              </ul>
            </div>
            <div class="side_panel doc_panel">
              <p>Modules</p>
              <ul>
		<li>
		
                
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		    
		  
		
                  
		
                  
		
                  
		    
		  
		
                  
		
                  
		
		
                    <a href="index-modules-A.html">A</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-B.html">B</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-C.html">C</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-D.html">D</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-E.html">E</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-F.html">F</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-G.html">G</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-H.html">H</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-I.html">I</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-L.html">L</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-M.html">M</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-N.html">N</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-O.html">O</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-P.html">P</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-S.html">S</a>
                    
                      
                        <li>
                      
                    
                
                    <a href="index-modules-T.html">T</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-U.html">U</a>
                    
                      
                        &bull;
                      
                    
                
                    <a href="index-modules-X.html">X</a>
                    
                
              </ul>
            </div>
277 278 279 280 281 282 283 284
            
	      <div class="side_panel doc_panel">
		<p>Tools</p>
		<ul>
		  <li><a href="preferences.html">Preferences</a>
		</ul>
	      </div>
            
285 286 287 288 289 290 291 292 293
          </div>
        </div>
        <div id="centre_column">
          <div id="content_header">
            <div id="title_bar">
              <div id="page_name">
                <h1>perlclib</h1>
              </div>
              <div id="perl_version">
294
                Perl 5 version 26.0 documentation
295
              </div>
296
              <div class="page_links" id="page_links_top">
297 298
                <a href="#" onClick="toolbar.goToTop();return false;">Go to top</a>
		
299 300
              </div>
	      <div class="page_links" id="page_links_bottom">
301
		
302
                  <a href="#" id="page_index_toggle">Show page index</a> &bull;
303
		
304 305 306 307 308 309 310
                <a href="#" id="recent_pages_toggle">Show recent pages</a>		
	      </div>
	      <div id="search_form">
		<form action="search.html" method="GET" id="search">
		  <input type="text" name="q" id="search_box" alt="Search">
		</form>
	      </div>
311 312 313 314 315 316 317 318 319 320 321
            </div>
            <div id="breadcrumbs">
                
    <a href="index.html">Home</a> &gt;
    
      
        <a href="index-internals.html">Internals and C language interface</a> &gt;
      
    
    perlclib
  
322

323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
            </div>
          </div>
          <div id="content_body">
	    <!--[if lt IE 7]>
 <div class="noscript">
   <p>
     <strong>It looks like you're using Internet Explorer 6. This is a very old
     browser which does not offer full support for modern websites.</strong>
   </p>
   <p>
     Unfortunately this means that this website will not work on
     your computer.
   </p>
   <p>
     Don't miss out though! To view the site (and get a better experience from
     many other websites), simply upgrade to
     <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet
Explorer 8</a>
     or download an alternative browser such as
     <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>,
     <a href="http://www.apple.com/safari/download/">Safari</a>, or
     <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
   </p>
   <p>
     All of these browsers are free. If you're using a PC at work, you may
     need to contact your IT administrator.
   </p>
 </div>
<![endif]-->
	    <noscript>
	      <div class="noscript">
	      <p>
                <strong>Please note: Many features of this site require JavaScript. You appear to have JavaScript disabled,
	        or are running a non-JavaScript capable web browser.</strong>
	      </p>
	      <p>
		To get the best experience, please enable JavaScript or download a modern web browser such as <a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx">Internet Explorer 8</a>, <a href="http://www.mozilla.com/en-US/firefox/firefox.html">Firefox</a>, <a href="http://www.apple.com/safari/download/">Safari</a>, or <a href="http://www.google.co.uk/chrome">Google Chrome</a>.
              </p>
	      </div>
	    </noscript>
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378

	    <div id="recent_pages" class="hud_container">
	      <div id="recent_pages_header" class="hud_header">
		<div id="recent_pages_close" class="hud_close"><a href="#" onClick="recentPages.hide();return false;"></a></div>
		<div id="recent_pages_title" class="hud_title"><span class="hud_span_top">Recently read</span></div>
		<div id="recent_pages_topright" class="hud_topright"></div>
	      </div>
	      <div id="recent_pages_content" class="hud_content">
	      </div>
	      <div id="recent_pages_footer" class="hud_footer">
		<div id="recent_pages_bottomleft" class="hud_bottomleft"></div>
		<div id="recent_pages_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
		<div id="recent_pages_resize" class="hud_resize"></div>
	      </div>
	    </div>
  
379 380 381 382 383 384
	    <div id="from_search"></div>
            <h1>perlclib</h1>


  <!--    -->
<ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><ul><li><a href="#Conventions">Conventions</a><li><a href="#File-Operations">File Operations</a><li><a href="#File-Input-and-Output">File Input and Output</a><li><a href="#File-Positioning">File Positioning</a><li><a href="#Memory-Management-and-String-Handling">Memory Management and String Handling</a><li><a href="#Character-Class-Tests">Character Class Tests</a><li><a href="#_stdlib.h_-functions">_stdlib.h_ functions</a><li><a href="#Miscellaneous-functions">Miscellaneous functions</a></ul><li><a href="#SEE-ALSO">SEE ALSO</a></ul><a name="NAME"></a><h1>NAME</h1>
385 386
<p>perlclib - Internal replacements for standard C library functions</p>
<a name="DESCRIPTION"></a><h1>DESCRIPTION</h1>
387 388
<p>One thing Perl porters should note is that <i>perl</i> doesn't tend to use that
much of the C standard library internally; you'll see very little use of, 
389 390
for example, the <i>ctype.h</i> functions in there. This is because Perl
tends to reimplement or abstract standard library functions, so that we
391
know exactly how they're going to operate.</p>
392 393
<p>This is a reference card for people who are familiar with the C library
and who want to do things the Perl way; to tell them which functions
394
they ought to use instead of the more normal C functions.</p>
395 396 397
<a name="Conventions"></a><h2>Conventions</h2>
<p>In the following tables:</p>
<ul>
398
<li><a name="t"></a><b><code class="inline"><span class="w">t</span></code>
399 400 401
</b>
<p>is a type.</p>
</li>
402
<li><a name="p"></a><b><code class="inline"><span class="w">p</span></code>
403 404 405
</b>
<p>is a pointer.</p>
</li>
406
<li><a name="n"></a><b><code class="inline"><span class="w">n</span></code>
407 408 409
</b>
<p>is a number.</p>
</li>
410
<li><a name="s"></a><b><code class="inline"><a class="l_k" href="functions/s.html">s</a></code></b>
411 412 413
<p>is a string.</p>
</li>
</ul>
414 415 416
<p><code class="inline"><span class="w">sv</span></code>
, <code class="inline"><span class="w">av</span></code>
, <code class="inline"><span class="w">hv</span></code>
417 418 419
, etc. represent variables of their respective types.</p>
<a name="File-Operations"></a><h2>File Operations</h2>
<p>Instead of the <i>stdio.h</i> functions, you should use the Perl abstraction
420 421
layer. Instead of <code class="inline"><span class="w">FILE</span>*</code>
 types, you need to be handling <code class="inline"><span class="w">PerlIO</span>*</code>
422

423
types.  Don't forget that with the new PerlIO layered I/O abstraction 
424 425
<code class="inline"><span class="w">FILE</span>*</code>
 types may not even be available. See also the <code class="inline"><span class="w">perlapio</span></code>
426 427

documentation for more information about the following functions:</p>
428 429
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>                 <span class="w">Use</span><span class="co">:</span></li><li></li><li> <span class="w">stdin</span>                       <span class="i">PerlIO_stdin</span><span class="s">(</span><span class="s">)</span></li><li> <span class="w">stdout</span>                      <span class="i">PerlIO_stdout</span><span class="s">(</span><span class="s">)</span></li><li> <span class="w">stderr</span>                      <span class="i">PerlIO_stderr</span><span class="s">(</span><span class="s">)</span></li><li></li><li> <span class="i">fopen</span><span class="s">(</span><span class="w">fn</span><span class="cm">,</span> <span class="w">mode</span><span class="s">)</span>             <span class="i">PerlIO_open</span><span class="s">(</span><span class="w">fn</span><span class="cm">,</span> <span class="w">mode</span><span class="s">)</span></li><li> <span class="i">freopen</span><span class="s">(</span><span class="w">fn</span><span class="cm">,</span> <span class="w">mode</span><span class="cm">,</span> <span class="w">stream</span><span class="s">)</span>   <span class="i">PerlIO_reopen</span><span class="s">(</span><span class="w">fn</span><span class="cm">,</span> <span class="w">mode</span><span class="cm">,</span> <span class="w">perlio</span><span class="s">)</span> <span class="s">(</span><span class="w">Dep</span>-</li><li>                               <span class="w">recated</span><span class="s">)</span></li><li> <span class="i">fflush</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>              <span class="i">PerlIO_flush</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li><li> <span class="i">fclose</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>              <span class="i">PerlIO_close</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li></ol></pre><a name="File-Input-and-Output"></a><h2>File Input and Output</h2>
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>                 <span class="w">Use</span><span class="co">:</span></li><li></li><li> <span class="i">fprintf</span><span class="s">(</span><span class="w">stream</span><span class="cm">,</span> <span class="w">fmt</span><span class="cm">,</span> ...<span class="s">)</span>   <span class="i">PerlIO_printf</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">fmt</span><span class="cm">,</span> ...<span class="s">)</span></li><li></li><li> [<span class="w">f</span>]<a class="l_k" href="functions/getc.html">getc</a><span class="s">(</span><span class="w">stream</span><span class="s">)</span>             <span class="i">PerlIO_getc</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li><li> [<span class="w">f</span>]<span class="i">putc</span><span class="s">(</span><span class="w">stream</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>          <span class="i">PerlIO_putc</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span></li><li> <span class="i">ungetc</span><span class="s">(</span><span class="w">n</span><span class="cm">,</span> <span class="w">stream</span><span class="s">)</span>           <span class="i">PerlIO_ungetc</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span></li></ol></pre><p>Note that the PerlIO equivalents of <code class="inline"><span class="w">fread</span></code>
430
 and <code class="inline"><span class="w">fwrite</span></code>
431 432
 are slightly
different from their C library counterparts:</p>
433
<pre class="verbatim"><ol><li> <span class="i">fread</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">size</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">stream</span><span class="s">)</span>   <span class="i">PerlIO_read</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">buf</span><span class="cm">,</span> <span class="w">numbytes</span><span class="s">)</span></li><li> <span class="i">fwrite</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">size</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">stream</span><span class="s">)</span>  <span class="i">PerlIO_write</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">buf</span><span class="cm">,</span> <span class="w">numbytes</span><span class="s">)</span></li><li></li><li> <span class="i">fputs</span><span class="s">(</span><span class="q">s, stream)            PerlIO_puts(perlio, s)</span></li></ol></pre><p>There is no equivalent to <code class="inline"><span class="w">fgets</span></code>
434
; one should use <code class="inline"><span class="w">sv_gets</span></code>
435
 instead:</p>
436 437
<pre class="verbatim"><ol><li> <span class="i">fgets</span><span class="s">(</span><span class="q">s, n, stream)         sv_gets(sv,</span> <span class="w">perlio</span><span class="cm">,</span> <span class="w">append</span><span class="s">)</span></li></ol></pre><a name="File-Positioning"></a><h2>File Positioning</h2>
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>                 <span class="w">Use</span><span class="co">:</span></li><li></li><li> <span class="i">feof</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>                <span class="i">PerlIO_eof</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li><li> <span class="i">fseek</span><span class="s">(</span><span class="w">stream</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">whence</span><span class="s">)</span>    <span class="i">PerlIO_seek</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">whence</span><span class="s">)</span></li><li> <span class="i">rewind</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>              <span class="i">PerlIO_rewind</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li><li></li><li> <span class="i">fgetpos</span><span class="s">(</span><span class="w">stream</span><span class="cm">,</span> <span class="w">p</span><span class="s">)</span>          <span class="i">PerlIO_getpos</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">sv</span><span class="s">)</span></li><li> <span class="i">fsetpos</span><span class="s">(</span><span class="w">stream</span><span class="cm">,</span> <span class="w">p</span><span class="s">)</span>          <span class="i">PerlIO_setpos</span><span class="s">(</span><span class="w">perlio</span><span class="cm">,</span> <span class="w">sv</span><span class="s">)</span></li><li></li><li> <span class="i">ferror</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>              <span class="i">PerlIO_error</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li><li> <span class="i">clearerr</span><span class="s">(</span><span class="w">stream</span><span class="s">)</span>            <span class="i">PerlIO_clearerr</span><span class="s">(</span><span class="w">perlio</span><span class="s">)</span></li></ol></pre><a name="Memory-Management-and-String-Handling"></a><h2>Memory Management and String Handling</h2>
438
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>                    <span class="w">Use</span><span class="co">:</span></li><li></li><li> <span class="w">t</span>* <span class="w">p</span> = <span class="i">malloc</span><span class="s">(</span><span class="w">n</span><span class="s">)</span>               <span class="i">Newx</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="w">t</span>* <span class="w">p</span> = <span class="i">calloc</span><span class="s">(</span><span class="w">n</span><span class="cm">,</span> <span class="q">s)            Newxz(p, n, t)</span></li><li> <span class="q"> p = realloc(p, n)</span>              <span class="i">Renew</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="i">memcpy</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">src</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>            <span class="i">Copy</span><span class="s">(</span><span class="w">src</span><span class="cm">,</span> <span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="i">memmove</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">src</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>           <span class="i">Move</span><span class="s">(</span><span class="w">src</span><span class="cm">,</span> <span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="i">memcpy</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">src</span><span class="cm">,</span> <span class="i">sizeof</span><span class="s">(</span><span class="w">t</span><span class="s">)</span><span class="s">)</span>    <span class="i">StructCopy</span><span class="s">(</span><span class="w">src</span><span class="cm">,</span> <span class="w">dst</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="i">memset</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="n">0</span><span class="cm">,</span> <span class="w">n</span> * <span class="i">sizeof</span><span class="s">(</span><span class="w">t</span><span class="s">)</span><span class="s">)</span>  <span class="i">Zero</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li><li> <span class="i">memzero</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="n">0</span><span class="s">)</span>                <span class="i">Zero</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">char</span><span class="s">)</span></li><li> <span class="i">free</span><span class="s">(</span><span class="w">p</span><span class="s">)</span>                        <span class="i">Safefree</span><span class="s">(</span><span class="w">p</span><span class="s">)</span></li><li></li><li> <span class="i">strdup</span><span class="s">(</span><span class="w">p</span><span class="s">)</span>                      <span class="i">savepv</span><span class="s">(</span><span class="w">p</span><span class="s">)</span></li><li> <span class="i">strndup</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>                  <span class="i">savepvn</span><span class="s">(</span><span class="w">p</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span> <span class="s">(</span><span class="w">Hey</span><span class="cm">,</span> <span class="w">strndup</span> <span class="w">doesn&#39;t</span></li><li>                                               <span class="w">exist</span>!<span class="s">)</span></li><li></li><li> <span class="i">strstr</span><span class="s">(</span><span class="w">big</span><span class="cm">,</span> <span class="w">little</span><span class="s">)</span>            <span class="i">instr</span><span class="s">(</span><span class="w">big</span><span class="cm">,</span> <span class="w">little</span><span class="s">)</span></li><li> <span class="i">strcmp</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="s">)</span>                 <span class="i">strLE</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="s">)</span> / <span class="i">strEQ</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="s">)</span></li><li>                                              / <span class="i">strGT</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span><span class="w">s2</span><span class="s">)</span></li><li> <span class="i">strncmp</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>             <span class="i">strnNE</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span> / <span class="i">strnEQ</span><span class="s">(</span><span class="w">s1</span><span class="cm">,</span> <span class="w">s2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span></li><li></li><li> <span class="i">memcmp</span><span class="s">(</span><span class="w">p1</span><span class="cm">,</span> <span class="w">p2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>              <span class="i">memNE</span><span class="s">(</span><span class="w">p1</span><span class="cm">,</span> <span class="w">p2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span></li><li> !<span class="i">memcmp</span><span class="s">(</span><span class="w">p1</span><span class="cm">,</span> <span class="w">p2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>             <span class="i">memEQ</span><span class="s">(</span><span class="w">p1</span><span class="cm">,</span> <span class="w">p2</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span></li></ol></pre><p>Notice the different order of arguments to <code class="inline"><span class="w">Copy</span></code>
439
 and <code class="inline"><span class="w">Move</span></code>
440
 than used
441 442
in <code class="inline"><span class="w">memcpy</span></code>
 and <code class="inline"><span class="w">memmove</span></code>
443
.</p>
444
<p>Most of the time, though, you'll want to be dealing with SVs internally
445
instead of raw <code class="inline"><span class="w">char</span> *</code>
446
 strings:</p>
447
<pre class="verbatim"><ol><li> <span class="i">strlen</span><span class="s">(</span><span class="q">s)                   sv_len(sv)</span></li><li> <span class="q"> strcpy(dt, src)</span>             <span class="i">sv_setpv</span><span class="s">(</span><span class="w">sv</span><span class="cm">,</span> <span class="q">s)</span></li><li> <span class="q"> strncpy(dt, src, n)         sv_setpvn(sv, s, n)</span></li><li> <span class="i">strcat</span><span class="s">(</span><span class="w">dt</span><span class="cm">,</span> <span class="w">src</span><span class="s">)</span>             <span class="i">sv_catpv</span><span class="s">(</span><span class="w">sv</span><span class="cm">,</span> <span class="q">s)</span></li><li> <span class="q"> strncat(dt, src)            sv_catpvn(sv, s)</span></li><li> <a class="l_k" href="functions/sprintf.html">sprintf</a><span class="s">(</span><span class="q">s, fmt, ...)        sv_setpvf(sv,</span> <span class="w">fmt</span><span class="cm">,</span> ...<span class="s">)</span></li></ol></pre><p>Note also the existence of <code class="inline"><span class="w">sv_catpvf</span></code>
448
 and <code class="inline"><span class="w">sv_vcatpvfn</span></code>
449 450 451
, combining
concatenation with formatting.</p>
<p>Sometimes instead of zeroing the allocated heap by using Newxz() you
452
should consider "poisoning" the data.  This means writing a bit
453 454 455 456
pattern into it that should be illegal as pointers (and floating point
numbers), and also hopefully surprising enough as integers, so that
any code attempting to use the data without forethought will break
sooner rather than later.  Poisoning can be done using the Poison()
457
macros, which have similar arguments to Zero():</p>
458 459 460 461 462
<pre class="verbatim"><ol><li> <span class="i">PoisonWith</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="cm">,</span> <span class="w">b</span><span class="s">)</span>    <span class="w">scribble</span> <span class="w">memory</span> <span class="w">with</span> <span class="w">byte</span> <span class="w">b</span></li><li> <span class="i">PoisonNew</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span>        <span class="w">equal</span> <span class="w">to</span> <span class="i">PoisonWith</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="cm">,</span> <span class="n">0xAB</span><span class="s">)</span></li><li> <span class="i">PoisonFree</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span>       <span class="w">equal</span> <span class="w">to</span> <span class="i">PoisonWith</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="cm">,</span> <span class="n">0xEF</span><span class="s">)</span></li><li> <span class="i">Poison</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span>           <span class="w">equal</span> <span class="w">to</span> <span class="i">PoisonFree</span><span class="s">(</span><span class="w">dst</span><span class="cm">,</span> <span class="w">n</span><span class="cm">,</span> <span class="w">t</span><span class="s">)</span></li></ol></pre><a name="Character-Class-Tests"></a><h2>Character Class Tests</h2>
<p>There are several types of character class tests that Perl implements.
The only ones described here are those that directly correspond to C
library functions that operate on 8-bit characters, but there are
equivalents that operate on wide characters, and UTF-8 encoded strings.
463
All are more fully described in <a href="perlapi.html#Character-classification">Character classification in perlapi</a> and
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
<a href="perlapi.html#Character-case-changing">Character case changing in perlapi</a>.</p>
<p>The C library routines listed in the table below return values based on
the current locale.  Use the entries in the final column for that
functionality.  The other two columns always assume a POSIX (or C)
locale.  The entries in the ASCII column are only meaningful for ASCII
inputs, returning FALSE for anything else.  Use these only when you
<b>know</b> that is what you want.  The entries in the Latin1 column assume
that the non-ASCII 8-bit characters are as Unicode defines, them, the
same as ISO-8859-1, often called Latin 1.</p>
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>  <span class="w">Use</span> <a class="l_k" href="functions/for.html">for</a> <span class="w">ASCII</span><span class="co">:</span>   <span class="w">Use</span> <a class="l_k" href="functions/for.html">for</a> <span class="w">Latin1</span><span class="co">:</span>      <span class="w">Use</span> <a class="l_k" href="functions/for.html">for</a> <span class="w">locale</span><span class="co">:</span></li><li></li><li> <span class="i">isalnum</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isALPHANUMERIC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span> <span class="i">isALPHANUMERIC_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span> <span class="i">isALPHANUMERIC_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isalpha</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isALPHA</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isALPHA_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isALPHA_LC</span><span class="s">(</span><span class="w">u</span> <span class="s">)</span></li><li> <span class="i">isascii</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isASCII</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>                             <span class="i">isASCII_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isblank</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isBLANK</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isBLANK_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isBLANK_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">iscntrl</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isCNTRL</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isCNTRL_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isCNTRL_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isdigit</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isDIGIT</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isDIGIT_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isDIGIT_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isgraph</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isGRAPH</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isGRAPH_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isGRAPH_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">islower</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isLOWER</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isLOWER_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isLOWER_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isprint</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isPRINT</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isPRINT_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isPRINT_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">ispunct</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isPUNCT</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isPUNCT_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isPUNCT_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isspace</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isSPACE</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isSPACE_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isSPACE_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isupper</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">isUPPER</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isUPPER_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">isUPPER_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">isxdigit</span><span class="s">(</span><span class="w">c</span><span class="s">)</span> <span class="i">isXDIGIT</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>       <span class="i">isXDIGIT_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>       <span class="i">isXDIGIT_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li></li><li> <span class="i">tolower</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">toLOWER</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">toLOWER_L1</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>        <span class="i">toLOWER_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li><li> <span class="i">toupper</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>  <span class="i">toUPPER</span><span class="s">(</span><span class="w">c</span><span class="s">)</span>                             <span class="i">toUPPER_LC</span><span class="s">(</span><span class="w">c</span><span class="s">)</span></li></ol></pre><p>To emphasize that you are operating only on ASCII characters, you can
append <code class="inline"><span class="w">_A</span></code>
 to each of the macros in the ASCII column: <code class="inline"><span class="w">isALPHA_A</span></code>
,
<code class="inline"><span class="w">isDIGIT_A</span></code>
, and so on.</p>
<p>(There is no entry in the Latin1 column for <code class="inline"><span class="w">isascii</span></code>
 even though there
is an <code class="inline"><span class="w">isASCII_L1</span></code>
, which is identical to <code class="inline"><span class="w">isASCII</span></code>
;  the
latter name is clearer.  There is no entry in the Latin1 column for
<code class="inline"><span class="w">toupper</span></code>
 because the result can be non-Latin1.  You have to use
<code class="inline"><span class="w">toUPPER_uni</span></code>
, as described in <a href="perlapi.html#Character-case-changing">Character case changing in perlapi</a>.)</p>
<a name="_stdlib.h_-functions"></a><h2><i>stdlib.h</i> functions</h2>
490 491 492
<pre class="verbatim"><ol><li> <span class="w">Instead</span> <span class="w">Of</span><span class="co">:</span>                 <span class="w">Use</span><span class="co">:</span></li><li></li><li> <span class="i">atof</span><span class="s">(</span><span class="q">s)                     Atof(s)</span></li><li> <span class="q"> atoi(s)</span>                     <span class="i">grok_atoUV</span><span class="s">(</span><span class="q">s, &amp;uv, &amp;e)</span></li><li> <span class="q"> atol(s)                     grok_atoUV(s,</span> &amp;<span class="w">uv</span><span class="cm">,</span> <span class="i">&amp;e</span><span class="s">)</span></li><li> <span class="i">strtod</span><span class="s">(</span><span class="q">s, &amp;p)               Nothing.  Just don&#39;t use it.</span></li><li> <span class="q"> strtol(s, &amp;p,</span> <span class="w">n</span><span class="s">)</span>            <span class="i">grok_atoUV</span><span class="s">(</span><span class="q">s, &amp;uv, &amp;e)</span></li><li> <span class="q"> strtoul(s,</span> &amp;<span class="w">p</span><span class="cm">,</span> <span class="w">n</span><span class="s">)</span>           <span class="i">grok_atoUV</span><span class="s">(</span><span class="q">s, &amp;uv, &amp;e)</span></li></ol></pre><p>Typical use is to do range checks on <code class="inline"><span class="w">uv</span></code>
 before casting:</p>
<pre class="verbatim"><ol><li>  <a class="l_k" href="functions/int.html">int</a> <span class="w">i</span><span class="sc">;</span> <span class="w">UV</span> <span class="w">uv</span><span class="sc">;</span> <span class="w">char</span>* <span class="w">end_ptr</span><span class="sc">;</span></li><li>  <a class="l_k" href="functions/if.html">if</a> <span class="s">(</span><span class="i">grok_atoUV</span><span class="s">(</span><span class="w">input</span><span class="cm">,</span> <span class="i">&amp;uv</span><span class="cm">,</span> <span class="i">&amp;end_ptr</span><span class="s">)</span></li><li>      &amp;&amp; <span class="w">uv</span> &lt;= <span class="w">INT_MAX</span><span class="s">)</span></li><li>    <span class="w">i</span> = <span class="s">(</span><a class="l_k" href="functions/int.html">int</a><span class="s">)</span><span class="w">uv</span><span class="sc">;</span></li><li>    ... <span class="q">/* continue parsing from end_ptr */</span></li><li>  <span class="s">}</span> <a class="l_k" href="functions/else.html">else</a> <span class="s">{</span></li><li>    ... <span class="q">/* parse error: not a decimal integer in range 0 .. MAX_IV */</span></li><li>  <span class="s">}</span></li></ol></pre><p>Notice also the <code class="inline"><span class="w">grok_bin</span></code>
493 494
, <code class="inline"><span class="w">grok_hex</span></code>
, and <code class="inline"><span class="w">grok_oct</span></code>
495 496
 functions in
<i>numeric.c</i> for converting strings representing numbers in the respective
497
bases into <code class="inline"><span class="w">NV</span></code>
498 499 500 501
s.  Note that grok_atoUV() doesn't handle negative inputs,
or leading whitespace (being purposefully strict).</p>
<p>Note that strtol() and strtoul() may be disguised as Strtol(), Strtoul(),
Atol(), Atoul().  Avoid those, too.</p>
502 503
<p>In theory <code class="inline"><span class="w">Strtol</span></code>
 and <code class="inline"><span class="w">Strtoul</span></code>
504
 may not be defined if the machine perl is
505 506
built on doesn't actually have strtol and strtoul. But as those 2
functions are part of the 1989 ANSI C spec we suspect you'll find them
507
everywhere by now.</p>
508
<pre class="verbatim"><ol><li> <a class="l_k" href="functions/int.html">int</a> <a class="l_k" href="functions/rand.html">rand</a><span class="s">(</span><span class="s">)</span>                  <span class="w">double</span> <span class="i">Drand01</span><span class="s">(</span><span class="s">)</span></li><li> <a class="l_k" href="functions/srand.html">srand</a><span class="s">(</span><span class="w">n</span><span class="s">)</span>                    <span class="s">{</span> <span class="i">seedDrand01</span><span class="s">(</span><span class="s">(</span><span class="w">Rand_seed_t</span><span class="s">)</span><span class="w">n</span><span class="s">)</span><span class="sc">;</span></li><li>                               <span class="w">PL_srand_called</span> = <span class="w">TRUE</span><span class="sc">;</span> <span class="s">}</span></li><li></li><li> <a class="l_k" href="functions/exit.html">exit</a><span class="s">(</span><span class="w">n</span><span class="s">)</span>                     <span class="i">my_exit</span><span class="s">(</span><span class="w">n</span><span class="s">)</span></li><li> <a class="l_k" href="functions/system.html">system</a><span class="s">(</span><span class="q">s)                   Don&#39;t. Look at pp_system or use my_popen.</span></li><li></li><li> <span class="q"> getenv(s)                   PerlEnv_getenv(s)</span></li><li> <span class="i">setenv</span><span class="s">(</span><span class="q">s, val)              my_setenv(s, val)</span></li></ol></pre><a name="Miscellaneous-functions"></a><h2>Miscellaneous functions</h2>
509
<p>You should not even <b>want</b> to use <i>setjmp.h</i> functions, but if you
510
think you do, use the <code class="inline"><span class="w">JMPENV</span></code>
511
 stack in <i>scope.h</i> instead.</p>
512 513 514
<p>For <code class="inline"><span class="w">signal</span></code>
/<code class="inline"><span class="w">sigaction</span></code>
, use <code class="inline"><span class="i">rsignal</span><span class="s">(</span><span class="w">signo</span><span class="cm">,</span> <span class="w">handler</span><span class="s">)</span></code>
515 516
.</p>
<a name="SEE-ALSO"></a><h1>SEE ALSO</h1>
517
<p><a href="perlapi.html">perlapi</a>, <a href="perlapio.html">perlapio</a>, <a href="perlguts.html">perlguts</a></p>
518 519 520 521




522 523 524 525 526
  <div id="page_index" class="hud_container">
    <div id="page_index_header" class="hud_header">
      <div id="page_index_close" class="hud_close"><a href="#" onClick="pageIndex.hide();return false;"></a></div>
      <div id="page_index_title" class="hud_title"><span class="hud_span_top">Page index</span></div>
      <div id="page_index_topright" class="hud_topright"></div>
527
    </div>
528
    <div id="page_index_content" class="hud_content">
529 530
      <ul><li><a href="#NAME">NAME</a><li><a href="#DESCRIPTION">DESCRIPTION</a><ul><li><a href="#Conventions">Conventions</a><li><a href="#File-Operations">File Operations</a><li><a href="#File-Input-and-Output">File Input and Output</a><li><a href="#File-Positioning">File Positioning</a><li><a href="#Memory-Management-and-String-Handling">Memory Management and String Handling</a><li><a href="#Character-Class-Tests">Character Class Tests</a><li><a href="#_stdlib.h_-functions">_stdlib.h_ functions</a><li><a href="#Miscellaneous-functions">Miscellaneous functions</a></ul><li><a href="#SEE-ALSO">SEE ALSO</a></ul>
    </div>
531 532 533 534
    <div id="page_index_footer" class="hud_footer">
      <div id="page_index_bottomleft" class="hud_bottomleft"></div>
      <div id="page_index_bottom" class="hud_bottom"><span class="hud_span_bottom"></span></div>
      <div id="page_index_resize" class="hud_resize"></div>
535 536 537
    </div>
  </div>

538 539 540 541 542 543 544

	    &nbsp;
          </div>
          <div id="content_footer">
          </div>
        </div>
        <div class="clear"></div>
545
      </div>
546
      
547 548 549 550 551 552 553 554 555
    <div id="footer">
      <div id="footer_content">
        <div id="footer_strapline">
          perldoc.perl.org - Official documentation for the Perl programming language
        </div>
        <div id="footer_links">
          <div id="address">
            <p class="name">Contact details</p>
            <p class="address">
556
	      Site maintained by <a href="mailto:jj@jonallen.info">Jon Allen (JJ)</a><br>
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
	    </p>
            <p class="contact">
              Documentation maintained by the <a href="http://lists.cpan.org/showlist.cgi?name=perl5-porters">Perl 5 Porters</a>
            </p>
          </div>
          <ul class="f1">
            <li>Manual
              <ul class="f2">
                <li><a href="index-overview.html">Overview</a>
                <li><a href="index-tutorials.html">Tutorials</a>
                <li><a href="index-faq.html">FAQs</a>
                <li><a href="index-history.html">Changes</a>
              </ul>
            <li>Reference
              <ul class="f2">
                <li><a href="index-language.html">Language</a>
                <li><a href="index-functions.html">Functions</a>
                <li><a href="perlop.html">Operators</a>
                <li><a href="perlvar.html">Variables</a>
              </ul>
            <li>Modules
              <ul class="f2">
                <li><a href="index-modules-A.html">Modules</a>
                <li><a href="index-pragmas.html">Pragmas</a>
                <li><a href="index-utilities.html">Utilities</a>
              </ul>
            <li>Misc
              <ul class="f2">
                <li><a href="index-licence.html">License</a>
                <li><a href="index-internals.html">Internals</a>
                <li><a href="index-platforms.html">Platforms</a>
              </ul>          </ul>
          <div class="clear"></div>
        </div>
      </div>
      <div id="footer_end">
593
      </div>
594
    </div>
595
      
596
    </div>
597 598
      <script language="JavaScript" type="text/javascript" src="static/exploreperl.js"></script>
      <script language="JavaScript" src="static/combined-20100403.js" type="text/javascript"></script>
599 600 601 602 603
<script language="JavaScript" type="text/javascript">
  perldoc.setPath(0);
  perldoc.pageName    = 'perlclib';
  perldoc.pageAddress = 'perlclib.html';
  perldoc.contentPage = 1;
604 605
  explorePerl.render();
  explorePerl.addEvents('explore_anchor');
606 607 608
</script>
    
  </body>
609
</html>