Help for this page

Select Code to Download


  1. or download this
    use IO::Prompt::Tiny qw/prompt/;
    
    my $answer = prompt("Yes or no? (y/n)", "n");
    
  2. or download this
    if( prompt( "Backup $path? (y/n)", 'y' ) =~ m/^y/i ) {
        print "Backup beginning...\n";
    ...
        my @directories = @_;
        # Your backup code here.
    }