--- Aaron Priven <[EMAIL PROTECTED]> wrote: > > On Sep 30, 2006, at 7:30 PM, Ron Smith wrote: > > > Hi all, > > > > I get the error: "Undefined subroutine > &Main::BadData > > called at line 42" when executing the following > '.cgi' > > script, with nothing entered in all of the text > > fields. I'm unfamiliar with this error. > > > > [...] > > > > > } else { > > BadData(); > > } > > > > sub BadInput { > > print p("Please, enter numbers only!"); > > die "Click the \"Clear\" button and try > again.\n"; > > } > > > > You are trying to call the subroutine "BadData", but > Perl can't find > a subroutine with that name. Instead, your "sub" > uses a different > name, "BadInput". Use the same name both places and > the error should > go away. > > -- > Aaron Priven, [EMAIL PROTECTED], > http://www.priven.com/aaron > > Doh! Here's a case where I forgot I made a name change. Another Lesson learned. I suppose I would have caught this too, if I'd used the debugger. I guess I was in a hurry at the time.
Thanks, everybody. :) Ron Smith [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>