This is documented, but obscurely. If you check in perlvar you'll find that $^I is the current value of the in-place edit. If you check in perlrun you'll find that -i calls select.
I would suggest avoiding $^I and writing the code that it saves for you. Alternately call select before setting $^I to get the currently selected filehandle, and then call select when the edit is done so that $^I and select play nice with each other.
In reply to Re^5: Make select apply to modules as well
by tilly
in thread Make select apply to modules as well
by richz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |