????????????
| ?????? | ???? |
| -b | ???????豸 |
| -c | ????????豸 |
| -d | ?????? |
| -e | ?????? |
| -f | ?????????? |
| -g | ?????????setgidλ |
| -k | ?????????stickyλ |
| -l | ???????????? |
| -o | ?????и???? |
| -p | ??????? |
| -r | ????? |
| -s | ????? |
| -t | ???????? |
| -u | ?????????setuidλ |
| -w | ????д |
| -x | ??????? |
| -z | ????????? |
| -A | ????η??????? |
| -B | ????????????? |
| -C | ????η????????inode????? |
| -M | ???????????? |
| -O | ??????????????????????? |
| -R | ?????С??????????????? |
| -S | ????socket |
| -T | ?????????? |
| -W | ??????"?????????"??д |
| -X | ??????"?????????"????? |
| ??????????????????????????userid????????????ID????????suid????????Ч???ID?? | |
????
unless (open(INFILE, "infile"))
{
die ("Input file infile cannot be
opened.\n");
}
if (-e "outfile") {
die ("Output file outfile already
exists.\n");
}
unless (open(OUTFILE,
">outfile")) {
die ("Output file outfile cannot be
opened.\n");
}
?????
open(INFILE, "infile")
&& !(-e "outfile") &&
open(OUTFILE, ">outfile") ||
die("Cannot open files\n");
?塢?????в???
??C?????PERL??д洢?????в?????????@ARGV???????????????????????в???????C????????$ARGV[0]????????????????????????????
$var = $ARGV[0]; # ?????????
$numargs = @ARGV; # ?????????
PERL?У?<>??????????????????@ARGV??????????????乤????????
1????PERL??????????ο???<>???????$ARGV[0]?????????????
2????ж???shift(@ARGV); ????????@ARGV??????????????????????????????????????
3??<>???????????????????????е??????С?
4??????????????????????????
????
@ARGV = ("myfile1",
"myfile2"); #????????????в??????
while ($line = <>) {
print ($line);
}
???????myfile1??myfile2??????????????
?????????
?ó?????????????????????????????ù??(ex:ls
> tempfile)???????open (MYPIPE, "| cat >hello");
???????????????MYPIPE????????????"cat
>hello"??????????cat???????????????????????????????open(MYPIPE,
">hello"); ?ù????????????£?
open (MESSAGE, "| mail dave");
print MESSAGE ("Hi, Dave! Your Perl
program sent this!\n");
close (MESSAGE);