in reply to Re: Reading into array with sscanf
in thread Reading into array with sscanf

Ah, thanks, that is what I was looking for (or failing to remember). I don't want to use any of the usual things like JSON, XML etc because this has got to be extremely light weight as it's going to be embedded.

Replies are listed 'Best First'.
Re^3: Reading into array with sscanf
by eyepopslikeamosquito (Archbishop) on Jul 16, 2024 at 12:34 UTC

    I don't want to use any of the usual things like JSON, XML etc because this has got to be extremely light weight as it's going to be embedded

    That's fine. I still encourage you to structure your lightweight script file into (unit-testable) subroutines at the top of the file, with each subroutine having well-defined inputs and outputs and not relying on global data ... followed by a short mainline at the end.

    A simple example of this approach can be found in this node.

    👁️🍾👍🦟
Re^3: Reading into array with sscanf
by LanX (Saint) on Jul 16, 2024 at 12:27 UTC