in reply to top and STDERR hell...
I don't know the answer to your question, but I noticed a bad practice. When including Perl source code that's not in a package, you should use do "filename.pl", not require "filename.pl", because it will fail in this scenerario:
package AAA; require "111.pl"; longestLineLength(@a); # Works. package BBB; require "111.pl"; # Does nothing. Already required. longestLineLength(@a); # ERROR. -vs- package AAA; do "111.pl"; # Creates &AAA::longestLineLength longestLineLength(@a); # Works. package BBB; do "111.pl"; # Creates &BBB::longestLineLength longestLineLength(@a); # Works.
Of course, it wouldn't hurt to put the extra line to make it into a module that you could require/use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: top and STDERR hell...
by Anonymous Monk on Jun 08, 2005 at 01:38 UTC | |
by DouglasDD (Beadle) on Jun 08, 2005 at 01:39 UTC |