The x operator takes a string and a number and repeats the string number
times.

For example:

print "dog" x 3;

prints: dogdogdog

You can look at
perldoc perlop

or buy Learning Perl from O'Reilly.
----- Original Message -----
From: "Glenn Meyer" <[EMAIL PROTECTED]>
To: "Beginners" <" <[EMAIL PROTECTED]>"@glennmeyer.com>
Sent: Wednesday, April 10, 2002 12:26 AM
Subject: Re: shrinking code


> Please, tell me what your are doing here.  I have seen similar short code
> before but have no idea how to read it or why it works.  Can you point me
to
> docs or a boox the would help?  Thanks!
>
> On Tuesday 09 April 2002 10:14 pm, Tanton Gibbs wrote:
> > print "-" x 80;
> > ----- Original Message -----
> > From: "Michael Gargiullo" <[EMAIL PROTECTED]>
> > To: "Beginners" <[EMAIL PROTECTED]>
> > Sent: Tuesday, April 09, 2002 11:13 PM
> > Subject: shrinking code
> >
> > > How can I write this smaller?
> > >
> > > while($m < 80){
> > > print "-";
> > > $m++
> > > }
> > >
> > > --
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to