Perl Perl 24 Hours

Click here to load reader

  • date post

    01-Dec-2014
  • Category

    Documents

  • view

    496
  • download

    1

Embed Size (px)

Transcript of Perl Perl 24 Hours

SAMS

P

e

r

2 4

Clinton

Pierce

SAMS

T e a c h

Y o u r s e l f

P

e

r

l

in 24 HoursDh

SAMS Macmillan on, West103rdSt., Computer 201t, ?'?%?2l Indianapolis,I

SAMS

"" -* 2001

32.973.26-018.275 19 681.3.07

"" "" : info@williamspublishing.com, http://w\vw.\vi 1 iamspublishing.com 1

, . 19 Perl 24 . : . . : . . . : "", 2001. 384 .: . . . . ISBN 5-8459-0097-2 (.) Perl. , - . / , . Perl CGl-. . 32.973.26-018.2 75 . , , , Sams Publishing. Authorized translation from the English language edition published by Sams Publishing Copyright 2000 All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage retrieval system, without permission from the Publisher. Russian language edition published by Williams Publishing House according to the Agreement with R&I Enterprises International, Copyright 2000

ISBN 5-8459-0097-2 (.) ISBN 0-672-31773-7 (.)

"", 2001 Sams Publishing, 1999

17

I. PERL1 - . Perl 2- . Perl: 3- . 4- . : 5- . 6- . 7- . 8- .

1920 33 48 65 82 95 110 124

II. PERL9- . 10- . 11- . 12- . Perl 13- . 14- . 15- . Perl 16- . Perl

139140 154 172 187 200 216 230 249

III. CGI- PERL17- . CGI 18- . 19- . 20- . HTML- CGI- 21- . cookie 22- . CGI- 23- . Push- Web- 24- . Web- . Perl

263264 278 291 302 318 332 345 357 372 379 5

17

I. PERL1- . Perl Perl Perl ? Per! Windows 95/98/NT Perl UNIX Perl Macintosh ? ! ? Perl .

192021 21 23 23 25 25 26 26 27 28 28 29 29 29 30 30 31 31 32 32

2- . Perl: S_ :

3334 34 34 36 37 38 38 39 39 40 41 41 . 42 43 43 44 46 46

6

46 46 47 47

3- .

4849

if Perl

.

49 51 53 5456

while for if Perl

57 57 58 58 59 60 60 61 62 63 63 63 64 64

4- . : :

6566 67 68 69 70 71 73 73 74 76 77 80 80 80 80 81 81

5- . , ,

8282 84 85 86 86 89 90

-

91 9! 92 93 93 94 94 94 94

6- . : : grep

9596 97 97 97 98 98 99 101 102 102 103 104 104 105 106 106 107 107 108 108 108 109

7- . : Perl .

110111 112 113 114 114 115 115 115 ] 16 117 118 118 121 121 122 122 123 123

8- . : local Perl

124124 125 126 127 128 130 131 133 133 134 135 136 136 137 137 138 138

II. PERL 9- . index substr , : rindex

139 140140 HI 142 143 143 144 146 149 151 151 151 152 152 153 153

10- . : U N I X grep U N I X :

154155 156 158 160 160 161 162 163 163 164 165 168 169 169

9

170 170 ] 71 171

11- . system() ?

172173 174 175 176 177 179 1S1 184 184 185 185 186 186

12- . Perl Perl :

187187 188 189 190 I91 193 194 194 195 197 198 198 199 199 199

13- .

200201203 203 204

, , :

205 207 207 209 209 210 214 214 215 215 215 215

10

14- . ? ! -? . , -!

216217 218 219 220 220 222 223 224 224 225 227 227 228 228 228 229 229

15- . Perl DBM DBM- : UNIX Windows NT Windows 9x UNIX Windows NT

230230 232 232 233 236 238 239 239 240 241 242 245 246 246 247 247 248 248 248 248

16- . Perl Perl? Perl Perl Perl (CPAN) ? Perl? -,

249249249 250 252 252 252 254 254 255 255 256 256 257

11

,

'

258 259 260 260 261 261 261

III. CGl- PERL17- . CGI Web Web- CG1 Web- C G 1- CGI- CGI- , CGI- , ? Internal Server Error 500 Error

