in reply to Re: problem with print content of file
in thread problem with print content of file

A few suggestions.

Localize *DIR before opening a directory. Ditto for *MYFILE.

Test -f "$dir/$file" to eliminate any other folders in that directory. Else you will see the same problem.

And finally start your script with "use strict", and throw in "my" as appropriate. Might as well get started on the good habits early. :-)

Cheers,
Ben

  • Comment on RE: Re: problem with print content of file