ChinaUnix.net
相关文章推荐:

perl chop

RT ! 帮忙说的详细点~! 多谢多谢! 我自己测试了一下,很糊涂: chomp 得到的是记录数,比如:[code][root@localhost perl]# cat chomp #!/usr/bin/perl $test_line=; $result_chomp=chomp($test_line); $result_chop=chop($test_line); print $result_chomp,"\n========================\n"; print $result_chop,"\n"; [root@localhost perl]# perl chomp asldkja sdqjjdlkasjd qjljsldk jasd //结尾没有空格,直接...

by 南极雨 - Perl - 2011-06-05 17:24:27 阅读(2903) 回复(3)

相关讨论

怎么能看chop函数执行效果????? -------------------------------------------------------------------------------------------------------------------- 函数名 chop 调用语法 $lastchar = chop (var); 解说 var可为变量或数组,当var为变量时,最后一个字符被删除并赋给$lastchar,当var为数组/列表时,所有元素的最后一个字符被删除,最后一个元素的最后一个字母赋给$lastchar。 ---------------------------------------...

by hunter_cao - Perl - 2006-12-25 22:19:39 阅读(3348) 回复(7)

Hi, I just want to append newline character to each element of an array. Is there an existing function to use?

by nhw_cs - Perl - 2011-07-27 05:45:13 阅读(4468) 回复(16)

chomp是去末尾换行符的,chop为什么总是去最后一个字符,这样做有什么意义么

by yangfengwait - Perl - 2008-09-04 10:57:01 阅读(1939) 回复(4)

Itrim()与chop()函数有什么区别?

by baorongabc - PHP - 2011-08-04 09:44:52 阅读(3088) 回复(3)

http://perldoc.perl.org/ 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/44757/showart_429414.html

by cnhawk386 - Linux文档专区 - 2007-11-23 17:00:13 阅读(581) 回复(0)

http://fanqiang.chinaunix.net/program/perl/2001-04-16/1819.shtml http://fanqiang.chinaunix.net/system/hp-ux/2006-05-18/4181.shtml http://www.unix.org.ua/orelly/perl/sysadmin/ http://www.google.com/books?id=umJJXsFGO14C&printsec=frontcover&dq=perl+for+System+Administration&sig=5DFt_dCQl12B4AyIKbqpTCrtJ9g 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u...

by cnhawk386 - Linux文档专区 - 2007-11-22 15:47:12 阅读(744) 回复(0)

perl perl A powerful text-processing language that combines many of the most useful features of shell programs, C, awk, and sed, as well as adding extended features of its own. For more information, see Learning perl and Programming perl (both from O'Reilly). 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22178/showart_147058.html

by anima - Linux文档专区 - 2006-07-28 18:13:18 阅读(686) 回复(0)

perl 尝试一些聪明( 或 stupid) 的想法时, 错误难免会发生. 有经验的 perl 程序员常常使用三个参数来提前找到错误所在, perl 有很多命令行参数. 通过它, 我们有机会写出更简单的程序. 在这篇文章里我们来了解一些常用的参数. Safety Net Options 在使用 perl 尝试一些聪明( 或 stupid) 的想法时, 错误难免会发生. 有经验的 perl 程序员常常使用三个参数来提前找到错误所在, -C 是第一个. 这个参数编译 perl 程序但不会真正运行...

by zming_5000 - Linux文档专区 - 2005-02-25 11:26:37 阅读(1047) 回复(0)

小弟现在刚刚开始学习perl,在看《perl语言入门学习》第10章做练习题时,题目如下附件。 这是我写的程序: #!D:\perl64\bin\perl.exe -w $secret = int(1 + rand 100); print "请输入1到100的数字:\n"; while((chomp($input = )) ne $secret) { print "Too hight!\n" if $input>$secret; print "Too low!\n" if $input<$secret; last if ($input =~ /(quit|exit|^\s+$)/); } print "The secret number is: $secret"; <...

by xinxinghe - Perl - 2014-07-16 17:04:35 阅读(2619) 回复(9)