lollipop7081 has asked for the wisdom of the Perl Monks concerning the following question:
He wants to make sure that the characters per line and lines per page can be set in the script. So to do that I've done the following: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 - - Run the 'make' command to configure and build Vim with the default configuration. - Run 'make install' command to installl Vim in the default directory. To enable/disable various Vim features, before running the 'make' comm +and you can run the 'configure' command with different flags to include/ex +clude the various Vim features. To list all the available options for the 'configure' command, use: $ configure -help
#!/usr/bin/perl # # Reformat the project3Dada.txt file to make more accesible $file = '/u/home/jhart2/perl/project3Data.txt'; # Name the fil +e open(INFO, $file); # Open the file for input use strict; use warnings; my $NoOfCharsPerLine = 80; my $NoOfLinesPerPage = 100; my $RightMargin = 7; my $header = 3; my $footer = 5; my @argument; # Read command line arguments @argument = split(/=/, $ARGV[0]); if ($argument[1] =~ /\D/) { print "Nonumeric value for lines option \"$argument[1]\" --scr +ipt aborted\n"; } if ($argument[0] eq "--chars") { $NoOfCharsPerLine = $argument[1]; } elsif ($argument[0] eq "--lines") { $NoOfLinesPerPage = $argument[1]; } else { print "unrecognized command line option \"$argument[0]\" --scr +ipt aborted\n"; exit; } close(INFO); # Close the file print "$NoOfCharsPerLine\n"; print "$NoOfLinesPerPage\n";
Edited by planetscape - added readmore tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Formatting Text
by ruzam (Curate) on May 12, 2006 at 18:13 UTC | |
|
Re: Formatting Text
by Zaxo (Archbishop) on May 12, 2006 at 18:45 UTC | |
by Scott7477 (Chaplain) on May 12, 2006 at 22:10 UTC | |
|
Re: Formatting Text
by kwaping (Priest) on May 12, 2006 at 18:40 UTC | |
|
Re: Formatting Text
by TedPride (Priest) on May 12, 2006 at 19:47 UTC | |
|
Re: Formatting Text
by TedPride (Priest) on May 12, 2006 at 20:10 UTC | |
|
Re: Formatting Text
by SamCG (Hermit) on May 12, 2006 at 18:46 UTC | |
|
Re: Formatting Text
by moklevat (Priest) on May 12, 2006 at 21:18 UTC | |
|
Re: Formatting Text
by TedPride (Priest) on May 12, 2006 at 20:19 UTC | |
|
Re: Formatting Text
by Trix606 (Monk) on May 12, 2006 at 19:05 UTC | |
by planetscape (Chancellor) on May 13, 2006 at 12:13 UTC |