On Mon, Jan 23, 2006 at 09:47:40PM +0100, hien wrote: > i am trying to check if there are any files named file* (e.g. > file_001.txt file1.doc) in my directory.
#!/usr/bin/perl use warnings; use strict; my $i = 0; while (</home/yourlogin/file*>) { if (-e $_) { print "$_ exists\n"; $i++; } } print "there are $i files\n"; hth -- GĂ©rard -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>