in reply to Is this a correct way of obtaining input from a file?

The value of $_ isn't changing within the same loop. Therefore, the last possible entry from the file will be the last thing assigned (to all of your variables). There are many different ways of doing this... (this example has been tested and works properly):
#!/usr/bin/perl -w use strict; open(DATAFILE, "testfile"); my @file_data; push(@file_data, $_) while (<DATAFILE>); my ($track, $pager, $service) = @file_data; chomp ($track, $pager, $service); print "Tracking Number: $track\n"; print "Pager Number: $pager\n"; print "Service: $service\n";

-fp

Update: Actually, I like DamnDirtyApe's version better. Same concept as mine, but shorter... simply assign your values in list context.