Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Fetching date

by tcf22 (Priest)
on Jan 21, 2004 at 16:11 UTC ( [id://322923]=note: print w/replies, xml ) Need Help??


in reply to Fetching date

Do you want to capture the information like this:
my $date = 'Jan 21 00:41'; my ($mon, $day, $hour, $min) = $date =~ /(\w+)\s(\d+)\s(\d+):(\d+)/; foreach($mon, $day, $hour, $min){ print "$_\n"; }
or do you just want to match it, in which case this should work
$datehit =~ /(\w+\s\d{2}\s\d{2}\:\d{2})/;

- Tom

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://322923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2024-04-25 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found