I tried to perl -c your code, and resolved the immediate issue that cause the error message you mentioned:
C:\test>perl mlfimport.pl syntax error at mlfimport.pl line 55, near "if $hris " Global symbol "$lookup" requires explicit package name at mlfimport.pl + line 55. Execution of mlfimport.pl aborted due to compilation errors.
Here is what it should look like:
while (<$FILE1>) { foreach my $value (keys %lookup) { if ($hris [1] eq $lookup{$value}) { &print_entry($dn, $uid, $div, $loc); } } }
I didn't resolve everything for you, it is better for you to spend some effort.
You really should make your code tidy. Messy code does nothing other than confuse yourself, and make debug slower.
In reply to Re: Syntax and variable problems
by pg
in thread Syntax and variable problems
by contrite_newbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |