Z
Zoran
Hello guys,some things in my code are happening,which I don't
understand.I am trying to open different directories and to load a
bunch of files.But this don't work.
It is all fine,when I am working in my home directoy.But if I change
it the glob-function don't work.
Here is the code:
#!/usr/local/bin/perl -w
print "\nHi please tell me your directory!\n";
chomp ($directory = <STDIN>);
print "\nOK now tell me the glob name!\n";
chomp ($opname = <STDIN>);
print "\nWorking ... \n";
###########################
if (!opendir VH,$directory)
{
print "\nThe directory $directory was not found !!\n";
return;}
print "\nEnter 2 \n";
$MJJ=-1;
foreach $datei (readdir VH){
$MJJ=$MJJ+1;
$files[$MJJ]=$datei;
print "$files[$MJJ]\n";
}
print "\n@files \n";
@files=glob "*$opname*";
print "\n$opname \n";
print "\nEnter 3 \n";
print "\n@files \n";
understand.I am trying to open different directories and to load a
bunch of files.But this don't work.
It is all fine,when I am working in my home directoy.But if I change
it the glob-function don't work.
Here is the code:
#!/usr/local/bin/perl -w
print "\nHi please tell me your directory!\n";
chomp ($directory = <STDIN>);
print "\nOK now tell me the glob name!\n";
chomp ($opname = <STDIN>);
print "\nWorking ... \n";
###########################
if (!opendir VH,$directory)
{
print "\nThe directory $directory was not found !!\n";
return;}
print "\nEnter 2 \n";
$MJJ=-1;
foreach $datei (readdir VH){
$MJJ=$MJJ+1;
$files[$MJJ]=$datei;
print "$files[$MJJ]\n";
}
print "\n@files \n";
@files=glob "*$opname*";
print "\n$opname \n";
print "\nEnter 3 \n";
print "\n@files \n";