in reply to reading a file

It seems to work for me. This code enters the while loop and prints out the value of the input file:
> 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 (<last_assignee>) { print "In while loop\n"; print $_; chop; if ( $_ ne "" ) { $assignee_last = $_; } }

Are you sure your input file has anything in it?

I intentionally commented out use warnings; use strict; just to try to duplicate your results. Make sure you use these in your code.

Replies are listed 'Best First'.
Re^2: reading a file
by Anonymous Monk on May 02, 2008 at 17:16 UTC
    yes I do have values. I think it is just a new line that was needed after the first line. I added a new line and it is working. I update this file in the script so I was just putting in the value and for some reason it did not like it.