---
name: "SHARYANTO::Scalar::Util"
section: "3pm"
platform: "linux"
package: "libsharyanto-utils-perl"
version: "0.67-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/SHARYANTO::Scalar::Util"
---

# SHARYANTO::Scalar::Util(3pm)

Scalar utilities

## NAME

SHARYANTO::Scalar::Util - Scalar utilities

## VERSION

version 0.67

## SYNOPSIS

```
 use SHARYANTO::Scalar::Util qw(
     looks_like_int
     looks_like_float
     looks_like_real
 );
 say looks_like_int(10);              # 1, isint() also returns 1
 say looks_like_int("1".("0" x 100)); # 1, isint() returns 0 here
 say looks_like_int("123a");          # 0
 say looks_like_float(1.1);           # 1
 say looks_like_float("1e2");         # 1
 say looks_like_float("-Inf");        # 1
 say looks_like_float("");            # 0
 # either looks like int, or float
 say looks_like_real(1);              # 1
 say looks_like_real(1.1);            # 1
```

## FUNCTIONS

### looks\_like\_int($arg) =\> BOOL

Uses Scalar::Util's `"looks_like_number()"` to check whether `$arg` looks like an integer.

### looks\_like\_float($arg) =\> BOOL

Uses Scalar::Util's `"looks_like_number()"` to check whether `$arg` looks like a floating point number.

### looks\_like\_real($arg) =\> BOOL

Uses Scalar::Util's `"looks_like_number()"` to check whether `$arg` looks like a real number (either an integer or a floating point).

## SEE ALSO

SHARYANTO

Scalar::Util

Scalar::Util::Numeric

## HOMEPAGE

Please visit the project's homepage at \<https://metacpan.org/release/SHARYANTO-Utils\>.

## SOURCE

Source repository is at \<https://github.com/sharyanto/perl-SHARYANTO-Utils\>.

## BUGS

Please report any bugs or feature requests on the bugtracker website \<https://rt.cpan.org/Public/Dist/Display.html?Name=SHARYANTO-Utils\>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

## AUTHOR

Steven Haryanto \<stevenharyanto@gmail.com\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
