Just two quick comments....
First:
open FILEHANDLENAME, ">>storage.txt"; print FILEHANDLENAME $name," ",$num,"$email","\n";
would probably be better written as:
$datafile = '/full/path/to/storage.txt'; #somewhere near the top ... open FILEHANDLENAME, ">>$datafile" or die "Couldn't open $datafile for + appending: $!"; print FILEHANDLENAME "$name $num $email\n";
The first line helps us keep certain things configurable, and will probably help us down the line when we want to modify the script slightly. The second line gives us some feedback if our file handle fails (you used this construct later in the script.... its valuable here too) The third line uses interpolation and is much easier to read than the original.

Second:

$line=<FILE>; while ( my $line = <FILE> ) {
What is that first line for? Are you purposefully throwing away the first line in the file? It could be that the first line in the datafile is for human consumption (i.e.
---------- BEGIN storage.txt ------------ NAME EMAIL PHONE Joe Blow joe@joe.com 123-1233 Jon Blow jon@jon.com 345-3455 ---------- END storage.txt ------------
In that case a comment is warranted, to let everyone else know why that first line is being tossed.

All in all, it looks pretty good.

-Blake


In reply to Re: Phone Number Storage by blakem
in thread Phone Number Storage by Cobo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.