summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/ptx/examples/ajay/x.pl
blob: e0615ba0f666320f8dde03166b9a00c662d36436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/local/bin/perl

while ($l = <>)
{
chop $l;

$l =~ s/\\xx //;
$l =~ s/}{/|/g;
$l =~ s/{//g;
$l =~ s/}//g;
@x = split(/\|/, $l);

printf ("\\xx ");
for ($i = 0; $i <= $#x; $i++)
    {
    $v = substr($x[$i], 0, 17);
    $v =~ s/\\$//;
    printf("{%s}", $v);
    }
printf ("\n");

}
OpenPOWER on IntegriCloud