263264265 265 266 267 268 269 270 271 272 272 273 274 275 275 276 276 276 277

'

18- . HTML Submit? CGI- GET POST Web

278278278 280 281 282 283 283 284 285 286 286 288 289 289 289 290 290

19- . Web- " "

291291 292 292 293

12

'

'

299 300 300 300 301 301

20- . HTML- CGI- HTTP : : CGI- CGI- Web- : SSI

302302 304 304 307 307 308 309 311 313 314 316 316 316 316 317 317

21- . cookie cookie cookie : cookie : cookie cookie cookie cookie cookie cookie cookie cookie cookie cookie

318318319 321 322 323 323 324 325 326 327 328 328 328 328 329 330 331 331 331 331

22- . CGI- Internet UNIX UNIX Web-

332332 333 334 335 336 337 339

13

34! 342 342 343 343 343 344

23- . Push- Web- push- : & : , , .

345345 346 347 348 349 350 352 353 355 355 355 355 356 356

24- . Web- : : "" ? I: II:

357357 358 359 362 364 366 369 369 370 370 370 370

. Perl ... ...Windows 95/98/NT ...UNIX, CPAN ...UNIX, Macintosh , ,

372372 373 373 374 376 377 377 378

379

14

, "" . Perl, "Usenet, Perl , , . , UNIX, CGI- Ford Motor, UNIX Decision Consultants , , . Web http://www.geeksalad.org.

, " " . .

, . , Perl. 1 . , , . , , , . , . , , . . , (Greg Bacon), (Sean Bukre), (Ken Fox), (Kevin Meltzer), (Tom Phoenix), (Michael Schwern), (Grydeland), (Matt Bielanski), - (Mark JasonDominus), (Jeff Pinyan), (Gary Ross), (Andrew Chen) (John Bell). iperl , , .

' (Larry Wall) Per!. . .

15

(Bill Crawford) (Donna Hinkle), - . , . , , Macmillan, , -. , (Randi Roger), (Scott Meyers), (Chuck Hutchinson) , , .

, , . , , . , . . Web-, , , , , , . , , e-mail. . : E-mail: info@williamspublishing.com WWW: http://www. williamspublishing.com

, , . , Web-. WWW

-

16

. . , . , , , , . , - , Perl. . Web-, Perl, - . , Perl? Perl. , - . , Perl. . . , , Perl? , , - . Perl , , , , . , , Internet World Wide Web Perl? , Perl , , , . Perl , . , .

24 , . . ( ) , 10 , . . .

, Perl 24 . . .

17

. , , . . ^ j |

| Perl .

, .

18

I Perl 1 2 3 4 5 6 7 8 Perl Perl: : 20 33 48 65 82 95 110 124

1- PerlPerl . , . , , , , , 2000, , , , , Web. Perl , (glue language), . , Perl , Perl, , . Perl , , Web-. , ? Perl . , . Perl HTML Web. , Perl , . . , . Perl , . , , , . , Perl , , . . . Perl. ( ), , perl. - . perl. -, , Perl, PERL. Perl -

20

I. Perl

Practical Extraction and Report Language, . PERL, . Perl. Perl . Perl: Pathologically Eclectic Rubbish Lister ( ) . Perl. .

.

Perl Perl, . Perl ( , ) , , . . , .

Perl ? , , Perl . , Perl UNIX. Windows NT Perl Windows NT Resource Kit. , Perl, . UNIX . , , . , : $ $ % bash%, , , . . Perl . , Perl , ( $ ): $ perl -v { command not found) Perl. , Perl , , .

1- . Perl

21

Perl , 5 5.004, 5.005, 5.6 .. Perl 4.x, . Perl . , , , . Perl 5.6. Windows, , Perl, . MS-DOS, . 1.1. ( :\> ): C:\>perl -v ; 5 M- O P m l S S i p D o

. 1.1. Perl MS-DOS 5, . DOS Bad command or file name ( ), Perl ( 5). , Perl Macintosh, File Find (Command-f)- MacPerl, . 1.2. , Apple About MacPerl. 5.2.0 (Patchlevel 5.004), , MacPerl.

M r Choice-. oe . 1.2. Perl Maci