in reply to Re: Print to a file then use file content for test?
in thread Print to a file then use file content for test?

In addtion to the problems osunderdog pointed out,

1) It's better to use while (<MISS>) (which reads the file one line at time) than foreach (<MISS>) (which loads the entire file into memory for no reason).

2) You don't need my $miss=<MISS>; in the first script either. Why are you reading from a file you opened for write-append?

Replies are listed 'Best First'.
Re^3: Print to a file then use file content for test?
by lcollins (Novice) on Jan 05, 2005 at 12:57 UTC
    Thanks for the input I'll make those corrections. Any ideas on the difference between a file I write and one generated by my first script?

      We told you how to fix two sources of differences. A third possibility is that the scripts you were using were different than the versions you showed us. (Yeah, I know you didn't do it on purpose if this is the case, but it's probably happened to all of us at some point.)

      If it still doesn't work, we'll need to see the files. If you're afraid of losing hidden characters, you could always show the output of od -c miss.

        I'll try the "od -c" please ignore the post that it worked on solaris box it didn't work on the solaris box either. Thanks