in reply to Transforming a scalar to an array
#!/usr/bin/perl use strict; use warnings; chomp( my @input = <> ); [download]
Update: Oh, it seems you aren't reading from a file handle as you showed.
chomp( my @input = split(/^/m, $input) ); [download]