in reply to arrays within arrays?
It turns out that you don't even need the array at all; the only place it ends up being used is in the loop control statement. See below.
hdp.#!/usr/local/bin/perl my $dir_split = '/opt/stats/data/split'; for $dir ($dir_split, map { $dir_split . "/vn$_" } 1..6) { opendir DIR, $dir or die $!; my @files = grep -f "$dir/$_", readdir DIR; # the chomp was unnecessary closedir DIR; chdir($dir); unlink @files or die $!; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: arrays within arrays?
by trowa (Acolyte) on Apr 26, 2001 at 03:49 UTC | |
by hdp (Beadle) on Apr 26, 2001 at 04:02 UTC |