# Open a log file for writing, overwrite each time
$theFile = "/etc/passwd";
unless ( open ( LOGFILE, ">$theFile" ) ) {
die "I can't seem to open $theFile.\nError was $!\n";
}
print LOGFILE "Program GeeWiz up and running\n";
# Open the unix password file for reading
$theFile = "/etc/passwd";
unless ( open ( PASSWORD, "$theFile" ) ) {
warn "I can't seem to open $theFile. Continuing anyway.\n";
}
while ( defined ( $theLine = <PASSWORD> ) ) {
print $theLine;
}