Win95 glob for filenames returns values but not into array 
Author Message
 Win95 glob for filenames returns values but not into array

Hi

I'm trying to read a list of filenames into an array (pretty basic,
huh?) but can't seem to get it working.

I am running Windows95 using Perl for Win32 (build315).

I've checked and I have perlglob in my $PATH.

Here's my directory listing:

C:\xfer\cnt>dir *.tst
ZERO     TST             1  21/03/98  19:12 zero.tst
         1 file(s)              1 bytes
         0 dir(s)   1,012,301,824 bytes free

Here's my Perl:


print "debug number of elements is $items \n";
print "debug #1 is \"$counters[0]\" \n";
exit(0);

Here's the output:

C:\xfer\cnt>perl counters
zero.tst debug number of elements is 0
debug #1 is ""
C:\xfer\cnt>

Basically it looks as if the glob command is returning output because
i can see it on the screen (and when more files match they all

Are there any known probs in this area?

Thanks,
Jeremy



Wed, 06 Sep 2000 03:00:00 GMT  
 Win95 glob for filenames returns values but not into array

Quote:

>Hi

<snip>

Quote:
>Here's my Perl:



>print "debug number of elements is $items \n";
>print "debug #1 is \"$counters[0]\" \n";
>exit(0);

>Here's the output:

>C:\xfer\cnt>perl counters
>zero.tst debug number of elements is 0
>debug #1 is ""
>C:\xfer\cnt>

Rather odd. When I run the same script (checking my \perl5\bin folder for
"log" files) I get what I expected to see:

debug number of elements is 1
debug #1 is "install.log"

So why is "zero.tst" appearing on your output line? The fact that it's
printing may be a clue as to why this is happening.

--- Creede Lambard
Minister of Irregular Expressions
Programming Republic of Perl



Thu, 07 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. -e glob $filename returns true and false in identical cases

2. Using glob() w/WinNT vs. glob() w/Win95

3. Log.pm did not return a true value

4. Newbie: nags_config.pl did not return a true value

5. Help! .pm did not return a true value

6. DBD::Oracle, not getting return values

7. Log.pm did not return a true value

8. Variable not returning values

9. values() does not return LValues

10. Return the highest value from an array

11. Getting one element of array return value

12. Return value from an associative array

 

 
Powered by phpBB® Forum Software