in reply to $^I why this symbol does not work ?
You don't tell us how it does not work. But I'm going to guess. You're running this on Windows. On Windows, it's not possible to recreate a file while still reading from it. That's why you need to set $^I. You can still erase the file afterwards.
Also see the Sysadm::Install module, which has the pie subroutine, which does just what your replace subroutine does.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $^I why this symbol does not work ?
by kingwrcy (Initiate) on Oct 01, 2008 at 06:45 UTC | |
by Corion (Patriarch) on Oct 01, 2008 at 06:59 UTC | |
by kingwrcy (Initiate) on Oct 01, 2008 at 07:09 UTC | |
by lamp (Chaplain) on Oct 01, 2008 at 07:00 UTC | |
by kingwrcy (Initiate) on Oct 01, 2008 at 07:16 UTC |