|
发表于 2005-10-11 15:42:09
|
显示全部楼层
use perl :
code:
richard:/home/richard/shellcode# cat test.pl
#/usr/bin/perl
print "please type some character string to test:";
$str=<STDIN>;
chop($str);
if ($str =~ /^-/) {
print "ture\n";
} else {
print "false\n";
}
richard:/home/richard/shellcode# perl test.pl
please type some character string to test:aaa
false
richard:/home/richard/shellcode# perl test.pl
please type some character string to test:-aaa
ture
richard:/home/richard/shellcode# |
|