bruceleung2000
IS-IT--Management
Hello,
I have written a program to try to get wildcard from DOS command (under Windows XP), but it cannot do wildcard to get all files (ok1, ok2, .... ok9) but ok* or ok? - it WORKS under only unix and linux.
Does anybody help to tell me how to solve this problem ???
Thanks in advance !!!
Regards,
Bruce
------------------ command under DOS prompt ----
e.g. perl rm-alike.pl ok*
-------------- end ----------
------------ extract from rm-alike.pl ------------
while ($fname = $ARGV[$ctr]) {
print "ctr=[" ;
print $ctr ;
print "]\n" ;
print "fname=[" ;
print $fname ;
print "]\n" ;
$fname_arr[$ctr] = $fname;
print "fname_arr=[" ;
print $fname_arr[$ctr];
print "]\n" ;
$ctr = $ctr +1;
} # end while
---------------- end --------------------------------
----------------- output ---------------------
G:\Schedule_Jobs\perl>perl rm-alike.pl 'ok*'
ctr=[0]
fname=['ok*']
---------------- end -------------------
----------------- Version of my Perl -----
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
G:\Schedule_Jobs\perl>perl -v
This is perl, v5.8.6 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)
Binary build 811 provided by ActiveState Corp. ActiveState is a division of Sophos.
Built Dec 13 2004 09:52:01
------------- end -------------------------
I have written a program to try to get wildcard from DOS command (under Windows XP), but it cannot do wildcard to get all files (ok1, ok2, .... ok9) but ok* or ok? - it WORKS under only unix and linux.
Does anybody help to tell me how to solve this problem ???
Thanks in advance !!!
Regards,
Bruce
------------------ command under DOS prompt ----
e.g. perl rm-alike.pl ok*
-------------- end ----------
------------ extract from rm-alike.pl ------------
while ($fname = $ARGV[$ctr]) {
print "ctr=[" ;
print $ctr ;
print "]\n" ;
print "fname=[" ;
print $fname ;
print "]\n" ;
$fname_arr[$ctr] = $fname;
print "fname_arr=[" ;
print $fname_arr[$ctr];
print "]\n" ;
$ctr = $ctr +1;
} # end while
---------------- end --------------------------------
----------------- output ---------------------
G:\Schedule_Jobs\perl>perl rm-alike.pl 'ok*'
ctr=[0]
fname=['ok*']
---------------- end -------------------
----------------- Version of my Perl -----
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
G:\Schedule_Jobs\perl>perl -v
This is perl, v5.8.6 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)
Binary build 811 provided by ActiveState Corp. ActiveState is a division of Sophos.
Built Dec 13 2004 09:52:01
------------- end -------------------------