I have currently wrote a simple script to attempt to create a list of
every letter combination this is a rough outline of what I want my
program to do . . .

A
B
C
...
AA
AB
AC

I used perl a bit for a high school project several years ago so I'm
not that good at it =(  Never the less I have extensively googled what
I am trying to accomplish and came across the join command.  I tried
to plug this into my code and get the desired output.

Here is what I have:


!/usr/bin/perl
use strict;

my @array = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M',
 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', );

print join("\n", @array , );

#
#
#So far so good I get the desired output for the first letter collum
#
#

!/usr/bin/perl
use strict;

my @array = ('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
'L', 'M',
 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', );

my @first = join("\n", @array , );

print join(@first , @array );

#
#
#Here is where it gets messed up, the output that I get is as follows
# A1B1C1D1E1F1G1H1I1J1K1L1M1N1O1P1Q1R1S1T1U1V1W1X1Y1Z
#


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to