Well, heh I'm still a newbie and I just thought I'd post something I've done recently and maybe get some comments on it heh (please don't be to insulting lol).
#!/usr/bin/perl
print "Welcome To Easy Storage V0.5\n";
until ($op =~/Q/i) {
print "Would you like to (R)etrive stored data, (A)dd more information
+ or (Q)uit?\n";
$op=<STDIN>;
if($op =~ /A/i) {
print "Enter Name as EXPLZ and number as 1 to stop entering ne
+w number\n";
until ($name =~ /EXPLZ/) {
print "\nName: ";
chomp ($name=<STDIN>);
print "\nNumber: ";
chomp ($num=<STDIN>);
print "\nE-Mail: ";
chomp ($email=<STDIN>);
open FILEHANDLENAME, ">>storage.txt";
print FILEHANDLENAME $name," ",$num,"$email","\n";
};
};
if ($op =~ /R/i) {print "Please Enter The Name of The Person whoms inf
+romation you want\n";
print "Name: ";
chomp ($name2=<>);
open FILE, "<storage.txt" or die;
$line=<FILE>;
while ( my $line = <FILE> ) {
if ($line =~/$name2/i) {print $line,"\n"};
};
};
};
Any comments?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.