By Kuhn B. M.
Read Online or Download Picking Up Perl PDF
Similar programming: programming languages books
With bill - cargo from Germany
- The Ruby Programming Language (Covers Ruby 1.8 and 1.9)
- Structures de données en Java
- Merveilleuses parures: 60 bijoux originaux en perles de cristal et fantaisie
- Sams Teach Yourself Windows Phone 7 Game Programming in 24 Hours (11) by Harbour, Jonathan [Paperback (2011)]
- GCC-AVR inline assembler cookbook.V1.6
Extra info for Picking Up Perl
The ()’s are used for grouping. For example, if we want to match any string that contains abc or def, zero or more times, surrounded by a xx on either side, we could write the regular expression xx(abc|def)*xx. This applies the * character to everything that is in the parentheses. Thus we can match any strings such as xxabcxx, xxabcdefxx, etc. 6 The Anchor Characters Sometimes, we want to apply the regular expression from a defined point. In other words, we want to anchor the regular expression so it is not permitted to match anywhere in the string, just from a certain point.
If we applied this to our last regular expression, we have ^aa*$ which now matches only those strings that consist of one or more a’s. This makes it clear that the regular expression cannot just look anywhere in the string, rather the regular expression must be able to match the entire string exactly, or it will not match at all. In most cases, you will want to either anchor a regular expression to the start of the string, the end of the string, or both. Using a regular expression without some sort of anchor can also produce confusing and strange results.
Before Perl, almost all text processing on Unix-like systems was done with a conglomeration of tools that included AWK, ‘sed’, the various shell programming languages, and C programs. Larry wanted to fill the void between “manipulexity” (the ability of languages like C to “get into the innards of things”) and “whipuptitude” (the property of programming languages like AWK or ‘sh’ that allows programmers to quickly write useful programs). Thus, Perl, the Practical Extraction and Report Language1 , was born.