Gowri Chandra Sekhar Barla, TLS, Chennai wrote:
I have a file in which 10 lines are there each line is of with different
sizes
I want to print these lines in another files
If size of line is greater than 80 I should break the line

Please help to write this script

    while (<>) {
        chomp;
        while ( my $line = substr $_, 0, 80, '' ) {
            print "$line\n";
        }
    }

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to