Skip to content
quotesby

About this quote

What does it mean?
Perl provides a function that behaves like C's atof(), making conversion convenient.
In plain terms
Perl calls atof() just like C, which is handy.
What can you take from it?
Use Perl's built-in conversion for numeric strings.

Where it applies

  • parsing user input
  • data cleaning

Putting it to work

  • call atof() in Perl
  • rely on built-in conversion

Questions to consider

  • When should I prefer Perl's conversion over manual parsing?
  • Are there locale issues?

Another view

Behavior may differ for edge cases.

More from Larry Wall

  1. Sorry. My testing organization is either too small, or too large, depending on how you look at it. :-)

    Permalink to quote #41
  2. We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise.

    Permalink to quote #43
  3. Perl itself is usually pretty good about telling you what you shouldn't do. :-)

    Permalink to quote #40

Related quotes

  1. It's there as a sop to former Ada programmers. :-)

    Larry WallLarry Wall quote #35
  2. Although the Perl Slogan is There's More Than One Way to Do It, I hesitate to make 10 ways to do something. :-)

    Larry WallLarry Wall quote #1