펄 유효성 검사 정수

코드 예제

1
0

펄 유효성 검사 정수

# For Perl (language) only

# Headers to use
use Scalar::Util 'looks_like_number';

# syntax 
looks_like_number(<your-possible-integer>)

# example (copy-paste, and then run the following to see what happens)
use Scalar::Util 'looks_like_number';
my $iNum = "123";
if ( looks_like_number($iNum) ) {
	print "$iNum is a valid integer!" . "\n";
}
else {
	print "$iNum is NOT a valid integer!" . "\n";
}

비슷한 페이지

예제가있는 유사한 페이지

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................