#!/usr/bin/perl use warnings; use strict; use Data::Dumper; opendir(DIR, '.'); my @files = grep !/^\.{1,2}$/, readdir DIR; my @files8 = grep /08/, @files; my @files9 = grep /09/, @files; closedir DIR; print "@files\n"; my %commands; #maybe use a hash print "08 files\n"; foreach my $file (@files8){ $commands{'08'}{$file} = `ls -l|grep $file` } print "09 files\n"; foreach my $file (@files9){ $commands{'09'}{$file} = `ls -l|grep $file` } print Dumper([\%commands]);
In reply to Re^3: Array problem......PLEASE HELP!
by zentara
in thread Array problem......PLEASE HELP!
by green_lakers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |