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

Re: [MacPerl] Getting Need Explicit Package



>
># Global symbol "odd_iter" requires explicit package name.
>Code Is:
>#----------------------------------------------------------------------
>#!perl -w
>use  strict;

This is meant to happen when you say `use strict';

>
>($even_iter,$odd_iter) = even_odd_print_gen(10);
>

Say either:

        my ($even_iter,$odd_iter) = even_odd_print_gen(10);
        ^^
or:
        ($main::even_iter,$main::odd_iter) = even_odd_print_gen(10);
          ^^^^^^           ^^^^^^
        # and then so on throughout ...

Obviously the former is preferable :-)


___________________________
Dr Jason Johnston
mailto:jcj@mail.usyd.edu.au
http://www-personal.usyd.edu.au/~jcj
fax: +61 2 9519 6184



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch