in reply to Skript help needed - RegEx & Hashes
@folders=glob("*"); #to get all folders in directory; extension ("*") +as wildcard to get all names foreach$folder(@folders) #to speak to each element in directory { next if ($folder!~/^UNITAS_/); #skip elements which do not start w +ith "UNITAS"
Because you are only interested in "folders" that begin with the string "UNITAS_" you can do that with glob:
# to get UNITAS_* folders in directory my @folders = glob "UNITAS_*"; # to speak to each element in directory foreach my $folder ( @folders ) {
$head=<TRF>; #remove the first four lines of the trf-table.txt + file $head=<TRF>; $head=<TRF>; $head=<TRF>;
You don't need a variable to do that:
undef = <TRF>; #remove the first four lines of the trf-table.t +xt file undef = <TRF>; undef = <TRF>; undef = <TRF>;
Or use a loop:
# remove the first four lines of the trf-table.txt file undef = <TRF> for 1 .. 4;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Skript help needed - RegEx & Hashes
by AnomalousMonk (Archbishop) on Oct 11, 2018 at 00:14 UTC |