two thoughts....
I'd imagine the path to the command 'ls' is unknown. Try the full command
path for the command.
e.g. '/bin/ls'
Prossibly a better way to write the code...
my $imagedir="/home/me/images";
chdir($imagedir) or die "Can't cd to $imagedir; $!\n";
my @jpegs = <*.jpg>;
foreach (@jpegs) {
....
}
-----Original Message-----
From: mel awaisi [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 8:43 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: ls: *.jpg: No such file or directory
Hi
My error is as the subject says, i have a script that i am trying in it to
locate where a directory with images are.
the part in the script that the error i think is arising from is
my $dir = '/home/me/images/';
my @jpegs = `ls *.jpg`;
foreach (@jpegs) {
print"$_"; # dont forget that a newline is still at the end of each
element in the array...
}
------------------------
ls: *.jpg: No such file or directory
-----------------------
Regards,
Mel
_________________________________________________________________
Chat online in real time with MSN Messenger http://messenger.msn.co.uk