home *** CD-ROM | disk | FTP | other *** search
- &RANGEVAL(20, 30, '$foo[$i] = $i');
-
- sub RANGEVAL {
- local($min, $max, $thunk) = @_;
- local($result) = '';
- local($i);
-
- # Presumably $thunk makes reference to $i
-
- for ($i = $min; $i < $max; $i++) {
- $result .= eval $thunk;
- }
-
- $result;
- }
-
- if ($sw eq '-v') {
- # init local array with global array
- local(@ARGV) = @ARGV;
- unshift(@ARGV, 'echo');
- system @ARGV;
- }
- # @ARGV restored
-
- # temporarily add a couple entries to %digits associative array
- if ($base12) {
- # (NOTE: not claiming this is efficient!)
- local(%digits) = (%digits, 't', 10, 'e', 11);
- &parse_num();
- }
-