Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    if ($date =~ m/^(\w{3}\s+\w{3}\s+\d+)/) {
        print "Matched $1\n";
    }
    
  2. or download this
    my $date= 'Sun Apr 1 10:27:03 CDT 2001';
    my ($weekday, $month, $day) = split " ", $date;
    
    print "$weekday $month $day\n";