Why the hell am I getting this?
Use of Nil in numeric context
at:
$idx = $idx + 1
in the following loop:
for %bp<materials>.list -> $i {
my $count := $i[1];
my $minVol= $count / 10;
my $idx = 0;
while ($count > 0) {
my $k = $i[0];
unless %market{$k}<sell>[$idx]<vol_remain> > $minVol {
$idx = $idx + 1;
next;
}
my $o = {
count =>
%market{$k}<sell>[$idx]<vol_remain> > $count
??
$count !! %market{$k}<sell>[$idx]<vol_remain>,
unit_price => %market{$k}<sell>[$idx]<price>,
station => %market{$k}<sell>[$idx++]<station_name>
};
$o<subtotal> = $o<unit_price> * $o<count>;
%cart{ %inv{$k} }.push: $o;
$count -= $o<count>;
}
}
???