in reply to Syntax and variable problems

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.

Replies are listed 'Best First'.
Re^2: Syntax and variable problems
by contrite_newbie (Novice) on Oct 08, 2004 at 04:09 UTC
    Thanks for the help. Time to soldier on