Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: sorting files

by psini (Deacon)
on May 29, 2008 at 14:37 UTC ( [id://689026]=note: print w/replies, xml ) Need Help??


in reply to sorting files

It could be ok, it depends on what you are expecting it to do...

As you have written you are extracting only the "02" part of the filename in $first_number and the "20061022" part in $second_number. I don't really believe it is what you meant to do :)

Please better explain what you are trying: in the example filename there are 4 numeric parts and you should at least decide the order of precedence between them (which are to be sort before). Secondly, if the format of the string is known (length of the numeric parts, for instance) there could be efficient ways than in the generic case.

Rule One: Do not act incautiously when confronting a little bald wrinkly smiling man.

Log In?
Username:
Password:

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

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

    No recent polls found