in reply to Help With Perl and Files

It is not clear to me what you are trying to achieve, but one way to create a colon-separated string from all elements of an array is to use join.
#!/usr/bin/env perl use warnings; use strict; my @list = (5..10); print "list = @list\n"; foo(@list); exit; sub foo { my $media_list = join ':', @_; print "media_list = $media_list\n"; }
Produces the following output:
list = 5 6 7 8 9 10 media_list = 5:6:7:8:9:10
Additionally, the code you provided does not compile, and has other issues which can be resolved using the strictures (use strict; and use warnings;).