On 9/7/07, Santana <[EMAIL PROTECTED]> wrote: > Hei all, > i'am a newbie in PERL and i find a solution for this problem : > > I have a string "xxxxxxx" , i want put ones("1") on left of string, if > this string dont have a length of 20 character. > > Example : > > if i have th string "HELLO" and woul like get this ; > > "111111111111111HELLO"
#!/usr/bin/perl -w use strict; use warnings; my $str = "Hello"; print 1 x (20 - length($str)) . $str . "\n"; > > > How i can this ??? > > > > Thanks, > Paulito > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > > > -- Rodrick R. Brown http://www.rodrickbrown.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/