Hi,

Perl doesn't have that a built-in function "repeat".
You could say:

print FOO "-" x 50;




> Message du 01/09/08 06:49
> De : "Dave Thacker"
> A : beginners@perl.org
> Copie à :
> Objet : print a line of repeating chars to a file
>
>
> I want to print a line of 50 "-"'s to a file.  This is my non-working syntax.
>
> #!/usr/bin/perl
>
> open (FOO, "foo.out");
> print FOO repeat(50,"-");
> close FOO;
>
> Undefined subroutine &main::repeat called at ./foo.pl line 4.
>
> Whats the correct syntax for doing this?
> TIA, Dave
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> http://learn.perl.org/
>
>
>
> 


Regards,
Jeff.

 Créez votre adresse électronique [EMAIL PROTECTED] 
 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.

Reply via email to