From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > New to perl (old to Ada, C, C++, COBOL, .....) ....I'm looking at some > existing code. > > read_config ('../config/legacyload.cfg', %ConfigFile); > @TablePreReq = keys(%ConfigFile{InputDataFile}); > > > When I run it I get the error (v. 5.8.4): > > syntax error at cutover.pl line 318, near "%ConfigFile > {InputDataFile" > > I can't find any declaration of any of the entities referenced above. > I was wondering if someone could give me some hint as to what the > problem might be.
Most likely the second line should look like this: @TablePreReq = keys(%{$ConfigFile{InputDataFile}}); that is we expect the $ConfigFile{InputDataFile} to be a reference to a hash so we dereference it and then get the list of keys. it looks to me like the first line also needs to be changed. I'd expect it to be read_config ('../config/legacyload.cfg', \%ConfigFile); to pass a reference to the hash. Though it's hard to be sure since we do not know what module defined the read_config() function. It might be using prototypes to allow you to call it like you did, but it looks unlikely to me. HTH, Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/