$ 1在Perl中意味着什么? [英] What does $1 mean in Perl?

查看:119
本文介绍了$ 1在Perl中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ 1在Perl中意味着什么?此外,$ 2是什么意思? 有多少个$ number变量?

What does $1 mean in Perl? Further, what does $2 mean? How many $number variables are there?

推荐答案

$number变量包含与 例如,使用以下字符串:

For example, take the following string:

$text = "the quick brown fox jumps over the lazy dog.";

声明之后

$text =~ m/ (b.+?) /;

$1等于文本"brown".

这篇关于$ 1在Perl中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