• Subject: Re: AS/400 Perl Challenges
  • From: boldt@xxxxxxxxxx
  • Date: Thu, 13 Jan 2000 08:01:06 -0500



Gary wrote:
>I have found peculiar things happening with perl on the AS/400.  I
>think this is one of them.  If someone knows of a more appropriate
>email list I should take this to please let me know.  Sorry to all the
>people that don't care to know anything about perl.
>
>When trying to run a perl script on the 400 I'm getting the following
>errors:
>
>    Global symbol "ip" requires explicit package name at , line 14.
>
>    Global symbol "user" requires explicit package name at , line
>14.
>...

Hi Gary!  First off, these errors are not unique to the AS/400.
What's happening is that "use strict;" places certain restrictions
on the program for the purpose of weeding out common programming
errors.  Using "use strict;" is considered a good thing, and
forces you to use certain highly recommended things.  The one
thing it requires is that all variables be declared before use.
(That's the message you're getting over and over again.)  Declare
your names using the function "my".  At the beginning, add the
statement "my ($ip, $user, $pass);" and you'll eliminate the first
3 of your error messages.

Regarding -W, try coding -w instead.

(I'm not familiar with "use diagnostics", so I can't help there.)

Finally, the best place to start when debugging Perl programs
is the documentation.  To start with, check the FAQ at
<http://www.perl.com/pub/v/faqs/>.  When you've read everything
and you still can't get things working, check the newsgroup
comp.lang.perl.misc.  But I'll warn you, if they even suspect
you haven't read the FAQ, they may not be very helpful.  You're
expected to read the docs first before posting there.

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact [javascript protected email address].