![]() |
|
good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Programmatically building named anchors to warp to sectionsby mr_mischief (Monsignor) |
on Aug 15, 2007 at 01:33 UTC ( #632641=note: print w/replies, xml ) | Need Help?? |
I just submitted this a couple of minutes ago:
Better yet is this:
This new one is better in two ways. It handles the case that you never hit exactly the letter your header contains. It also doesn't have an extra variable that's never used. I caught that without "use warnings;", but I added those to the second one after I caught it. See if you can figure out really quickly why there's an extra character in the @updates array the second time around. Update 2: fixed a tpyo (in the exposition, not in the code).
In Section
Seekers of Perl Wisdom
|
|