in reply to Re: How do i get EOF to work?
in thread How do i get EOF to work?
I'm sure it's just a minor overlook, but the above code gives me an error: "Uninitialized value in print....".
#!/usr/bin/perl use warnings; use strict; my $file = "/etc/passwd"; open(PASSWD,"<$file") or die "Couldn't open $file: $!\n"; while (<PASSWD>){ print $_ unless eof PASSWD; }
|
|---|