No? You didn't bother.... or couldn't read it?
Well, if the latter, that's because there is no such function, nor is there a (CPAN) module of that name to be "use"ed (which you didn't do, in any case).
As a wise one once said, 'You can't just make s*#t up and expect the computer to understand.'
And surely your attempt to run that code produced more than some (unspecified -- bad; direct, verbatim quotes -- good!) hints that it (sic) "dosen't like the $file and @file comments." ... perhaps something like this:
String found where operator expected at eraseme.pl line 6, near "open +FILE3, "" (Might be a runaway multi-line "" string starting on line 5) (Missing semicolon on previous line?) String found where operator expected at eraseme.pl line 24, near "open + (OUTFILE, "" (Might be a runaway multi-line "" string starting on line 6) (Missing semicolon on previous line?) String found where operator expected at eraseme.pl line 24, near "txt" +) or die(Output file error"" syntax error at eraseme.pl line 6, near "open FILE3, "" Global symbol "@file1" requires explicit package name at eraseme.pl li +ne 26. Global symbol "@file2" requires explicit package name at eraseme.pl li +ne 26. Global symbol "@file3" requires explicit package name at eraseme.pl li +ne 26. eraseme.pl had compilation errors.
And you'll notice the test gave up before it even got to the nonsense on line 26 and without mentioning a problem with the non-existent "spilt.
So here are a few more pointers toward code "correctness":
Some will view these comments as "harsh." Perhaps, but programming is a harsh art requiring the discipline to learn your tools... and the willingness to learn how to learn. Unlike the proverbial 'horseshoes and handgrenades, "close" is NOT good enough."
If you can avoid reading a nonexistant intent to offend into this post, you'll discover motifs and methods that will ease your progress toward mastery.
In reply to Re^3: averages from multiple files
by ww
in thread averages from multiple files
by Taylorswift13
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |