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

The problem is that you are getting the same value everytime you do an assignment for each run of the loop. For example:
Sample data: foo bar baz First time through loop $TRACK = foo $pager = foo $service = foo Second time (etc) $TRACK now equals bar $pager now equals bar $service now equals bar etc..
TIMTOWTDI but this would work..
$datafile = "CheckUPS.in"; open (DATAFILE, $datafile) or die "Input data not found.\n"; @text = <DATAFILE>; close (DATAFILE); $TRACK = chomp($text[0]); $pager = chomp($text[1]); $service = chomp($text[2]); print "$TRACK $pager $service\n";