in reply to Use of Uninitialize value in Join or String

That is a warning, not an error. join will be happy to join undef, @foo; to the same effect as joining with an empty string.

You can turn the warning off in modern perl with { no warnings 'uninitialized'; ... } That is lexically scoped, which is why I used a bare block there. Older perl is more awkward about switching off warnings. It is not selective and there are peculiar rules to follow. See the docs for them.

(Added) Looking harder at your code, I suspect that some of your data is not providing array elements that you explicitly index. If so, perhaps you need to check your data parsing.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: Use of Uninitialize value in Join or String
by Skyler99 (Novice) on Jun 09, 2003 at 03:46 UTC
    Thanks for replying back. when I run the program against a local directory. It works fine but If I run it against a map drive. It doesn't work and it gave me the error message. could you tell me what could I do to rewrite my code so I read the file with no problems.?

      Just out of curiosity, are you sure the file on the map drive is in the same format as the file on the local directory?

      -- vek --