prints only once as expected, butopen(X,"< test"); undef $/; while(<X>) { print "hello" }
prints twice regardless of how many lines in 'test' thanks$ARGV[0]="test"; $^I=""; undef $/; while(<>) { print "hello" }
In reply to inplace file editing by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |