Posted By: Keson (Keson) on 'CZunix'
Title:     Perl kviz
Date:      Thu Feb 15 10:23:03 2007

Mejme funkci

sub get_uniq_name {
        my ($log, $fn) = @_;
        
        my $fn_uniq = $fn . '.';
        
        # get uniq name
        for(my $i=0; $i<16; $i++) {
                $fn_uniq .= chr(97 + int(rand(26)));
                next if $i < 3;
                last unless -f $fn_uniq;
        }
        
        return $fn_uniq;
}

A otazka zni:
 Kolik toho ten clovek vypil?


                                              Keson
* * * * * * * * * * * * * 
  a stejne je hezky :-)
* * * * * * * * * * * * * 

Search the boards