Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[basics] add a note that splitting on a single space is not very robu…
…st. codyFendant++
  • Loading branch information
moritz committed Aug 18, 2010
1 parent a2ad884 commit a739ba4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/basics.pod
Expand Up @@ -151,6 +151,16 @@ strings C<'Beth', 'Ana', 'Charlie', 'Dave'>. Finally, this list gets
stored in the array C<@names>. The C<@> sigil marks the declared variable as
an C<Array>. Arrays store ordered lists.

=begin sidebar

Splitting on a single blank is not very robust, and breaks the code when
there are trailing spaces in a line, or more than one blank in a row. You will

This comment has been minimized.

Copy link
@wolverian

wolverian Aug 18, 2010

Should be "on a line"?

This comment has been minimized.

Copy link
@masak

masak Aug 19, 2010

Not sure the trailing spaces are either "in a line" or "on a line". They're by one end of it. "spaces at the end of a line" would work.

learn a more robust method for data extraction in the chapter about regexes.

TODO: proper cross-link

=end sidebar

=begin programlisting

my %matches;
Expand Down

0 comments on commit a739ba4

Please sign in to comment.