Gossamer Forum
Home : Products : DBMan : Customization :

Perl question re: default.cfg

Quote Reply
Perl question re: default.cfg
I'm learning Perl. Could someone explain this default.cfg (aka db.cfg) code fragment to me? It's located near the very end of the default.cfg module of Dbman.

foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) { ...<action>...

I'm particularly clueless about the function of the "{ $db_def{$a}[0] <=> $db_def{$b}[0] }" portion. How are {$a} and {$b} used?

Thanks. Jim



Subject Author Views Date
Thread Perl question re: default.cfg Jim C 1311 Jul 12, 1999, 1:42 PM
Post Re: Perl question re: default.cfg
JPDeni 1241 Jul 12, 1999, 1:56 PM