#!/usr/bin/env perl use strict; use warnings; my $c1 = <<'C1'; Pronunciation /ˈbɛtəldʒuːz, ˈbiːtəl-, -dʒuːs/[1][2] Right ascension 05h 55m 10.30536s[3] Declination +07° 24′ 25.4304″[3] Apparent magnitude (V) +0.50[4] (0.0–1.6[5]) Characteristics Evolutionary stage Red supergiant Spectral type M1–M2 Ia–ab[6] Apparent magnitude (J) −3.00[7] Apparent magnitude (K) −4.05[7] U−B color index +2.06[4] B−V color index +1.85[4] Variable type SRc[8] Absolute magnitude (MV) −5.85[12] C1 my $c2 = <<'C2'; fritz@laptop:~/Documents$ trans :ru betelgeuse -p betelgeuse бетельгейзе (betel'geyze) Translations of betelgeuse [ English -> Русский ] betelgeuse бетельгейзе, Бетел&# 1100;гейзе fritz@laptop:~/Documents$ C2 my %c2pre = ('[' => '[', ']' => ']'); for my $c ($c1, $c2) { $c =~ s/([\[\]])/$c2pre{$1}/eg; print "
\n$c
\n"; print '-' x 60, "\n"; }