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.
|