#!/usr/bin/perl

use strict;
use warnings;

open(my $in, '-|', 'roarmon', '--light') or die $!;

my $index = 0;
my $data;

$\ = "\n";
$, = ',';
$| = 1;

while (read($in, $data, 512) == 512) {
 print $index, map{ord substr $data, int, 1}(@ARGV);
 $index++;
}

close($in);

#ll
