#User;LoginName;FullName;Description;Password;Profile;DefaultLibrary;S +tate $cfg[0] = "User;$line[2];$line[1];Default account for $line[1];$line[3 +];VIEWER;;"; #Acl;Name;Description;Users $cfg[1] = "Acl;$line[1];Default access list for $line[1];$line[2]#Supp +ort"; #Folder;Name;Description;Scope;Reports;Owner;Parent $cfg[2] = "Folder;$line[1];Default folder for $line[2];$line[1];;admin +istrator;/Customer_SLA";
Then I wrote script which open source csv file push each it line into @file. Then I need something like this:
So in @topol should be for each line of source csv file, three lines for each line of config. But, sure, this doesn't work because I can't use perlfunc:require by this way. (only for first pass are variables filled from @line array) This is only "non working example" :-))) of what I need. There is only one condition: config must simple, even for non Perl users. I can use regex to replace some marks by values but I am sure, that easier way must exist.foreach $line (@file) { @line = split(/;/,$line); require "account.cfg"; print $cfg[0]; foreach $cfg ( @cfg ) { push( @topol, $line[0].";".$cfg ); } }
I am sure that there is way, but I am so stupid to find it. :-) And what about you? Thanks
Li Tin O've Weedle
mad Tsort's philosopher
In reply to easy config file by LiTinOveWeedle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |