in reply to reading the 5th element from file doesn't work.

After splitting your $line into pieces you are joining it back into one, so there is no 5th element (sad, Leeloo, isn't it?). If you remove the join bit, it should work assuming that your line has 5 elements...

  • Comment on Re: reading the 5th element from file doesn't work.