in reply to Animated Heatmap

Shockingly, I thought I would have a PDL go at this. But first, I had to see what it looked like!

At first, it produced a stunning result! A black square, and lots of errors that "" was not a number. It transpired that split /\s/, "1    2    3" does not make 3 elements, but 7. Instead sample_data needs to split on /\s+/, and all is well.

Replies are listed 'Best First'.
Re^2: Animated Heatmap
by choroba (Cardinal) on Aug 14, 2024 at 09:06 UTC
    > does not make 3 elements, but 7

    It would make 3 if you used the [download] button to get the code and data, as the numbers are separated by tabs, not spaces. Using split ' ' is the shortest and safest option.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]