Skip to main content
Module

x/denops_std/function/mod.ts>perleval

📚 Standard module for denops.vim
Go to Latest
function perleval
import { perleval } from "https://deno.land/x/denops_std@v6.3.0/function/mod.ts";

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
expr: unknown

Returns

Promise<unknown>