Good Day

 

Could some one please tell me what is wrong with this foreach and how to fix this.  The error I am getting is "Can't us "my $a" in sort comparison"

 

    foreach (sort {$hash{$a} <=> $hash{$b}} keys %hash)

    {

        print "$date\,$hour\,$min\,";

        print OP "$date\,$hour\:$min\,";

        print "[", $hash{"$_"},"]\,$_\n";

        print OP "[", $hash{"$_"},"]\,$_\n";

    }      

 

Ronald Mundell

Email: [EMAIL PROTECTED]

Cell: 0834111107

Phone: 011-8813751

 


This email and any accompanying attachments may contain confidential and proprietary information.  This information is private and protected by law and, accordingly, if you are not the intended recipient, you are requested to delete this entire communication immediately and are notified that any disclosure, copying or distribution of or taking any action based on this information is prohibited.

Emails cannot be guaranteed to be secure or free of errors or viruses.  The sender does not accept any liability or responsibility for any interception, corruption, destruction, loss, late arrival or incompleteness of or tampering or interference with any of the information contained in this email or for its incorrect delivery or non-delivery for whatsoever reason or for its effect on any electronic device of the recipient.

If verification of this email or any attachment is required, please request a hard-copy version.


Reply via email to