#!/usr/bin/perl -w use strict; while () { my ($num,$date,$category,$os,$subcat,$action,$desc,$assignto, $status,$extra) = split(/,/,$_); $num ||= ""; print "NUM: $num\n"; $date ||= ""; print "DATE: $date\n"; $category ||= ""; print "CATEGORY: $category\n"; $subcat ||= ""; print "SUBCAT: $subcat\n"; $os ||= ""; print "OS: $os\n"; $desc ||= ""; print "DESCR: $desc\n"; $action ||= ""; print "ACTION: $action\n"; $assignto ||= ""; print "ASSIGNTO: $assignto\n"; $status ||= ""; print "STATUS: $status\n"; $extra ||= ""; print "Extra: $extra\n"; print "\n"; } __DATA__ 456,05-Dec-2002,80,Software,print,,he can't print hes getting error msg: 'LPTTS FOR EC-2-1,paper jam,1,C 457,05-Dec-2002,22,Software,switchb.,,when internal call to ext 444 it goes to switchboard2 - when internal call to 0 it goes to switchboard1 -- both should go to switchboard 1,call texchnitian - fixed ,35,C Prints: NUM: 456 DATE: 05-Dec-2002 CATEGORY: 80 SUBCAT: print OS: Software DESCR: he can't print hes getting error msg: 'LPTTS FOR EC-2-1 ACTION: ASSIGNTO: paper jam STATUS: 1 Extra: C NUM: 457 DATE: 05-Dec-2002 CATEGORY: 22 SUBCAT: switchb. OS: Software DESCR: when internal call to ext 444 it goes to switchboard2 - when internal call to 0 it goes to switchboard1 -- both should go to switchboard 1 ACTION: ASSIGNTO: call texchnitian - fixed STATUS: 35 Extra: C