免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1145 | 回复: 2
打印 上一主题 下一主题

[函数] 【erlang Perl 交互 Erlang:Port】 [复制链接]

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-11-21 22:22 |只看该作者 |倒序浏览
  1. NAME
  2.     Erlang::Port - Erlang External Port

  3. VERSION
  4.     Version 0.04

  5. SYNOPSIS
  6.      use Erlang::Port;

  7.      my $port = Erlang::Port->new(sub{ ... });
  8.      $port->loop();

  9. EXPORT
  10.     No functions are exported by this module.

  11. METHODS
  12.   $pkg->new(\&CALLBACK);
  13.   $port->loop();
  14.     Wait request and Process it.

  15.   $pkg->encode($obj);
  16.     Encode Erlang obj into external sequence.

  17.   $pkg->decode($bytes);
  18.     Decode external sequence into Erlang object.

  19.   $pkg->to_s($obj);
  20.     Make string form of $obj.

  21. EXAMPLES
  22.     See examples/ directory in this distribution.

  23.     examples/perlre.erl has match(String, RegExp) and gsub(String, RegExp,
  24.     Replacement).

  25.     examples/perleval.erl has eval(String) and set(VarName, AnyObject).

  26. AUTHOR
  27.     YAMASHINA Hio, "<hio at cpan.org>"

  28. BUGS
  29.     Please report any bugs or feature requests to "bug-erlang-port at
  30.     rt.cpan.org", or through the web interface at
  31.     <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Erlang-Port>. I will be
  32.     notified, and then you'll automatically be notified of progress on your
  33.     bug as I make changes.

  34. SUPPORT
  35.     You can find documentation for this module with the perldoc command.

  36.         perldoc Erlang::Port

  37.     You can also look for information at:

  38.     *   AnnoCPAN: Annotated CPAN documentation

  39.         <http://annocpan.org/dist/Erlang-Port>

  40.     *   CPAN Ratings

  41.         <http://cpanratings.perl.org/d/Erlang-Port>

  42.     *   RT: CPAN's request tracker

  43.         <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Erlang-Port>

  44.     *   Search CPAN

  45.         <http://search.cpan.org/dist/Erlang-Port>

  46. ACKNOWLEDGEMENTS
  47. COPYRIGHT & LICENSE
  48.     Copyright 2007 YAMASHINA Hio, all rights reserved.

  49.     This program is free software; you can redistribute it and/or modify it
  50.     under the same terms as Perl itself.
复制代码

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
2 [报告]
发表于 2015-11-21 22:23 |只看该作者
example.zip (6.7 KB, 下载次数: 4)

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
3 [报告]
发表于 2015-11-21 22:28 |只看该作者
  1. Eshell V7.1  (abort with ^G)
  2. 1> perlre:start().
  3. #Port<0.1133>
  4. 2> perlre:
  5. match/2        module_info/0  module_info/1  start/0        start/1        
  6. stop/0         
  7. 2> perlre:match("aaaaabb77","\d+").
  8. []
  9. 3> perlre:match("aaaaabb77","\\d+").
  10. [1]
  11. 4> perlre:match("aaaaabb77","\\w+").
  12. [1]
  13. 5> perlre:match("aaaaabb77","\\S+").
  14. [1]
  15. 6> perlre:match("aaaaabb77","(\\S+)").
  16. ["aaaaabb77"]
  17. 7> perlre:match("aaaaabb77","(\\w+)(\\d+)").
  18. ["aaaaabb7",7]
  19. 8>
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP