[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-AnyPerl] Problem with my First Module



On Fri, Sep 29, 2000 at 07:49:15AM -0700, ehughes wrote:

> Works sort of as expected. When I ran this little script (listed below) to
> test it I received the following output:
> 
> Hughes:Elton:46885:IT1
> 
> Um, where did the 1 at the end of IT come from?


> print $staff->print_me;
  ^^^^^

> sub print_me {

>     print $emp_data;
      ^^^^^
> }

The print_me method prints out the data and returns the result of print.
Since the print succeeded, the return value is 1.  Then the print statement
in your main program prints that return value.

You probably want to change the name of the print_me() method and have it
return a string.

Ronald

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-anyperl-request@macperl.org