Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: How many bugs can *you* findby satchboost (Scribe) |
on May 01, 2001 at 01:35 UTC ( [id://76767]=note: print w/replies, xml ) | Need Help?? |
Let's see... 1) Using global variables like $htmlDir. 2) Hardcoding the filename tile.htm (This both reduces the capability of the function as well as allowing someone to figure out what file needs messing with.) 3) The foreach loop should be foreach my $section (@sections) to avoid clobbering $section in the surrounding scope. 4) Just to be nitpicky, but it should be elsif ($section eq 'Link') 5) $contentTemp =~ s/[\n\r]/<p>/g; will give different behavior whether on Win32 or Unix. This would be better as s/\n\r?/<p>/g; instead. In addition, doesn't Mac have a different carriage return sequence, too?
In Section
Meditations
|
|