Muutke küpsiste eelistusi

Pro Perl Programming: From Professional to Advanced 1st ed. [Pehme köide]

  • Formaat: Paperback / softback, 325 pages, kõrgus x laius: 254x178 mm, kaal: 662 g, 107 Illustrations, black and white; XIX, 325 p. 107 illus., 1 Paperback / softback
  • Ilmumisaeg: 29-Feb-2020
  • Kirjastus: APress
  • ISBN-10: 1484256042
  • ISBN-13: 9781484256046
  • Pehme köide
  • Hind: 62,59 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 73,64 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 325 pages, kõrgus x laius: 254x178 mm, kaal: 662 g, 107 Illustrations, black and white; XIX, 325 p. 107 illus., 1 Paperback / softback
  • Ilmumisaeg: 29-Feb-2020
  • Kirjastus: APress
  • ISBN-10: 1484256042
  • ISBN-13: 9781484256046
Master intermediate to advanced techniques of the Perl programming language starting with a focus on regular expressions and some of their advanced features. This book then covers other pro-level features, including formatted output, file handling, and more.  





Additionally, you'll learn and explore the most useful built-in variables, pragmas, and modules available in the Perl language. Furthermore, you'll work with geometry managers and get a thorough treatment of graphical user interface development using Perl/TK and widgets. Lastly, youll cover debugging techniques.  





Pro Perl Programming is a professional-level reference guide on Perl and includes important aspects of it that you need as a professional programmer.   





What You Will Learn









Program regular expressions including atoms, smartmatch operators, and more Use advanced features such as HiRes Time, slurp() functions, Critic, Tidy and many more functions Handle advanced formatted output such as printf and sprintf Explore useful built-in variables, including status variables, separator variables, and the signal handle variable Explore and use Perl's built-in modules, including the Pragma modules Work with Perl/TK and its widgets-like geometry managers, frames, labels, buttons, check buttons, radio buttons, scrollbars, scales, entries, and menus

Who This Book Is For 





