- or download this
@reports = `ls *.doc`;
foreach $file(@reports) {
$cmd=`perl -ni -e 'print;print "VALUE=KEY\n" if \$\.== 3;' $file`
}
- or download this
#!/usr/bin/env perl -i
...
print "VALUE=KEY\n" if $. == 3;
$. = 0 if eof;
}
- or download this
$ ls -al *.doc
-rw-r--r-- 1 ken staff 52 26 Feb 03:20 pm_1076103_1.doc
...
Doc 3 Line 2
Doc 3 Line 3
Doc 3 Line 4
- or download this
$ pm_1076103.pl *.doc
- or download this
$ cat pm_1076103_1.doc
Doc 1 Line 1
...
Doc 3 Line 3
VALUE=KEY
Doc 3 Line 4