Cheers,$SaleFile="sales.csv"; # Print databases name print "DATABASE FILE: $SaleFile<br>\n"; # Check to see if database exists if (-e "$SaleFile"){print "FILE CHECK: $SaleFile does exist<br>\n"}els +e{print "FILE CHECK: ERROR: $SaleFile does NOT exist<br>\n";} # Open file for reading if (open(DAT,"$SaleFile") <= 0){print "ERROR: $SaleFile can't be opene +d<br>\n";}else{print "$SaleFile was opened successfully<br>\n";} # Read from database print <DAT>; @inFile=<DAT>; # Close database file if (close(DAT) <= 0) {print "ERROR: $SaleFile can't be closed<br>\n";} +else{print "$SaleFile was closed successfully<br>\n";} print "DATABASE SIZE: $#inFile<br>\n"; print "DATABASE: @inFile<br>\n";
Scotty
In reply to Re: Re: Reading from a file on a NT server
by bwjen1
in thread Reading from a file on a NT server
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |