|
发表于 2007-5-18 09:28:49
|
显示全部楼层
#cat txt
\\\
\\\\\\\\\\\\\\\
123445
aaaaaaaaaa\
aasdasd
asdas
asdasd
asdasd\\\
zzzzzzzzzz
zzzzzzzzzzzzzzzz\\
zzzzzzzzzzzzzzzzzzzzzzz
#cat 1.pl
#!/usr/bin/perl
open FD, "<txt";
while (<FD>) {
/\\$/ && print;
# if ($_ =~/\\$/) {
# print $_;
# }
}
close FD;
perl 1.pl
\\\
\\\\\\\\\\\\\\\
aaaaaaaaaa\
asdasd\\\
zzzzzzzzzzzzzzzz\\ |
|