in reply to IO::String Defining FH for writing, but not reading.

Where you try to read the $io handle, you are positioned at the end of the 'file'. Just before you start reading, say,

seek $io, 0, 0; while (<$io>) {
That will fix it.

After Compline,
Zaxo