in reply to Re: Using keys from hashes
in thread Using keys from hashes
I have something like this... to convert POD to HTML and I was thinking how to write this in a better way ...my $Bpod = 'B<(.*?)>'; my $B = '<b>'; my $b = '</b>'; my $Ipod = 'I<(.*?)>'; my $I = '<i>'; my $i = '</i>'; my $Upod = 'U<(.*?)>'; my $U = '<u>'; my $u = '</u>'; open(DATA, "<file.pod"); my @file = <DATA>; s/$Bpod/$B$1$b/gi for @file; s/$Ipod/$I$1$i/gi for @file; s/$Upod/$U$1$u/gi for @file;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Using keys from hashes
by Anonymous Monk on Jul 18, 2013 at 09:53 UTC |