Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
colonelguy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
colonelguy
11y ago
Perl uses separate operators for mathematical addition and string concatenation. 1 + 1 == 2; 1 . 1 eq 11; It uses separate operators for most mathematical and string operations, for that matter. There isn't much of a meaningf
2.
▲
by
colonelguy
11y ago
You'd want to use the exists operator in that case. It checks if the hash key is present without auto vivifying it. my %hash = (); if (exists $hash{foo}) {print "This doesn't run!";}