When does the difference between a string and a number matter in Perl 5?
Posted
by Chas. Owens
on Stack Overflow
See other posts from Stack Overflow
or by Chas. Owens
Published on 2010-06-05T13:37:00Z
Indexed on
2010/06/05
13:42 UTC
Read the original article
Hit count: 233
If a string in Perl 5 passes looks_like_number
, it might as well be a number. For instance,
my $s = "10" + 5;
results in $s
being assigned 15
.
Are there any cases where a string does not behave like it's numeric equivalent would have?
© Stack Overflow or respective owner