How can I store entire contents of an array to a scalar variable. eg:
my $code = do { local $/; <FILE HANDLE>; };
This works fine for file handles but I need this for an array.
Use join.
join
my $str = join '', @array;
1.4m articles
1.4m replys
5 comments
57.0k users