in reply to Transforming a scalar to an array

I realize that local( $/, *INPUT ); gets rid of the new lines.

It doesn't actually. You end up with a scalar that still has a newline at the end of each line of text. You can, of course, use that to your advantage.

my @lines = split /\n/, $input;

See the Copyright notice on my home node.

Perl training courses