求解《Intermediate Perl》上一道习题!

求解《Intermediate Perl》上一道习题!



QUOTE:
Write a program that takes a list of filenames on the command line and uses grep to select the ones whose size in bytes is less than 1000. Use map to transform the strings in this list, putting four space characters in front of each and a newline character after. Print the resulting list.



QUOTE:
书上提供的答案:
print map { "    $_\n" } grep { -s < 1000 } @ARGV;

我在WIN平台运行总出现错误:
Warning: Use of "-s" without parentheses is ambiguous at oo.pl.txt line 1.
Unterminated <> operator at oo.pl.txt line 1.

-s需要圆括号么?貌似不用的。请大家指教,谢谢!
在windows环境下-s无效...
另外
-x 判断文档是否可以执行
-g/-k/-l/-p/-u/-A 不具意义
应该是因为没有inode吧....
我这本书的版本可能是5.6里面的..5.10不知道activeperl有没有改进...

Apile大哥:我WIN XP上perl版本为: 5.8.8
我需要到哪里查看WIN上使用Perl与Unix上使用的差别?容易混淆......谢谢!
under Windows, using "lt" operand  instead of "<" !
Try this:

QUOTE:
cd C:\windows
C:\windows>perl -e "print map{qq($_\n)} grep{-s lt 2000} glob('*.bmp')"

谢谢两位大哥的解答!