Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988718]
help
Chatterbox?
[Eily]: s/complete ness/complete mess/ :P
[Eily]: and you can overload "0+" rather than bool, as numification is used instead of stringification in boolean context when available

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2017-07-27 14:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (415 votes). Check out past polls.