Ok, this has me bewildered. I have added some fields to a pipe-delimited file and added the keys to the switch to chomp each line correctly. I am using the same lines of code that I had before, but now when I run the script I get 'Use of uninitialized value in concatenation (.) or string at logs.cgi line 113'. Line 113 is the line marked below.
the script: -------------------- sub Ilist { use strict; $database_file = "/home/web/data/info/salesa2"; open(INF,$database_file) or dienice("Can't open $database_file: $! \n"); @grok = <INF>; close(INF); $file3 = "/home/web/sales/inventory_dat.html"; open (FIL3, ">$file3") || die "Can't write to $file3 : error $!\n"; print FIL3 "<html><head><title>Inventory List updated on $date</title></head><body bgcolor=white text=black>\nInventory List updated on $date<br>\n<table border=1>\n"; foreach $i (@grok) { chomp($i); ($item_num,$item_desc,$b1,$b2,$b3,$b4,$cc,$vn,$qoh,$qc,$qor,$bc) = split(/\|/,$i); #113 here (print FIL3) print FIL3 "<tr><td width=120 align=left>$item_num</td> <td width=330 align=left>$item_desc</td> <td width=75 align=left>$qoh</td> <td width=75 align=left>$qc</td> <td width=75 align=left>$qor</td> <td width=90 align=left>$bc</td></tr>\n"; } print FIL3 "</table></body</html>\n"; } --------------------- The data: (2 lines) ------------------ AA-1202 |12"X10.75 FOIL SHEETS 12/200| 69.75 | 45.60 | 44.46 | 43.38 |UF|ALCAN | 9.000 | 1.000 | 16.000 |B AA-1205 |12"x10"FOIL POPUP SHEETS 6/500| 99.00 | 64.73 | 63.11 | 61.57 |UF|ALCAN | 16.000 | .000 | .000 |B ------------------ I have been tweaking this thing and still can't figure out why it barfs. TIA! Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]