in reply to debug the error!!!

I've put all sorts of general comments on the code below. I can't find your specific error, but following these style tips should help you find it yourself, or be more likely to get help in the future.
#!/usr/local/bin/perl
Use perl -w to turn warnings on. Include "use strict;" to enforce variable declaration. See perlstyle for tips.

$hour=<STDIN>;chop($hour);
There is no real reason to use chop()...get in the habit of using chomp(), and use chop() only when you really mean it.

#goto LABELEND;
I realize this has been commented out, but you should not have to use goto. A case can be made for when to use goto, but given perl's great flexibility in flow-control, you can plan to never use it and be fairly safe.

if (open(NAMEONED,$onedname))
You should always report error conditions on file opens. Try : open(NAMEONED, $onedname) or die "Can't open $onedname: $!";

#use PGPLOT; # Load PGPLOT module #print "\nTesting simple point plot...\n\n"; #print "PGPLOT module version $PGPLOT::VERSION\n\n";
When posting code and asking for help, remove all useless, commented out lines.

$k++;goto NEXTLINE;
This is somewhere where a goto is unnecessary. Look up line labels, next and last in perlman:perlsyn