I'm 99% sure the original poster has long since figured this out, and is probably no longer working through this book, but heres a reply for my own benefit, as well as anyone else who may have the same questions now or in the future.
Notice the first print line is placing the print line directly within the parentheses, as shown here:
which is interpreting 11010 in binary.
while the second example is quoting the entire binary string within the quotes:
which interprets 011010 in binary.
Essentially, quoting the string equates to the following code:
basically, quoting the string is adding an extra 0 to the binary sequence, which is where the output of 26 comes from. I'm not sure why perl does this, as i just started the book a few days ago, but at least it solves the question of why you're receiving different results.