# Tested with TinyPerl 5.8 on Windows XP and Perl 5.004 on DOS. #### my $REF = ReadBMP('D:\\DESKTOP\\mandel3.bmp', 3); ReduceColorDistribution($REF); my $HTML = Canvas2HTML($REF); CreateFile('D:\\DESKTOP\\TESTING.HTM', $HTML); exit; #### use strict; my $foo = 42; print "$foo\n"; # 42. No surprises here bar(); print "$foo\n"; # 17! How did that happen? # ...hundreds of lines of code... sub bar { ... $foo = 17; # Oops! Forgot "my" ... } #### MAIN: # Label (not needed, just for documentation) { my $REF = ReadBMP('D:\\DESKTOP\\mandel3.bmp', 3); ReduceColorDistribution($REF); my $HTML = Canvas2HTML($REF); CreateFile('D:\\DESKTOP\\TESTING.HTM', $HTML); exit; # Not really needed either } #### if ($ERR > 5) { undef $HEADER; return 0; } #### sub ReadBMP { ... } #### while ($H--) {