in reply to Subroutine does not sleep
change
to
As in this scalar context $time is being set to the size of @_ (i.e. 1) instead of the value.
This is not a Signature...
sub wait{ my $time =@_; sleep $time; }
to
sub wait{ my ($time) =@_; sleep $time; }
As in this scalar context $time is being set to the size of @_ (i.e. 1) instead of the value.
This is not a Signature...
In Section
Seekers of Perl Wisdom