http://qs1969.pair.com?node_id=130716

hotshot has asked for the wisdom of the Perl Monks concerning the following question:

I have an array of names, some of the names begin with '@', for example:
@arr = (test1, @test2, @test3, test4, test5)
does anyone have a short way to return from this array two strings?: one is the names without the '@' (separated by commas), and the second is the names with the '@', but after we cut the '@' from them.
for the above example I would expect:
$str1 = 'test1,test4,test5'; $str2 = 'test2,test3';
Thanks

Hotshot