The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Script::State - Keep script local variables

SYNOPSIS

    #!perl
    use Script::State;

    script_state my $count = 0; # set to last value if exists
    say $count++;

    # automatically write $count's current value to external file
    # to be read at next script execution

DESCRIPTION

Script::State stores local variables to file after script execution.

AUTHOR

motemen <motemen {at} gmail.com>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.