Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Sort on Number Embedded in String

by ww (Archbishop)
on Mar 23, 2005 at 15:51 UTC ( #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
Node Status?
node history
Node Type: note [id://441803]
help
Chatterbox?
[nettop]: need to hire a PERL programmer

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2018-04-20 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?