• MORE:
  • Perl Camel
  • rss
  • GitHub logo
Perl.com
  •   ABOUT
  •   AUTHORS
  •   CATEGORIES
  • #
      TAGS

Perl's versatile split function

Oct 24, 2014 by David Farrell

development
array
split
builtin
function
whitespace
trim
char
join

Write elegant, simple code with split

Read it

Perl references: create, dereference and debug with confidence

Mar 27, 2014 by David Farrell

development
variable
scalar
array
hash
reference

Learn enough to be dangerous with one of Perl’s most powerful features

Read it

How to read a string into an array of characters using split

Oct 3, 2013 by David Farrell

development
string
array
split

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:

Read it

Perl for loops

Apr 12, 2013 by David Farrell

development
loop
array
foreach
for

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.

Read it

List shortcuts: qw the quote whitespace operator

Apr 9, 2013 by David Farrell

development
operator
string
array
syntax

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:

Read it

Perl arrays 101 - create, loop and manipulate

Apr 4, 2013 by David Farrell

development
array
syntax
push
pop
shift
unshift
foreach

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.

Read it

Upgrade your list printing using field separator variables

Apr 3, 2013 by David Farrell

development
string
variable
scalar
array
syntax

A typical way to print every element of an array in Perl is using a foreach loop:

Read it

Find the index of the last element in an array

Mar 28, 2013 by David Farrell

development
array
dereference
syntax

Most Perl programmers know that to find the size of an array, the array must called in a scalar context like this:

Read it

Designing a Search Engine

Apr 10, 2001 by Pete Sergeant

data
array
perl
search

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…

Read it
Page 1 of 1
Site Map
  • Home

  • About

  • Authors

  • Categories

  • Tags

Contact Us

To get in touch, send an email to perl.com-editor@perl.org, or submit an issue to perladvent/perldotcom on GitHub.

Perl Camel rss GitHub logo

License

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Creative Commons License

Legal

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.