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

Re^2:Sorting names using Regular Expressions and placing them in different Files.

by santhi (Monk)
on Dec 29, 2006 at 04:58 UTC ( [id://592169]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    chdir("test") ## For eg:test can be directory where the files exist. 
    unless (-d "BSD"){
    ...
    unless (-d "MCBTSSubsytem"){
        mkdir("MCBTSSubsytem") or warn ("unable to create directory MCBTSS
    +ubsytem");
    }
    
  2. or download this
    opendir(DIR, "test")
    @files_BSD = grep(/^BSD-\d{14}/, readdir(DIR));
    @files_SBSC = grep(/^SBSCSubsystem-\d{14}/, readdir(DIR));
    @files_MCBTS = grep(/^MCBTSSubsytem-\d{14}/, readdir(DIR));
    
  3. or download this
    foreach (@files_BSD){
    rename($_, "BSD/$_" );
    ...
    rename($_, "MCBTSSubsytem/$_");
    }
    

Log In?
Username:
Password:

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

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

    No recent polls found