Important alert: (current site time 7/15/2013 8:52:49 PM EDT)
 

VB icon

Phone/Address Book

Email
Submitted on: 8/13/2002 11:26:50 AM
By: Damian myerscough  
Level: Intermediate
User Rating: By 2 Users
Compatibility: 5.0 (all versions)
Views: 10639
 
     Holds Information

 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
=**************************************
= for :Phone/Address Book
=**************************************
No Copyright Enjoy the code
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
=**************************************
= Name: Phone/Address Book
= Description:Holds Information
= By: Damian myerscough
=
= Inputs:All you need to Do is Select 1, 2, 3 or 4
=
= Returns:Ask's Phone number address etc
=
=This code is copyrighted and has= limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=354&lngWId=6=for details.=**************************************

#!/usr/bin/perl -w
#
# Coded By Damian Myerscough
#
#
 print"Welcome To My Phone Book.\n\n";
 sleep(2);
 main();
sub main{
 system("clear");
 print"1) Add Phone Number\n2) Add Address\n3) Exit\n4) Make a new Phone Book.\n\n";
 print"Enter: ";
$Select = <STDIN>;
 chop($Select);
 
if($Select == 1){
 print"Please Enter There Name: ";
$Name = <STDIN>;
 chop($Name);
 print"Enter There Phone Number: ";
$Number = <STDIN>;
 chop($Number);
 print"Adding To Phone Book..\n";
sleep(1);
if(open(LOGFILE, ">>phone.log")){
 print LOGFILE ("+=========================================+\n");
 print LOGFILE ("Name: $Name \n");
 print LOGFILE ("Phone Number: $Number\n");
 print LOGFILE ("+=========================================+\n\n\n");
close(LOGFILE); 
 print("Added Information.\n");
sleep(2); 
main();
}
}elsif($Select == 4){
print"You only Need to Make this once..\n";
 system("echo >> phone.log");
}elsif($Select == 2){
print"Please Enter There Name: ";
 $Name2 = <STDIN>;
chop($Name2);
print"Enter There House Number: ";
 $HouseNumber = <STDIN>;
chop($HouseNumber); 
print"Enter There Phone Number: ";
 $PhoneNumber2 = <STDIN>;
chop($PhoneNumber2);
 print"Enter There Town/City: ";
 $TownCity = <STDIN>;
chop($TownCity);
if (open(LOGFILE, ">>phone.log")){
print LOGFILE ("+=========================================+\n");
print LOGFILE ("Name: $Name2 \n");
print LOGFILE ("House Number: $HouseNumber \n");
print LOGFILE ("Phone Number: $PhoneNumber2 \n");
print LOGFILE ("Town/City: $TownCity \n\n");
print LOGFILE ("+=========================================+\n\n");
 close(LOGFILE)
}
print"Adding Information..\n";
sleep(1);
 print"Information Added.\n"; 
sleep(1);
main();
}elsif($Select == 3){
 print"Exiting..\n";
sleep(1);
}
}


Other 35 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.