import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { perleval } = fn;
Evaluate Perl expression {expr} in scalar context and return its result converted to Vim data structures. If value can't be converted, it is returned as a string Perl representation. Note: If you want an array or hash, {expr} must return a reference to it. Example:
:echo perleval('[1 .. 4]')
[1, 2, 3, 4]
Note that in a :def
function local variables are not visible
to {expr}.
Can also be used as a method
:
GetExpr()->perleval()
only available when compiled with the +perl
feature
Parameters
denops: Denops