<p>Can someone explain what exactly the string "0 but true" means in Perl? As far as I understand, it equals zero in an integer comparison, but evaluates to true when used as a boolean. Is this correct? Is this a normal behavior of the language or is this a special string treated as a special case in the interpreter?</p>

In an integer context, it evaluates to 0 (the numeric part at the beginning of the string) and is zero.  In a scalar context, it's a non-empty value, so it is true.
```
if (int("0 but true")) { print "zero"; }
```
(no output)
```
if ("0 but true") { print "true"; }
```
(prints true)