/[webpac]/trunk/test_parse_format.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/test_parse_format.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 275 - (show annotations)
Sun Mar 14 12:06:51 2004 UTC (20 years ago) by dpavlin
File MIME type: text/plain
File size: 1301 byte(s)
ported 269:272 from hidra

1 #!/usr/bin/perl -w
2
3 use strict;
4 use OpenIsis;
5 use parse_format;
6 use Text::Iconv;
7 use Data::Dumper;
8
9 Text::Iconv->raise_error(1); # Conversion errors raise exceptions
10 my $codepage = Text::Iconv->new('852','iso-8859-2');
11
12 my $row = {
13 '981' => [ '^aSlu§bena dokumentacija RH' ],
14 '225' => [ '^aSjednice Sabora' ],
15 '712' => [ '^3011492^aHrvatski sabor' ],
16 '710' => [ '^3011801^aHrvatska narodna banka' ],
17 '210' => [ '^aZagreb^cHrvatski sabor^d2000' ],
18 '102' => [ '^aHR' ],
19 '607' => [ '^3025257^aHrvatska' ],
20 '606' => [ '^3000916^abankarski sustav', '^3001926^adevizne priŸuve' ],
21 '990' => [ '^aH10.0=Sabor.sjd-M:004317' ],
22 '200' => [ '^aIzvjeç†e o stanju financijskog i bankarskog sustava Republike Hrvatske u 1990. godini s osvrtom na devizne priŸuve NBJ, dug SFRJ i "staru" deviznu çtednju^f[Hrvatska narodna banka]' ],
23 '900' => [ '004317' ],
24 'mfn' => 1,
25 '101' => [ '^ahrv' ],
26 '300' => [ '^aIzvjeç†e podneseno na 8. sjednici ZastupniŸkog doma Hrvatskog dr§avnog sabora' ]
27 };
28
29 my $fmt = 'eval{"225a" eq "pero"}900 101a';
30 $fmt = 'eval{v102^a eq "HR" && v607^3 == "025257"}900 101a';
31
32 my ($d,$s) = parse_format('isis', $fmt ,$row, 0, $codepage);
33
34 print "d: $d s: $s\n";

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26