fork download
  1. #!/usr/bin/perl6
  2. # your code goes here
  3.  
  4. use trace;
  5.  
  6. my %field-table = %{
  7. '标题' => 'title',
  8. 'title' => 'title',
  9. '责任者' => 'creatorSearch',
  10. 'creatorsearch' => 'creatorSearch',
  11. '出版者' => 'publisher',
  12. 'publisher' => 'publisher',
  13. '标准编码' => 'isbnSearch',
  14. 'isbnsearch' => 'isbnSearch',
  15. '索书号' => 'call_number',
  16. 'call_number' => 'call_number',
  17. 'callnumbersearch' => 'call_number',
  18. '主题词' => 'subject',
  19. 'subject' => 'subject',
  20. '全部字段' => 'all',
  21. 'all' => 'all',
  22. }
  23.  
  24. say %field-table;
Runtime error #stdin #stdout #stderr 0.18s 71532KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
2 (/home/rJF4Qm/prog.pl line 6)
my %field-table = %{
            '标题'               => 'title',
            'title'              => 'title',
            '责任者'              => 'creatorSearch',
            'creatorsearch'      => 'creatorSearch',
            '出版者'              => 'publisher',
            'publisher'          => 'publisher',
            '标准编码'            => 'isbnSearch',
            'isbnsearch'         => 'isbnSearch',
            '索书号'              => 'call_number',
            'call_number'        => 'call_number',
            'callnumbersearch'   => 'call_number',
            '主题词'              => 'subject',
            'subject'            => 'subject',
            '全部字段'             => 'all',
            'all'                => 'all',
        }
Odd number of elements found where hash initializer expected:
Only saw: -> ;; $_? is raw { #`(Block|56133584) ... }
  in block <unit> at prog.pl line 6