in reply to Re^4: 80 characters long
in thread 80 characters long

You never created or assigned anything to @Text.
( oh, that error is cause you're missing a semicolon at the end of the use statement. )

use Text::Wrap qw( wrap ); my $file_name = "C:\\ACK_DATA\\ar835.dat"; open(my $fh, $file_name) or die "Unable to open input file \"$file_name\": $!\n"; $Text::Wrap::columns = 80; while (<$fh>) { print wrap('', '', $_); }

Updated to fix error mentioned in reply.

Replies are listed 'Best First'.
Re^6: 80 characters long
by aixmike (Novice) on Sep 27, 2007 at 19:54 UTC
    thanks for your patience. I tried your code, but it gives me an error "Undefined subroutine &main::wrap called at perl-form.pl line 10." this is the print wrap line.

      Oops, me bad
      use Text::Wrap qw( );
      should be
      use Text::Wrap qw( wrap );

      A reply falls below the community's threshold of quality. You may see it by logging in.