考虑 org-babel 中的以下 perl 片段,它使用<STDIN>
.
** Ans 2
#+begin_src perl :results output
use Math::Trig;
$rad = <STDIN>;
$circumference = 2*pi*$rad;
print "Circumference of circle is $circumference";
#+end_src
是否可以将输入从另一个块传输到此块?
Say :
#+begin_src text :name test-input
12.5
#+end_src
你可以通过$rad
直接从 a 到 perl 脚本#+results
块:参见将参数传递给代码块 http://orgmode.org/org.html#var在手册中。
那会给
#+begin_src perl :results output :var rad=test-input
用作输入
#+results: test-input
: 12.5
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)