http://www.perlmonks.org?node_id=988718


in reply to Calling a perl script(that returns an array) within another perl script.

It works fine for me! Since you didn't provide the code for your perlmonks_are_great.pl script, here is mine:

# Simple array my @array = qw(test1 test2 test3 test4 test5); # Printing one-liner print join ("\n", @array), "\n";

Note: if you just print @array; you end up with only one string when you "read" your script: test1test2test3test4test5. You must have a new line after each element of your array. Also, the new line character (\n) will be saved too so you need to chomp it if you don't need it.

Take my advice. I don't use it anyway.