open(FH, "<", "input.txt")
1.FH="input.txt"
2.FH is <, which means FH is (file) source whose content provides input(similar as stdin) to current program
3.if >, which means FH is a file accepting the output of current program
open(FH, "-|", "input.sh")
1.FH="input.txt"
2.FH is <, which means is a (command) source whose output provides input(similar to stdin) to current program
3.if |-, >, which means FH is a command whose stdin accepts the output of current program
没有评论:
发表评论