Hendrixon
01-28-2007, 01:16 PM
Hi,
I'm trying to do a mapped function in a script I have, but for some reason the function doesn't loop thru the array members.
For example lets say I send the mapped function this array - #{1..20}, now instead of running the code 20 times looping over every array member... I get an error. using a simple print inside the function, I tracked down the issue.
lets say I have "mapped fn Myfunction MyArray" with just a "print MyArray" inside as code. I call MyFunction and send it a variable that holds the above 1-20 array. now instead of getting a print output of:
1
2
3
4
..
20
I get this: #{1..20}
I wrote a few mapped functions before that worked fine, but have no idea why here it doesn't work.
Any Help will be appriciated:)
I'm trying to do a mapped function in a script I have, but for some reason the function doesn't loop thru the array members.
For example lets say I send the mapped function this array - #{1..20}, now instead of running the code 20 times looping over every array member... I get an error. using a simple print inside the function, I tracked down the issue.
lets say I have "mapped fn Myfunction MyArray" with just a "print MyArray" inside as code. I call MyFunction and send it a variable that holds the above 1-20 array. now instead of getting a print output of:
1
2
3
4
..
20
I get this: #{1..20}
I wrote a few mapped functions before that worked fine, but have no idea why here it doesn't work.
Any Help will be appriciated:)
