programming-examples/perl/SystemFunction/srand function.pl

14 lines
281 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/bin/perl
use warnings;
use strict;
use subs qw(srand);
sub srand {
if ($] >= 5.004 and not @_) {
warn "Unqualified call to srand redundant in Perl $]";
} else {
# call the real srand via the CORE package
CORE::srand @_;
}
}