|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: how to save result in multiple files using for loop in perlby jethro (Monsignor) |
| on Aug 27, 2012 at 22:33 UTC ( #990077=note: print w/ replies, xml ) | Need Help?? |
|
Never ever use a variable named $o (dollar-ow) !!!! As you can see (or not see), you seem to be using $0 (dollar-zero) in your system call instead You probably will find a file named file<your scriptname>.txt in your directory, because the name of your script is usually stored in $0 (dollar-zero). There is another bug in your script: Since you initialize $num with @dude+1, your for loop will always try to access an undefined value after the end of your array. You might like to use the following instead, much less error-prone
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||