lollipop7081 has asked for the wisdom of the Perl Monks concerning the following question:
====================================================================== +======= SECTION 35 - BUILDING VIM FROM SOURCE 35.1. How do I build Vim from the sources on a Unix system? For a Unix system, follow these steps to build Vim from the sources: - Download the source and run-time filles archive (vim-##.tar.bz2) fro +m the ftp://ftp.vim.org/pub/vim/unix directory. - Extract the archive using the bzip2 and tar utilities using the com +mand: $ bunzip2 -c <filename> | tar -xf -
#!/usr/bin/perl # # Reformat the project3Data.txt file to make more accesible use strict; use warnings; my $file = '/u/home/jhart2/perl/project3Data.txt'; # Name the fil +e open(INFO, $file); # Open the file for input my @Project3 = <INFO>; # Read it into an array my $NoOfCharsPerLine = 80; my $NoOfLinesPerPage = 100; my $RightMargin = 7; my $header = 3; my $footer = 5; my @argument; my $width = 80; my $heading; chop(@Project3); # Remove \n characters my $string = "@Project3"; # Define the string my @chapters = split (/===+/, $string); # Split the string while (<INFO>) { if (/(SECTION)(\s)(\d+)(.*)(\3)(\.1\.)(.*)/) { $heading = $1.$2.$3.$4; print "$heading" x (($width-length($heading))/2); + # Center the heading } } close(INFO); # Close the file
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing Help
by jwkrahn (Abbot) on May 16, 2006 at 00:21 UTC | |
|
Re: Printing Help
by GrandFather (Saint) on May 16, 2006 at 00:37 UTC |