> cat last_assignee.txt john > ./684200.pl In while loop john > cat 684200.pl #!/usr/bin/env perl #use warnings; #use strict; open( last_assignee, '<', "last_assignee.txt" ) or die "Unable to open last_assignee.txt for READ\n"; # Get the last assigned value and store it to a variable while () { print "In while loop\n"; print $_; chop; if ( $_ ne "" ) { $assignee_last = $_; } }