C
Craig Manley
Hi all,
Please check out the code below that shows that when I iterate of an array
of values for use in a glob() function, then glob() returns an empty string
for every odd array index. This is really weird. I don't see how 'foreach'
and 'glob' can be connected here in any way. In all my years of Perl
programming, I've never come across a single Perl bug, so even though this
really does seem like a bug, perhaps I'm overlooking something. Perl version
is 5.8.0.
-bash-2.05b$ perl
use strict;
foreach my $value (1,2,3,4,5,6,7) {
my $filename = glob("~/var/util/import/cdr/$value.csv");
print "Value: $value\tFilename: $filename\n";
}
#### ctrl - D pressed here ###
Value: 1 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/1.csv
Value: 2 Filename:
Value: 3 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/3.csv
Value: 4 Filename:
Value: 5 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/5.csv
Value: 6 Filename:
Value: 7 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/7.csv
-bash-2.05b$
-Craig Manley
Please check out the code below that shows that when I iterate of an array
of values for use in a glob() function, then glob() returns an empty string
for every odd array index. This is really weird. I don't see how 'foreach'
and 'glob' can be connected here in any way. In all my years of Perl
programming, I've never come across a single Perl bug, so even though this
really does seem like a bug, perhaps I'm overlooking something. Perl version
is 5.8.0.
-bash-2.05b$ perl
use strict;
foreach my $value (1,2,3,4,5,6,7) {
my $filename = glob("~/var/util/import/cdr/$value.csv");
print "Value: $value\tFilename: $filename\n";
}
#### ctrl - D pressed here ###
Value: 1 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/1.csv
Value: 2 Filename:
Value: 3 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/3.csv
Value: 4 Filename:
Value: 5 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/5.csv
Value: 6 Filename:
Value: 7 Filename:
/var/www/html/vhosts/mijnbel/.//var/util/import/cdr/7.csv
-bash-2.05b$
-Craig Manley