Perl's versatile split function
Oct 24, 2014 by David Farrell
Write elegant, simple code with split
![]() |
VOOZH | about |
Oct 24, 2014 by David Farrell
Write elegant, simple code with split
Mar 27, 2014 by David Farrell
Learn enough to be dangerous with one of Perlโs most powerful features
Oct 3, 2013 by David Farrell
Perlโs split function has a useful feature that will split a string into characters. This works by supplying an empty regex pattern ("//") to the split function. This can be used to easily split a word into an array of letters, for example:
Apr 12, 2013 by David Farrell
Perlโs for loops are a powerful feature that, like the rest of Perl can be as concise, flexible and versatile required. This article covers the core features for Perlโs for loops.
Apr 9, 2013 by David Farrell
A popular way to build a list of literal quotes in Perl is to use the quote whitespace operator (qw). Itโs terse, versatile and elegant. To see why, letโs look at a typical statement using a list of strings:
Apr 4, 2013 by David Farrell
Arrays in Perl contain an ordered list of values that can be accessed using built-in functions. They are one of the most useful data structures and frequently used in Perl programming.
Apr 3, 2013 by David Farrell
A typical way to print every element of an array in Perl is using a foreach loop:
Mar 28, 2013 by David Farrell
Most Perl programmers know that to find the size of an array, the array must called in a scalar context like this:
Apr 10, 2001 by Pete Sergeant
A couple of months ago, I was approached by a company that I had done some work for previously, and was asked to build them a search engine to index about 200MB of HTML. However, some fairly strict rulesโฆ
To get in touch, submit an issue to perladvent/perldotcom on GitHub.
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.
Perl.com and the authors make no representations with respect to the accuracy or completeness of the contents of all work on this website and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. The information published on this website may not be suitable for every situation. All work on this website is provided with the understanding that Perl.com and the authors are not engaged in rendering professional services. Neither Perl.com nor the authors shall be liable for damages arising herefrom.