Advertisement
Guest User

GarciaPL

a guest
Apr 25th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.27 KB | None | 0 0
  1. my @day_of_week = ('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday');
  2.  
  3. sub check_business_day {
  4.     my ($name_of_day) = @_;
  5.     if ( grep( /^$name_of_day$/, @day_of_week ) ) {
  6.         return 1;
  7.     } else {
  8.         return 0;
  9.     }
  10. }
  11.  
  12. check_business_day($date_time->day_name());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement