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: 204

Filed under:
|
|

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

Related posts about perl

Related posts about string