Source

rfid / attendance

Diff from to

File attendance

 } else {
 	open $out, ">$csv_out_file"
 		or die "$csv_out_file: Unable to write: $!\n";
-	print $out "last,first,time\n";
+	print $out "last,first,id,time\n";
 }
 
 # Force writes to the CSV immediately
 	}
 
 	# Try for a 16 bit ID
+	my $id = $_;
 	my $id16 = 0;
-	for my $bit (split //, substr($_, -17, 16))
+	for my $bit (split //, substr($id, -17, 16))
 	{
 		$id16 = ($id16 << 1) | $bit;
 	}
 	printf "%d: %s\n", $count, $user->[1];
 
 	my $now = localtime;
-	print $out "$user->[0],$user->[1],$now\n";
+	print $out "$user->[0],$user->[1],$id,$now\n";
 }
 
 __END__