in reply to Prompt to save file working with excel::writer::xlsx for desktop application

You can simply read data from the console by doing:

print "Please enter the output filename:\n"; my $filename = <STDIN>; $filename =~ s/\s*$//; # remove newline and other whitespace at the en +d

For fancier things, there are ExtUtils::MakeMaker::prompt, IO::Prompt and IO::Prompter.

Also consider allowing the user to pass in the filename directly on the command line instead of asking the user afterwards, or simply directly giving a filename based on the input filename and date/time of run and letting the user rename the file afterwards.

  • Comment on Re: Prompt to save file working with excel::writer::xlsx for desktop application
  • Download Code