Accessing Perl Array in JavaScript

后端 未结 1 438
不思量自难忘°
不思量自难忘° 2021-01-26 06:22

I have an array of unknown size in perl generated by some other perl module. Now, precisely I want to find if a value passed to a jquery function exists in the perl array or not

1条回答
  •  走了就别回头了
    2021-01-26 07:01

    To check for existence, you'd want a hash. A simple way of transmitting the data would be to encode it using JSON.

    % use JSON qw( );
    
    
    

    For example, if get_values() returned apple and orange, you'd get

    
    

    I don't know Mason, so there could be errors, but you get the idea.

    0 讨论(0)
提交回复
热议问题