由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - [转载] Perl text parsing
相关主题
好马配好鞍/介绍一套linux牛书/O'Reilly Animal Book[转载] CVS question
[转载] any fast way to learn Yak? (bison and flex)Solaris底下没有类似getopt_long的call?
awk questionA question about symbolic link
equivilent $REMOTEHOST in kshYACC tables (yyact, yypact, yypgo ...) 的问题 (转载)
帮帮忙,用C作一个SHELL脚本编程求助: BC的使用
Shell Questionhow to sscanf this case.
请教一个shell script的问题Question about I/O redirection.
Help on get an integer from a date stringHow to use line type in GnuPLot?
相关话题的讨论汇总
话题: perl话题: parsing话题: file话题: text话题: variable
进入Unix版参与讨论
1 (共1页)
f***y
发帖数: 98
1
I got a file "test.txt" looking like(dashes are boundaries.. ignore them):
r******g
发帖数: 43
2

should be @test bah.
use file pipe and parse one line each time. something like to get
a line. You don't need to store all the lines in one list variable.

【在 f***y 的大作中提到】
: I got a file "test.txt" looking like(dashes are boundaries.. ignore them):
f***y
发帖数: 98
3

should be $test

【在 r******g 的大作中提到】
:
: should be @test bah.
: use file pipe and parse one line each time. something like to get
: a line. You don't need to store all the lines in one list variable.

f***y
发帖数: 98
4
in some circumstances, I do need to store all the line in one string variable.

【在 r******g 的大作中提到】
:
: should be @test bah.
: use file pipe and parse one line each time. something like to get
: a line. You don't need to store all the lines in one list variable.

z*****u
发帖数: 12
5
undef $/;
$whole_file=;
something like this, look up the perl cookbook.

variable.
them):
get

【在 f***y 的大作中提到】
: in some circumstances, I do need to store all the line in one string variable.
1 (共1页)
进入Unix版参与讨论
相关主题
How to use line type in GnuPLot?帮帮忙,用C作一个SHELL
Re: 请推荐一本perl book好不好Shell Question
shell programming请教一个shell script的问题
CGI之Perl Script一问Help on get an integer from a date string
好马配好鞍/介绍一套linux牛书/O'Reilly Animal Book[转载] CVS question
[转载] any fast way to learn Yak? (bison and flex)Solaris底下没有类似getopt_long的call?
awk questionA question about symbolic link
equivilent $REMOTEHOST in kshYACC tables (yyact, yypact, yypgo ...) 的问题 (转载)
相关话题的讨论汇总
话题: perl话题: parsing话题: file话题: text话题: variable