> -----Original Message-----
> From: Madhu Reddy [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 12, 2003 11:21 AM
> To: [EMAIL PROTECTED]
> Subject: How to Add spaces at the end of a line
> 
> 
> Hi,
>    I want to do some data validation...
> I hvae to read each (row)line in a file and have to
> check the length of each row, if length of row is 263
> I need to add 2 spaces at the end of line (row) to
> make 265 row lenghth ..
> 
> Here how to add spaces at the end of length
> 
> while(<FH>) {
>    if (length($_) == 263) {
>       Add 2 spaces to the end (before new line char)
>       of $_

        $_ .= '  ';
        # or
        $_ .= ' ' x 2;


>    }
> }
> 
> How to do this ?
> 
> Thanx
> -Madhu
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
> 
> -- 
> 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