Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Fetching date

by tcf22 (Priest)
on Jan 21, 2004 at 16:11 UTC ( #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
Node Status?
node history
Node Type: note [id://322923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2020-06-02 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (13 votes). Check out past polls.

    Notices?