in reply to Findout the day range of the current week

You can get the current weekday from localtime(), and it isn't hard to go backwards and forwards from there to the start / end of the week.

Code to follow...

use strict; use warnings; my $t = time(); $t -= $t % 86400; my $wday = (localtime($t))[6]; my $s = $t - 86400 * $wday; my $e = $t + 86400 * (7 - $wday) - 1; @_ = localtime($s); $_[4]++; $_[5] += 1900; print "$_[4]-$_[3]-$_[5] to "; @_ = localtime($e); $_[4]++; $_[5] += 1900; print "$_[4]-$_[3]-$_[5]";
EDIT: Changed code slightly so $s and $e have the min timestamp on the first day and the max timestamp on the last day, respectively. You can now use them to check if a timestamp is inside the range.