Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Calling a perl script(that returns an array) within another perl script.

by greengaroo (Hermit)
on Aug 21, 2012 at 12:56 UTC ( #988718=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Calling a perl script(that returns an array) within another perl script.
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988718]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-08-30 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls