手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
人工智能
栏目导航
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
子栏目导航
PHP
Java
Java SE
Python
NumPy
C#
C&C++
Ruby
VB
asp.Net
Go
Perl
netty
gRPC
Django
Delphi
Jsp
.NET Core
Spring
Flask
Springboot
SpringMVC
Spring Cloud
Lua
fastadmin
Laravel
Mybatis
Asp
Groovy
ThinkPHP
Yii
swoole
编程之家
Perl
Learning Perl: 7.2. Using Simple Patterns
7.2. Using Simple Patterns To match a pattern (regular expression) against the contents of $_, put the pattern between a pair of forward slashes (/) as we do here: $_ = "yabba dabba doo"; i
作者:编程之家 时间:2020-08-13
Perl Learning: 8.2. Option Modifiers
8.2. Option Modifiers Several option modifier letters, sometimes called flags, may be appended as a group right after the ending delimiter of a regular expression to change its behavior from the def
作者:编程之家 时间:2020-08-13
Learning Perl: 8.1. Matches with m//
8.1. Matches with m// We've been writing patterns in pairs of forward slashes, like /fred/. This is a shortcut for the m// (pattern match) operator. As you saw with the qw// operator, you may choose
作者:编程之家 时间:2020-08-13
Learning Perl: 8.4. The Binding Operator, =~
8.4. The Binding Operator, =~ Matching against $_ is merely the default; the binding operator (=~) tells Perl to match the pattern on the right against the string on the left, instead of matching ag
作者:编程之家 时间:2020-08-13
Perl Learning: 8.3. Anchors
8.3. Anchors By default, if a pattern doesn't match at the start of the string, it can "float" on down the string trying to match somewhere else. But a number of anchors may be used to hold the patt
作者:编程之家 时间:2020-08-13
Learning Perl: 8.6. The Match Variables
8.6. The Match Variables So far, when we've put parentheses into patterns, they've been used only for their ability to group parts of a pattern together. But parentheses also trigger the regular exp
作者:编程之家 时间:2020-08-13
Learning Perl: 8.5. Interpolating into Patterns
8.5. Interpolating into Patterns The regular expression is double-quote interpolated as if it were a double-quoted string. This allows us to write a quick grep-like program like this: #!/usr/bin
作者:编程之家 时间:2020-08-13
Learning Perl: 8.8. Precedence
8.8. Precedence With all of these metacharacters in regular expressions, you may feel you can't keep track of the players without a scorecard. That's the precedence chart, which shows us which parts
作者:编程之家 时间:2020-08-13
Learning Perl: 8.7. General Quantifiers
8.7. General Quantifiers A quantifier in a pattern means to repeat the preceding item a certain number of times. You've seen three quantifiers: *, +, and ?. But if none of those three suits your nee
作者:编程之家 时间:2020-08-13
Learning Perl: 9.1. Substitutions with s///
9.1. Substitutions with s/// If you think of the m// pattern match as being like your word processor's "search" feature, the "search and replace" feature would be Perl's s/// substitution operator.
作者:编程之家 时间:2020-08-13
Learning Perl: 8.9. A Pattern Test Program
8.9. A Pattern Test Program When in the course of Perl events it becomes necessary for a programmer to write a regular expression, it may be difficult to tell what the pattern will do. It's normal t
作者:编程之家 时间:2020-08-13
Learning Perl: 9.4. m// in List Context
9.4. m// in List Context When you use split, the pattern specifies the separator: the part that isn't the useful data. Sometimes it's easier to specify what you want to keep. When a pattern match (m
作者:编程之家 时间:2020-08-13
Learning Perl: 9.3. The join Function
9.3. The join Function The join function doesn't use patterns but performs the opposite function of split: split breaks up a string into a number of pieces, and join glues together a bunch of pieces
作者:编程之家 时间:2020-08-13
Learning Perl: 9.2. The split Operator
9.2. The split Operator Another operator that uses regular expressions is split, which breaks up a string according to a pattern. This is useful for tab-separated, colon-separated, whitespace-separa
作者:编程之家 时间:2020-08-13
Learning Perl: 10.1. The unless Control Structure
10.1. The unless Control Structure In an if control structure, the block of code is executed only when the conditional expression is true. If you want to execute a block of code only when the condit
作者:编程之家 时间:2020-08-13
Learning Perl: 9.5. More Powerful Regular Expressions
9.5. More Powerful Regular Expressions After reading (almost) three chapters about regular expressions, you know they're a powerful feature in the core of Perl. The Perl developers have added more f
作者:编程之家 时间:2020-08-13
Learning Perl: 10.2. The until Control Structure
10.2. The until Control Structure Sometimes, you'll want to reverse the condition of a while loop. To do that, use until: until ($j > $i) { $j *= 2; } This loop runs until the cond
作者:编程之家 时间:2020-08-13
Learning Perl: 10.4. The Naked Block Control Structure
10.4. The Naked Block Control Structure The so-called "naked" block is one without a keyword or condition. That is, suppose you start with a while loop, which looks something like this: while (c
作者:编程之家 时间:2020-08-13
Learning Perl: 10.3. Expression Modifiers
10.3. Expression Modifiers For a more compact notation, an expression may be followed by a modifier that controls it. For example, the if modifier works in a way analogous to an if block: print
作者:编程之家 时间:2020-08-13
Learning Perl: 10.5. The elsif Clause
10.5. The elsif Clause Every so often, you may need to check a number of conditional expressions, one after another, to see which one of them is true. This can be done with the if control structure'
作者:编程之家 时间:2020-08-13
Learning Perl: 10.6. Autoincrement and Autodecrement
10.6. Autoincrement and Autodecrement You'll often want a scalar variable to count up or down by one. Since these are frequent constructs, there are shortcuts for them like nearly everything else we
作者:编程之家 时间:2020-08-13
柏林噪声(Perlin Noise)
柏林噪声(Perlin Noise)(译) 原文链接:http://freespace.virgin.net/hugo.elias/models/m_perlin.htm 翻译:azure Many people have used random number generators in their programs to create unpredictability, make the mot
作者:编程之家 时间:2020-08-13
文件路径分析File::Basename[perl]
文件路径可分为:位置、文件、扩展名。以c:/perl/bin/perl.exe來說,位置是指c:/perl/bin,文件名称为perl,扩展名指.exe。 预设情況下,File::Basename假设你用的是Unix型态的路径名称,但可经由呼叫fileparse_set_fstype来改变文档指定,可用的参数包括VMS, MSDOS, MacOS, AmigaOS, MSWin32。 File::
作者:编程之家 时间:2020-08-13
perl 引用的例子
解决办法 下面是前面提出来的问题的解决方法,就是关于城市和国家名称的重新格式化。 1 my %table; 2 while (<>;) { 3 chomp; 4 my ($city, $country) = split /, /; 5 $table{$country} = [] unless exists $table{$cou
作者:编程之家 时间:2020-08-13
find file
#!/usr/bin/perl # Written by Limeng # May 27, 2010 Changsha use strict; use File::Basename; use warnings; my $error_file = "error.txt"; my $clone_report_file = "clone_report.txt"; my @error; my
作者:编程之家 时间:2020-08-13
原译:使用Bloom Filters
仙子注:这篇文章是半年前翻译的,最早贴于公司内部的BBS上,并引起一些争论。Bloom Filters是一种效率较高的内存索引算法,它本身具有矛盾性:一方面能快速测试目标成员是否存在,另一方面又不可避免的具有假命中率。如下文档仅供参考。 由于不知道如何在这里粘贴图片,因此本文中没有包含图片说明,请对照原文档来阅读,原文档在:http://www.perl.com/pub/a/2004/04/08/
作者:编程之家 时间:2020-08-13
perl中如何执行外部命令
在perl中反勾号(``),system和exec都用来执行命令,这篇文章将给我们介绍它们各自的使用方法,联系,以及区别。 一、使用方法 1. 反勾号(``) 首先,我们有命令输入操作符,也叫反勾号操作符,因为它看起来象这样: $info = `finger $user`; 一个用反勾号(技术上叫重音号)引起的字串首先进行变量替换,就象一个双引号引起的字串一样。得到的结果然后被系统当作
作者:编程之家 时间:2020-08-13
perl中的STDOUT和STDERR
% perl -e 'print "Hello, World!/nabc"; print STDERR "Hi/n";' >err.txt 输出到err.txt: Hello, World! abc 而err.txt中没有包含Hi(Hi 仍然输出到屏幕),这只不过是把标准输出导入到了文件。如果要导入标准错误你必须这样: % perl -e 'print "Hello, World!/na
作者:编程之家 时间:2020-08-13
你的灯还亮着吗?》
你的灯还亮着吗?》一书中写道: 当你为了寻找解决问题的方法而累得筋疲力尽时,不妨向后看看,看看你是不是已经迷路了?你的问题究竟是什么? 2005.01.29 增补: QUOTE: 节选自 http://wiki.perlchina.org/main/show/brian%27s+Guide+to+Solving+Any+Perl+Problem 当你的程序碰到了问题时,请试着按照下面的思路处理一
作者:编程之家 时间:2020-08-13
perl 生成 .vcf文件 以导入电话
#!/usr/bin/perl -w use strict; =head--comment 公司发布的通信录是以excl文件的形式,要导入我的电话中肯定不行拉,电话 需要.vcf文件格式(lephone),也就是用91手机助手(AD)导入.... 思路: 1.把excle表格中的信息复制出来,保存为csv文件(可以是/t或是,为分隔符都行), 命名为phone.csv(这样就不用改角本
作者:编程之家 时间:2020-08-13
上一页
1
2
3
4
5
6
7
8
下一页
小编推荐
热门标签
更多
python
JavaScript
java
HTML
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot
react-native