Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Sort on Number Embedded in String

by ww (Archbishop)
on Mar 23, 2005 at 15:51 UTC ( [id://441803]=note: print w/replies, xml ) Need Help??


in reply to Sort on Number Embedded in String

Possible typo or cut'n'paste error in the snippet (or, some transformation not mentioned), but as shown, the initial match,
$_ =~ /fwlogsum\.(\d+)\w+/;
does not match on anything in the data.

try:
$_ =~ /fwlog\.(\d+)\w+/;
instead... and then note that (unless you can guarantee that the data will never contain more than one month) this node is not helpful in the sense of providing a safe approach for production use.

There are MANY good suggestions re parsing dates above.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-03-29 15:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found