On Mon, May 5, 2008 at 11:18 AM, Stephen Kratzer <[EMAIL PROTECTED]> wrote:
snip
> for (1..$n) {
> if ($_ == 1 || $_ == $n) {
> print "*" x $n, "\n";
> }
> else {
>
> print "*", " " x ($n - 2), "*\n";
> }
> }
snip
Its time to play T
On Monday 05 May 2008 09:22:51 Rodrigo Tavares wrote:
> Hello,
>
> I need create a square using a single number, but I don't know how to
> create the sides.
>
> I have to create this:
>
>
> * *
> * *
>
>
> My code is below :
>
> print "Enter with number:";
> chomp ($number = );
>
> my @
Rodrigo Tavares wrote:
> Hello,
>
> I need create a square using a single number, but I don't know how to create
> the sides.
>
> I have to create this:
>
>
> * *
> * *
>
>
> My code is below :
>
> print "Enter with number:";
> chomp ($number = );
>
> my @array = ();
>
> $cont
Rodrigo Tavares <[EMAIL PROTECTED]> asked:
> I need create a square using a single number, but I don't
> know how to create the sides.
#!/usr/bin/perl -w
use strict;
for( my $n = 1 ; $n <= 10; $n++ ){
print "\nn = $n\n\n";
if( $n == 1 ){
print "*\n";
} else {
print '*'x$n . "\n"
The perl module Graphics::Simple might be able to help you.
Found on CPAN.
--jms
On May 5, 2008, at 9:22 AM, Rodrigo Tavares wrote:
Hello,
I need create a square using a single number, but I don't know how
to create the sides.
I have to create this:
* *
* *
My code is bel