Re: Replace alphabetical letters with phrases?
[email protected] (Jonathan Gorman)
| Newsgroups | perl.perl4lib |
|---|---|
| Message-ID | <[email protected]> |
Quick and dirty answer. For the short term (I'm assuming you're talking
about $alpha):
$temp = $alpha
if($temp =~ /C/) {$temp =~ s/C/Congress/}
elsif ($temp =~ /H/) {$temp =~ s/H/House/}
elsif {$temp =! /S/} {$temp =~ s/S/Senate/}
> print OUT "<A NAME=\"$alpha\">\n<FONT
> COLOR=\"#000066\"><H2>- $temp -</H2>
> </FONT>\n</A>\n";
You'll probably want to replace this with a pattern or something better if
it gets more complicated. (Ie a hash with the mapping).
Jonathan T. Gorman
Research Information Specialist
University of Illinois at Champaign-Urbana
216 Main Library - MC522
1408 West Gregory Drive
Urbana, IL 61801
Phone: (217) 244-4688