Jeff Westman wrote: > > I inherited this script, whose code is as follows: > > #!/usr/local/bin/perl -w > ... > # 'while' starts on line 42 > while (($app_key, $app_value) = each %app_file_count) { > delete ($app_file_count{$app_key});e > } > > What is the "hanging 'e' on line 43? It is not a subroutine call, and there > is no terminating semi-colon (';'). Yet, when I do a syntax check, I get: > > $ perl -c myscript.pl > Unquoted string "e" may clash with future reserved word at my line 44. > Useless use of a constant in void context at my line 43. > myscript.pl syntax OK > > I'm confused why this is passing a syntax check. This script runs in > production (without the warning flag).
Because the "syntax" is correct. Semicolons are used to separate statements so having a statement at the end of a block with no trailing semicolon is valid Perl syntax. By the way, if you want to remove all the keys from a hash it is simpler to do: %app_file_count = (); John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]