[mythtv-users] Backup and restore utility - sort bug?

Jerome Yuzyk jerome at supernet.ab.ca
Sun Oct 19 17:43:23 UTC 2008

On Sunday 19 October 2008 11:38, Mike Holden wrote:
> Been trying to use the tool wiki-ed at
> http://www.mythtv.org/wiki/index.php/Database_Backup_and_Restore and while
> the utility for restore works in principle, it doesn't seem to pick the
> most recent file for restore.
> It looks to me like a bug in the sort, where $0 should be $a, ie replace
>     my @sorted_files = sort { lc($b) cmp lc($0) } @files;
> with
>     my @sorted_files = sort { lc($b) cmp lc($a) } @files;
> I can't find any reference to what $0 is supposed to do in Perl sort, but
> maybe I've missed something?

$0 is the name of the current script, so for sure it is wrong. $a should be 

A little of Jerome's MythTV World: http://mythtv.bss.ab.ca

More information about the mythtv-users mailing list