Hi, I want to use perl and print time before and after sleep but not successful, can anyone advice?
#!/usr/bin/perl my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime time; my $timenow="$hour$min$sec"; print "It is now $timenow\n"; sleep 15; my $timelater="$hour$min$sec"; print "It is now $timelater\n"; Why the value of timelater is the same as timenow after sleep 15? How to print the value of time after sleep for 15? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/