First, I am just trying to get them and print the array created. Afterwards, when this works I'll do more things with the data in them included, but for now I can't get though with the first objective :-/
When I execute the program it makes NOTHING!!! At least, that's what it seems...
I know its not a very good code, but it's my first one! :-D
Can anybody give some advice about where's the bug?
Thanks in advance.
#!perl> die "no es pot llegir el directori: $!\n";
use strict;
use warnings;
my $program;
my @filenames;
opendir (FITXER,"c:/documents and settings/administrador/escritorio/pepes") or
@noms = readdir (FITXER) or die "no es poden agafar els noms dels fitxers \n"; foreach $program (@noms) { if ($program =~ m/^pepe-1_(\d[8])\.txt$/) { ### do stuff, given a filename print "$program \n"; } elsif( $program =~ m/^pepe-2_(\d[8])\.txt$/) { ### do stuff, given a filename print $program <stdout>; } };
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]