in reply to Loading data into an array from a file problem

What is the content of $times? Can you provide a script that can actually be run to reproduce the problem that you are having? "does not work" does not tell us what you expected, nor what you got.

The following code may be a good starting point:

use strict; use warnings; while (<DATA>) { chomp; my @Names = split ','; print "@Names\n"; } __DATA__ Peter,Fred,Joe Sam,Anna,Sue

Prints:

Peter Fred Joe Sam Anna Sue

DWIM is Perl's answer to Gödel