... 66 Chapter 6: Playing With the Rainbow: International Colour Implications 67 Colour Psychology 67 Colour Connotations 68 Context is King ... Buchanan, The MIT Press, 19 96, ISBN: 0 262 63 166 0 Several essays on the essence of design This book contains the Chang essay about line Geometry of Design: Studies in Proportion and Composition by Kimberly ... their format is also two-dimensional and restrictive Billboards are standard sizes, and so are magazines formats Movie and television producers deal with standard formats, also Three dimensional...
... distinct and can be used independently or in tandem In this section we look at some ways to use autohandlers and dhandlers together Most important about the way dhandlers and autohandlers interact ... disk, and so on See Chapter for more information on the HTML::Mason::Component family of classes Using Autohandlers and Dhandlers Together Despite their similar names, the autohandler and dhandler ... "\.html$"> SetHandler perl- script PerlHandler HTML::Mason::ApacheHandler This directive has a rather strange interaction with Mason's dhandler mechanism If you have a dhandler at...
... resolving and compiling phases Figure 6- 1 illustrates the relationship between these four objects The Interpreter has a Compiler and a Resolver, and the Compiler has a Lexer Figure 6- 1 The Interpreter ... MasonAllowGlobals $dbh PerlAddVar MasonAllowGlobals %session The allow_globals parameter can be used effectively with the Perl local() function in an autohandler The top-level autohandler is a convenient ... global variables, and local() is exactly the right tool to ensure that they're properly cleaned up at the end of the request: # In the top-level autohandler: # $dbh and %session have...
... a perl directory within the server root, such as ~www /perl Now enter the following directives into perl. conf : Alias /perl/ /usr/local/apache /perl/ 47 SetHandler PerlHandler PerlSendHeader ... activated perl module (modules /perl/ libperl.a) Creating Makefile Creating Configuration.apaci in src + id: mod _perl/ 1. 16 + id: Perl/ 5.00404 (linux) [perl] many similar lines deleted PerlDispatchHandler ... /usr/local/lib /perl5 /site _perl/ i586linux/./auto/Digest/MD5/MD5.so Installing /usr/local/lib /perl5 /site _perl/ i586linux/./auto/Digest/MD5/MD5.bs 13 Installing /usr/local/lib /perl5 /site _perl/ i586linux/./auto/MD5/MD5.so...
... "Goodbye\n"; 464 Perland Databases The results are less than earth-shattering: >perl connect1.plx Hello Goodbye > On the other hand, if we get this output, we know that we have successfully hooked up and ... O_CREAT|O_RDWR, 064 4; Because we're potentially creating the file, we specify a file mode in octal; 064 4 specifies read and write access for us (6) , but read-only access for other groups and users (4) ... operating system understands the concept of users and file permissions, but it's worth specifying for portability reasons For more details on file modes, see Chapter 6, and perldoc -f sysopen Finally,...
... writing/hacking was accomplished; and, of course, Larry Wall and all the strange and wonderful people who brought (and continue to bring) us Perl Perl and XML page Chapter Perland XML Perl is a mature but ... John and Michelle, John and Dolores, Jim and Joanne, Gene and Margaret, Liane, Tim and Donna, Theresa, Christopher, MaryAnne, Anna, Tony, Paul and Sherry, Lillian, Bob, Joe and Pam, Elaine and ... 90 6. 2 XML::Simple .91 6. 3 XML::Parser's Tree Mode .93 6. 4 XML::SimpleObject 94 6. 5 XML::TreeBuilder . 96 6 .6 XML::Grove...
... Minimal Perl: for UNIX and Linux Users 1 Introducing Minimal PerlPerl essentials 16 Perl as a (better) grep command 53 Perl as a (better) sed command 89 Perl as a (better) awk command 121 Perl ... capabilities of greppers andPerl 57 3.3 Working with the matching operator 60 The one-line Perl grepper 3.4 3.5 3 .6 3.7 61 Understanding Perl s regex notation 63 Perl as a better fgrep 64 Displaying the ... Directions for further study 361 11 Subroutines and variable scoping 362 11.1 Compartmentalizing code with subroutines Defining and using subroutines strict 368 365 ✦ 363 Understanding use 11.2 Common...
... has all of the Perl quiz shows as well, to help you test and increase your Perl knowledge Part V Perl Poetry has been around since 1990, and has been published in the Economist and the Guardian ... change, and news becomes history Those articles didn’t make the cut; the rest are in this book and the two companion books, Computer Science & Perl Programming: Best of The Perl Journal and Web, ... But Perl is different; it’s spawned an array of pastimes such as Obfuscated PerlandPerl Poetry that perplex some outsiders but seem perfectly natural to the renaissance hackers attracted to Perl...
... and Flavors 59 A Casual Stroll Across the Regex Landscape 60 The World According to Grep 60 The Times They Are a Changin' 61 At a Glance 63 POSIX 64 Care and Handling of Regular Expressions 66 ... Expressions 66 Identifying a Regex 66 Doing Something with the Matched Text 67 Other Examples 67 Care and Handling: Summary 70 Engines and Chrome Finish 70 Chrome and Appearances 71 Engines and Drivers ... Experiences 161 162 162 Page ix The Real "Unrolling the Loop" Pattern 164 Method 2: A Top-Down View 166 Method 3: A Quoted Internet Hostname 167 Observations 168 Unrolling C Comments 168 Regex Headaches...
... Minimal Perl: for UNIX and Linux Users 1 Introducing Minimal PerlPerl essentials 16 Perl as a (better) grep command 53 Perl as a (better) sed command 89 Perl as a (better) awk command 121 Perl ... capabilities of greppers andPerl 57 3.3 Working with the matching operator 60 The one-line Perl grepper 3.4 3.5 3 .6 3.7 61 Understanding Perl s regex notation 63 Perl as a better fgrep 64 Displaying the ... Directions for further study 361 11 Subroutines and variable scoping 362 11.1 Compartmentalizing code with subroutines Defining and using subroutines strict 368 365 ✦ 363 Understanding use 11.2 Common...
... output: alias perl_ o=' perl -wl ' # Output Generation This next group is for commands that read input: alias alias alias alias perl_ io=' perl_ iop=' perl_ f=' perl_ fp=' perlperlperlperl -wnl -wpl ... process input a paragraph at a time: alias alias alias alias alias Perl_ o=' Perl_ io=' Perl_ iop=' Perl_ f=' Perl_ fp=' perlperlperlperlperl -00 -00 -00 -00 -00 -wl -wnl -wpl -wnla -wpla ' ' ' ' ' ... Summary 86 3.1 A brief history of grep 53 3.2 Shortcomings of grep 54 3.3 Working with the matching operator 60 3.4 Understanding Perl s regex notation 63 3.5 Perl as a better fgrep 64 3 .6 Displaying...
... Explanation /perl/ Looks for a match with perl in $_ Matches perl in $_ m :perl: Same, except uses different delimiters Matches perl in $_ $data =~ /perl/ i Looks for a match Matches perlPERLPerl ... s /perl/ Perl/g; Globally substitutes Perl for each occurrence of perl in $_ $oyster =~ s /perl/ Perl/g; Globally substitutes Perl for each occurrence of perl in $oyster $oyster =~ s/\bperl\b/'$&'/ig; ... regexes and in double-quoted strings 56 CHAPTER PERL AS A (BETTER) grep COMMAND To illustrate the benefits of string escapes, here are comparable grep and perlgrep commands for extracting and displaying...
... of AWK andPerl next NOTE 5.2 AWK is totally AWKsome, but Perl is even better; it’s Perlicious! COMPARING BASIC FEATURES OF awk ANDPERL This section provides an overview of how AWK andPerl compare ... discussed in this chapter Table 4 .6 sed andPerl commands for common editing activities Section reference sed command Perl counterpart a Meaning sed 's/RE/new/g' F perl -wpl -e 's/RE/new/g;' F Attempt ... between AWK andPerl that were touched on in the preceding discussion and in the comparisons of tables 5.1 and 5.2 Ways in which Perl is superior to AWK Perl alone (see tables 5.1 and 5.2) provides...
... '-A and ! -B and print;' # Example perl -wnl -e '-A and -B and -C and print;' # Example perl -wnl -e '( -A or -B ) and print;' # Example perl -wnl -e '( -A or -B or -C ) and print;' # Example perl ... R Perl as a (better) find command 6. 1 Introducing hybrid find /perl programs 180 6. 2 File testing capabilities of find vs Perl 180 6. 3 Finding files 184 6. 4 Processing filename arguments 188 6. 5 ... Then Perl commands, having forms such as these, could be added as the filtering stage in the pipeline: perl -wnl -e '-A and print;' # Example perl -wnl -e '-A and -B and print;' # Example perl...
... Table 7.7 The rand function Typical invocation formats $random_tiny_number=rand; $random_larger_number=rand N; $random_element=$some_array[ rand @some_array ]; Example Explanation $num=rand; Assigns ... similarities and differences in how data flows between commands and functions 7.3.1 Comparing Unix pipelines andPerl functions Although there are distinct similarities between Unix command pipelines and ... requirements in chapter 11 36 2 46 The functions vs operator distinction is fuzzy in Perl, so some operators are documented in perlfunc and some functions in perlop, so it’s best to try perldoc –f name before...
... string $command="fmt -$width '$file'"; # e.g., # dashed line # the heading # dashed line "fmt -62 Reuters.txt" $debug and warn "Command is:\n\t$command\n\n" and $command="set -x; $command"; # enable ... separated records a cmd and cmd2 represent OS commands, var/$var and array/@array Shell /Perl variable names, and function a Perl function name When a Unix shell processes a command substitution, a ... backslashes, quotes, commas, and semicolons Table 8.9 shows the syntax for eval in both the Shell andPerl Table 8.9 The eval function in the Shell andPerl Shell Perl eval 'command' error=$? (( $error...