[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

[PERL] Split fil/bibliotek og opret bib



Mit første PERL-projekt:
et bibliotek indeholder et antal filer, der navngivet således:
!xxx-yyy-zzz-ppp.txt

'-' er rent faktisk path-separatoren fra den maskine filerne kommer fra.
(De er ftp-et over på min Linux-box). Dybden af biblioteksstrukturen
varierer fra fil til fil.
Nu vil jeg gerne genskabe den oprindelige biblioteksstruktur, således
at filen i eksemplet kommer til at ligge i ../xxx/yyy/zzz og hedde ppp.txt


Jeg har fundet ud af at iterere mig genne alle filerne (med glob) og
jeg kan osse sagtens erstatte '-' med '/'.
File::Basename kan splitte fil og biblioteksnavn, så de havner i
hver sin variabel.
Problemet er at jeg ikke lige kan finde en smart måde at bruge output
fra dirname til at oprette biblioteksstrukturen! Jeg føler mig overbevist om at det ikke er nogen stor opgave, samt at den rent faktisk allerede er løst. Jeg kan bare ikke hitte løsingen..


--
Erlo
----------
Mine skriverier udtrykker ikke nødvendigvis
min arbejdsgivers mening


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:43 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *