in reply to
Re^2: Grep question
in thread Grep question
Actually the code is as follows
###--- Define options for select Status ---###
@statusoption = ('Waiting Approval' , 'Denied' , 'Approved' , 'Ordered
+' , 'Building' , 'Built' , 'Shipped');
if ($purchase eq "Already Have") {
delete $statusoption[3];
}
if ($purchase eq "Virtual Machine") {
delete $statusoption[3];
delete $statusoption[6];
}
@statusoption = grep {$found++ if $_ eq $status; $found } @statusoptio
+n;
###----------------------------------------###