Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9323389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:19:50+00:00 2026-06-19T04:19:50+00:00

I have written the following script that creates a string that is of length

  • 0

I have written the following script that creates a string that is of length 3 or 4 units for all possible strings that contain the 26 letters of the alphabet. I’d like to add a 27th character. Call it ?, but it does not matter which one. I cannot think how I should do this. Any help would be much welcomed.

Here is the code that does the 26 letters:

 #!/usr/bin/perl

 use 5.10.0;

 my $str = 'AAA';
 while ( $str ne 'ZZZZ' ) {
    say $str;
    $str++;
  }

How would I transform a number into base 27?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T04:19:51+00:00Added an answer on June 19, 2026 at 4:19 am

    perldoc perlop:

    The auto-increment operator has a little extra builtin magic to it. If you increment a variable that is numeric, or that has ever been used in a numeric context, you get a normal increment. If, however, the variable has been used in only string contexts since it was set, and has a value that is not the empty string and matches the pattern /^[a-zA-Z]*[0-9]*\z/, the increment is done as a string, preserving each character within its range, with carry …

    Algorithm::Combinatorics to the rescue!

    #!/usr/bin/env perl
    
    use strict;
    use warnings;
    use feature 'say';
    
    use Algorithm::Combinatorics qw(variations_with_repetition);
    
    my $digits = ['A' .. 'Z', '?'];
    
    print_sequence($digits, 3);
    
    sub print_sequence {
        my ($digits, $n) = @_;
    
        my $it = variations_with_repetition($digits, $n);
        while (my $v = $it->next) {
            say join '', @$v;
        }
    
        return;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a CGI script that creates an image dynamically using GET data.
Hi all I have written the following script to get the value from the
I have written a KornShell (ksh) script that sets an array the following way:
I have written a Perl script for the following bioinformatics question, but unfortunately there
i have written the following code class Program { static void Main(string[] args) {
I have written a batch file that does the following: REM @ECHO OFF rem
I have an donate application script that has all its files in one Folder
I have the following script that I need to adapt to read from a
I have the following script that loops through textfiles an replaces the letter a
I have a Perl script that I've written and can compile it using pp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.