Those with at least some prior experience with Perl programming or have read Beginning Perl Programming by William Rothwell.





 





 
About the Author xvii
About the Technical Reviewer xix
Chapter 1 Intermediate Regular Expressions
1(36)
Review: Basic Regular Expressions
1(17)
Basic operations
2(1)
Basic modifiers
3(1)
Basic metacharacters
4(9)
Regular Expressions classes
13(2)
Backreferencing
15(3)
Modifiers
18(3)
The e modifier
19(1)
Thed modifier
19(1)
The s modifier
20(1)
Other modifiers
20(1)
Getting the Nth occurrence of a match
21(1)
Greedy vs. non-greedy matches
22(1)
Regular Expression variables
23(3)
What was matched
23(1)
Before and after what was matched
23(1)
Warning about $&,$', and $'
24(1)
Special characters in Regular Expressions
25(1)
Assertions
26(4)
Looking forward and back
27(2)
Using \G
29(1)
Reading from filehandles using split
30(1)
Multiple line matching
31(2)
Using the s modifier
32(1)
Using the \A, \Z, and \z assertions
33(1)
Commenting Regular Expressions
33(1)
Alternative delimiters
34(1)
Additional resources
34(1)
Lab exercises
35(2)
Chapter 2 Advanced Regular Expressions
37(32)
Make use of the Smartmatch operator
37(4)
Using REs with Smartmatch
38(1)
Additional Smartmatches
38(1)
The given statement
39(2)
Use Perl 5.10.1 or higher
41(1)
Understand Regular Expression precedence
41(1)
Understand what is *NOT* a Regular Expression atom
42(1)
Using Regular Expressions in list context
43(2)
Naming the capture variables within the pattern match
44(1)
Match whitespace properly
45(1)
Matching "end of the line"
46(1)
Use \G
46(1)
Use the \A, \Z, and \z assertions
47(1)
Avoid capturing
48(3)
Avoid the variables $', $&, and $'
51(1)
Method #1
51(1)
Example using @-
51(1)
Method #2
52(1)
Compile your Regular Expressions before using them
52(5)
Run time vs. compile time
53(2)
Using qr to test user input
55(1)
Using the o modifier
56(1)
Benchmark your patterns
57(1)
Use Regexp::Common
58(3)
Flags you should consider always using
61(1)
Automating /smx
61(1)
Avoid escapes
62(1)
Use the re pragma
63(3)
Use re `debug'
63(3)
Understand backtracking
66(1)
Additional resources
67(1)
Lab exercises
67(2)
Chapter 3 Advanced Features
69(38)
Use my iterator variables with for loops
69(3)
Foreach loops use local variable by default
70(2)
Utilize loop labels
72(1)
Avoid using <> for file matching
72(1)
Time::HiRes
73(1)
Contextual::Return
74(2)
Indirect Filehandles
76(1)
The three-argument technique to the open statement
77(1)
Always check the return values of open, close, and when printing to a file
78(1)
Close filehandles as soon as possible
79(1)
Avoid slurping
79(1)
Creatively use the do statement
80(2)
Use the slurpO function
82(1)
Test for interactivity
82(1)
Use IO::Prompt
83(1)
Understand where to find documentation
84(2)
Sources of documentation
85(1)
Understand context
86(2)
Number vs. string
86(2)
Scalar vs. array vs. list
88(1)
Understand the =< operator
88(2)
Understand subroutine calls
90(3)
Understand and/or vs. &&/II
93(1)
Use Perl::Tidy
94(2)
Use Perl::Critic
96(1)
Understand Getopt::Std
97(3)
Understand Getopt::Long
100(2)
Alternative commenting technique
102(2)
Passing notes within a Perl program
104(1)
Use Smart::Comments
105(1)
Additional resources
106(1)
Lab exercises
106(1)
Chapter 4 Advanced Formatted Output
107(22)
Review: The format statement
107(5)
The format statement
107(1)
Placeholders
108(3)
Repeating lines
111(1)
Using select
112(1)
Warning regarding the select statement
113(1)
Advanced format statement features
113(7)
Top of form
114(1)
Format variables
115(4)
Padding with zeros
119(1)
Using ^*
120(1)
Printf and sprintf
120(5)
Options for printf and sprintf
121(1)
Printf and sprintf flags
122(1)
Example: Rounding numbers
122(1)
Example: Modifying numbers
123(1)
Example: Converting ASCII values
123(2)
Print sprintf
125(1)
The <> Operator
125(2)
Additional resources
127(1)
Lab exercises
127(2)
Chapter 5 Exploring Useful Built-in Variables
129(16)
Variables reference chart
129(3)
Use English
132(1)
Status variables
133(3)
The $? variable
133(2)
The $! variable
135(1)
The $^E variable
135(1)
The $@ variable
136(1)
Separator variables
136(3)
Input record separator
136(1)
Array separator variable
137(1)
Print separators
138(1)
The signal handle variable
139(3)
Version of Perl
142(1)
Program start time
143(1)
Additional resources
143(1)
Lab exercises
144(1)
Chapter 6 Advanced File Handling
145(14)
Review: Basic file handling
145(3)
Opening and reading from files
145(1)
Opening and writing to files
146(1)
Piping in Perl
147(1)
Displaying the file position
148(1)
Moving the file position
149(1)
Opening files for reading and writing
150(2)
Open an existing file for reading and writing
150(1)
Truncating files
151(1)
Why open a file for both reading and writing?
152(1)
Making "files" within your script
152(2)
Locking files
154(1)
Flushing output buffers
155(1)
Using select
156(1)
Additional resources
156(1)
Lab exercises
157(2)
Chapter 7 Pragmas
159(20)
Pragma chart
159(1)
The use strict pragma
160(3)
Use Strict `Ref'
160(1)
Use Strict `Subs'
160(1)
Use Strict `Vars'
161(2)
Predeclaring subroutines
163(5)
Predeclaring global variables
168(5)
Using new features
173(3)
Example of use feature `say' and use feature `state'
174(1)
Example of use feature "switch"
174(1)
Using all features of a specific Perl version
175(1)
Using locale
176(1)
Final note about pragmas
177(1)
Additional resources
177(1)
Lab exercises
178(1)
Chapter 8 Exploring Useful Built-in Modules
179(26)
Built-in modules
179(4)
Manipulate @INC at compile time
180(1)
Determining the location of loaded modules
181(1)
Loading modules as needed
182(1)
Module table
183(1)
Cwd
184(2)
Cwd
184(1)
Getcwd
184(1)
Fastcwd
185(1)
Why not use a system statement?
185(1)
Env
186(1)
File modules
187(5)
File::Basename
187(1)
File::Compare
188(1)
File::Copy
188(1)
File::Path
188(2)
File-Find
190(1)
Additional useful file modules
191(1)
Math modules
192(1)
Math::BigFloat
192(1)
Math::Trig
192(1)
Additional useful math modules
193(1)
Sys modules
193(1)
Text
193(3)
Text::Tabs
194(1)
Text:: Wrap
194(2)
Fatal
196(1)
Benchmark
196(1)
Getopt::Std
197(3)
Getopt::Long
200(2)
Additional resources
202(1)
Lab exercises
202(3)
Chapter 9 Debugging Tools
205(20)
Review: The -w switch
205(3)
The $^W variable
207(1)
Use warnings
207(1)
The -W switch
208(1)
The -X switch
208(1)
The Perl debugger
208(1)
Debugger commands
209(8)
Getting help
210(1)
An alternative to print
211(1)
Stepping through code
212(1)
Listing code
212(1)
Setting breakpoints
213(1)
Listing breakpoints
213(1)
Continue to breakpoints
214(1)
Deleting breakpoints
214(2)
Displaying variables and subroutines
216(1)
Additional debuggers
217(1)
Understanding error messages
218(1)
Use diagnostics
219(1)
Carp
220(2)
Using carp
220(1)
Using croak
221(1)
Data::Dumper
222(1)
Peristyle
223(1)
Additional resources
224(1)
Lab exercises
224(1)
Chapter 10 Perl/TK Basics
225(10)
The TK module
225(1)
Types of widgets
226(1)
Exploring widget examples
227(4)
Geometry managers
231(1)
Creating widgets
232(1)
The 00 nature of the Tk module
232(1)
Additional resources
233(1)
Lab exercises
233(2)
Chapter 11 Perl TK Widgets
235(60)
Frames
235(4)
Relief
236(2)
Colors
238(1)
Labels
239(8)
Bitmaps
239(2)
Using other images
241(1)
Text
242(2)
Text wrapping
244(3)
Buttons
247(8)
Using buttons to exit your script
248(1)
Using buttons to destroy widgets
249(1)
Unpacking instead of destroying
250(1)
Changing the cursor
251(1)
Opening a toplevel
252(2)
Lab
254(1)
Checkbuttons
255(2)
Radiobuttons
257(3)
Padding
258(2)
Listboxes
260(6)
Using selected values
262(2)
Selecting options
264(2)
Scrollbars
266(4)
Lab
269(1)
Scales
270(5)
Setting a default scale value
272(3)
Entries
275(6)
Hiding the user's input
276(2)
Disable an entry box
278(3)
Creating menus
281(12)
Creating the menu options
281(1)
Adding radio options
282(3)
Adding check options
285(3)
Adding command options
288(1)
Adding cascade and separators
289(4)
Additional resources
293(1)
Lab exercises
293(2)
Chapter 12 Geometry Managers
295(24)
The -after and -before option
295(3)
The -anchor and -side options
298(3)
Anchor vs. -side
299(2)
The -fill option
301(3)
Padding with pack
304(2)
Managing widgets with pack
306(6)
Binding
312(3)
Event
312(3)
The focus command
315(3)
Additional resources
318(1)
Lab exercises
318(1)
Index 319
At the impressionable age of 14, William "Bo" Rothwell crossed paths with a TRS-80 Micro Computer System (affectionately known as a Trash 80).  Soon after the adults responsible for Bo made the mistake of leaving him alone with the TSR-80.  He immediately dismantled it and held his first computer class, showing his friends what made this computer thing work. Since this experience, Bos passion for understanding how computers work and sharing this knowledge with others has resulting in a rewarding career in IT training.  His experience includes Linux, Unix, DevOps tools, and programming languages such as Perl, Python, Tcl, and BASH.