Scalar:...keNumber(3)

πŸ“¦
version 1.39.2 Β· 2 versions
, in fedora 43

πŸ’– Scalar::Util::LooksLikeNumber β€” the manual page, bestie edition πŸ’–

okay so this is the manual page for Scalar::Util::LooksLikeNumber, part of the User Contributed Perl Documentation. She's a little module with main character energy and exactly one job, and honestly? She ate. ✨


🌸 NAME 🌸

Scalar::Util::LooksLikeNumber β€” bestie, it's your hookup to the looks_like_number() perl API function. That's the whole vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Scalar::Util::LooksLikeNumber;
print Scalar::Util::LooksLikeNumber::looks_like_number(1); # -> 4352

like... look at her. one use, one print, and she's already telling you that 1 looks like a number. iconic behavior, no cap. πŸ”₯


✨ DESCRIPTION ✨

So Scalar::Util::LooksLikeNumber ships a looks_like_number() that works like the looks_like_number() from Scalar::Util, with one (1) tiny little difference that is actually the entire point: this one hands you back the raw value straight from the C function. 🫢

And here's the tea β˜• β€” Scalar::Util used to do exactly that too, but ever since version 1.39 it's been returning a booleanized value instead. So if you're out here missing the old raw-number flavor, this module is her. periodt. πŸ’œ


πŸŽ€ FUNCTIONS πŸŽ€

$res = looks_like_number( $var )

Returns a non-zero value if perl thinks $var is a number. 🧚

fr fr, if you wanna know the deep lore on what "perl thinks is a number" even means, go read looks_like_number in perlapi. iykyk. πŸ“–

🌈 SEE ALSO 🌈

  • Scalar::Util β€” the origin story, the blueprint, the mother. πŸ₯Ή

Copyright (c) 2014 Steven Haryanto <stevenharyanto@gmail.com>.

Code is based on Scalar::Util. πŸ’–


and that's the whole page, bestie!! this was perl v5.42.0, dated 2025-07-25, and she slayed every single day of it. πŸ’…βœ¨ go forth and check if things look like numbers. mwah. πŸŽ€πŸ’œ

πŸ“¦ where this page comes from