---
title: "There are many times when you want it to ignore the rest of the strin… — Larry Wall Quote #42 | QuotesBy.net"
description: "There are many times when you want it to ignore the rest of the string just like atof() does. Oddly enough, Perl calls atof(). How convenient. :-) — a quote by Larry Wall."
image: "https://quotesby.net/wp-content/themes/quotesby-editorial/assets/og-default.png"
---

> # There are many times when you want it to ignore the rest of the string just like atof() does. Oddly enough, Perl calls atof(). How convenient. :-)

[Larry Wall](https://quotesby.net/Larry-Wall)\#42

[Programming](https://quotesby.net/Larry-Wall/programming/)[Perl](https://quotesby.net/Larry-Wall/perl/)[Compatibility](https://quotesby.net/Larry-Wall/compatibility/)

[WhatsApp (opens in a new tab)](https://wa.me/?text=%E2%80%9CThere%20are%20many%20times%20when%20you%20want%20it%20to%20ignore%20the%20rest%20of%20the%20string%20just%20like%20atof%28%29%20does.%20Oddly%20enough%2C%20Perl%20calls%20atof%28%29.%20How%20convenient.%20%3A-%29%E2%80%9D%20%E2%80%94%20Larry%20Wall%20https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F42%2F)[X (opens in a new tab)](https://twitter.com/intent/tweet?text=%E2%80%9CThere%20are%20many%20times%20when%20you%20want%20it%20to%20ignore%20the%20rest%20of%20the%20string%20just%20like%20atof%28%29%20does.%20Oddly%20enough%2C%20Perl%20calls%20atof%28%29.%20How%20convenient.%20%3A-%29%E2%80%9D%20%E2%80%94%20Larry%20Wall&url=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F42%2F)[Facebook (opens in a new tab)](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fquotesby.net%2FLarry-Wall%2F42%2F)

## About this quote

What does it mean?Perl provides a function that behaves like C's atof(), making conversion convenient.In plain termsPerl 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](https://quotesby.net/Larry-Wall/41/ "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](https://quotesby.net/Larry-Wall/43/ "Permalink to quote 43")
3. > Perl itself is usually pretty good about telling you what you shouldn't do. :-)

[Permalink to quote \#40](https://quotesby.net/Larry-Wall/40/ "Permalink to quote 40")

## Related quotes

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

[Larry Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#35](https://quotesby.net/Larry-Wall/35/ "Permalink to 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 Wall](https://quotesby.net/Larry-Wall)[Larry Wall quote \#1](https://quotesby.net/Larry-Wall/1/ "Permalink to quote 1")

```json
{
    "@context": "https://schema.org",
    "@type": "Quotation",
    "text": "There are many times when you want it to ignore the rest of the string just like atof() does. Oddly enough, Perl calls atof(). How convenient. :-)",
    "url": "https://quotesby.net/Larry-Wall/42/",
    "spokenByCharacter": {
        "@type": "Person",
        "name": "Larry Wall"
    }
}
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "name": "Home",
            "item": "https://quotesby.net/"
        },
        {
            "@type": "ListItem",
            "position": 2,
            "name": "Authors",
            "item": "https://quotesby.net/authors/"
        },
        {
            "@type": "ListItem",
            "position": 3,
            "name": "Larry Wall",
            "item": "https://quotesby.net/Larry-Wall"
        },
        {
            "@type": "ListItem",
            "position": 4,
            "name": "Quote #42",
            "item": "https://quotesby.net/Larry-Wall/42/"
        }
    ]
}
```
