in reply to "Updating" files.

while( <myinfo.txt> )

You can't specify filename here! You should open file first and then use handle inside <>.

Update: or alternatively you can specify filename in command line and use just while(<>)

Replies are listed 'Best First'.
Re^2: "Updating" files.
by neutron (Sexton) on Jan 25, 2009 at 20:57 UTC
    I just tried the following and still no dice ...

    open ZIP, ">myinfo.txt"; $^I = "myinfo.txt.bak"; while( <> ) { s/^Author:.*/Author: Johnny5/; s/^Phone:.*\n//; print; } close ZIP;

      while(<ZIP>)

      neutron:

      Perhaps it would help if you would (a) Open the file in read mode, and (b) use your file handle!

      ...roboticus