in reply to Is this a correct way of obtaining input from a file?
I would replace your first snippet with
This will give you an array with the correct values. If you want to assign it to a variable, then do:my @fields; while (<DATAFILE>) { chomp; push @fields, $_; }
I haven't tested this, but it should be ok!my ($TRACK, $pager, $service) = @fields;
In Section
Seekers of Perl Wisdom