in reply to Re: IO::Prompter return object
in thread IO::Prompter return object

Apparently not, as I'm using $ret in the second call to prompt, which crashes.

Update:

Ah, so I need the quotes. Thanks.



Original content restored by janitors.

Replies are listed 'Best First'.
Re^3: IO::Prompter return object
by 1nickt (Canon) on Feb 18, 2026 at 08:27 UTC

    Update: You have materially changed the post to which this post replies, that's not cool. See How do I change/delete my post?.

    As ikegami said, you need to wrap the scalar in double quotes to explicitly force stringification. Literally "$ret".

    $ perl -MIO::Prompter -e '$ret = prompt -num,"number:" ; prompt -num,- +def=>"$ret", "another:"' number: 42 another: 43


    The way forward always starts with a minimal test.