At 01:35 PM 07/25/2001 -0700, David Freeman wrote:
>
>
>I modified the script to reflect what was suggested to me earlier, and now
>when i run it, i receive errors telling me i'm missing something at line 11
>regarding global symbols for my variables?
>
>#!/usr/bin/perl -w
>#Script to add e-mail address or domain name to /etc/mail/access file
>#if it was not already listed.
>
>use strict;
>#use warnings;
>
>
>open(NAMES,"/etc/mail/access") || die "Can't open access: $!\n";
>while (<NAMES>){
> ( $email, $action )= split(/\t/);
You need to declare your variable scope using 'my'. The strict pragma
spanks you if you use global variables without specifically intending it:
my($email, action)
Aloha,
mel
--
mel matsuoka Hawaiian Image Productions
Chief Executive Alphageek (vox)1.808.531.5474
[EMAIL PROTECTED] (fax)1.808.526.4040
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]