#!/usr/bin/perl
=begin metadata
Name: sleep
Description: suspend execution for a number of seconds
Author: Randy Yarger, randy.yarger@nextel.com
License: perl
=end metadata
=cut
use strict;
my ($VERSION) = '1.202';
if (@ARGV) {
if ($ARGV [0] eq '-?') {
$0 =~ s{.*/}{};
print <<EOF;
Usage: $0 seconds
Sleep for the given number of seconds.
Options:
-?: Print usage, then exit.
EOF
} elsif ($ARGV[0] =~ /^\d+$/) {
sleep $ARGV[0];
} else {
warn "$0: invalid time interval\n";
exit 1;
}
} else {
warn "$0: missing operand\n";
exit 1;
}
exit;
__END__
=pod
=head1 NAME
sleep - suspend execution for a number of seconds
=head1 SYNOPSIS
sleep I<seconds>
=head1 DESCRIPTION
I<true> exits succesfully. I<false> exits unsuccesfully.
=head2 OPTIONS
I<sleep> accepts the following options:
=over 4
=item -?
Print out a short help message, then exit.
=back
=head1 ENVIRONMENT
The working of I<sleep> is not influenced by any environment variables.
=head1 BUGS
I<sleep> has no known bugs.
=head1 AUTHOR
The Perl implementation of I<sleep>
was written by Randy Yarger, I<randy.yarger@nextel.com>.
=head1 COPYRIGHT and LICENSE
This program is copyright by Randy Yarger 1999.
This program is free and open software. You may use, modify, distribute
and sell this program (and any modified variants) in any way you wish,
provided you do not restrict others to do the same.
=cut