File: example.pl

package info (click to toggle)
libdata-javascript-perl 1.13-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 112 kB
  • sloc: perl: 133; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 463 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use Data::JavaScript;

$hash = {'string' => 'Joseph',
         'array' => [qw(0 1 2 3 4 5 6 7 8 9 a b c d e f)],
         'capitals' => {'Sverige' => 'Stockholm',
                        'Norge' => 'Oslo',
                        'Danmark' => 'Koebenhavn'},
         'and' => [[0, 0], [0, 1]],
         'or' => [[0, 1], [1, 1]],
         'xor' => [[0, 1], [1, 0]]};
$hash->{'ref'} = $hash;

print scalar(jsdump("facts", $hash, 31.4e-1));