So why can't I have the same thing from my database? Every database I've seen has been an SQL relational database. You have to take a long time specifying column types and what not.
One almost-too-obvious answer would be "because the database has to read from and write to a disk sooner or later". Your Perl variables are being managed in RAM, and Perl will do whatever it can for you until it runs out of RAM altogether.
The DB on the other hand, is reading and writing on a HD somewhere, and its function is to manage that reading and writing for you, so you don't have to worry about it. The more a DB "knows" about the kind and size of the information it's dealing with, the more efficient it can be.
($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
=~y~b-v~a-z~s; print