andrew Black wrote:
Roger Keane wrote:
IMO: prefer File::Find with a regex instead of globbing if you just
want to get the files from a directory tree.
I think you are right here. But there are 2 (at least) different
circumstances
- want to write a filter that takes one or more file (maybe
Roger Keane wrote:
IMO: prefer File::Find with a regex instead of globbing if you just
want to get the files from a directory tree.
I think you are right here. But there are 2 (at least) different
circumstances
- want to write a filter that takes one or more file (maybe STDIN)
and produce
, 2005 2:43 PM
To: perl-win32-users
Subject: Re: Globbing
Rahul Chauhan wrote:
andrew,
this should work.
#glob.pl
my @Files = glob *.c;
print @Files;
Thanks for the various replies. I have now got a further problem.
I am having trouble globbing files with spaces in them.
When I run the following
andrew Black wrote:
Rahul Chauhan wrote:
andrew,
this should work.
#glob.pl
my @Files = glob *.c;
print @Files;
Thanks for the various replies. I have now got a further problem.
I am having trouble globbing files with spaces in them.
When I run the following, I would like all
generalized solution would be a BEGIN block with something
like this in it :
BEGIN {
if ($^O =~ /Win32/i) {
use File::DosGlob;
my @argv;
foreach (@ARGV) {
# if wildcard chars and not using globbing shell
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
Rahul Chauhan wrote:
andrew,
this should work.
#glob.pl
my @Files = glob *.c;
print @Files;
Thanks for the various replies. I have now got a further problem.
I am having trouble globbing files with spaces in them.
When I run the following, I would like all files of type *.txt
my $wildfile = C
Dang, what's wrong with ur mail server. This is like copy 10 of this.
At 09:04 PM 4/11/05 -0500, Charles K. Clarkson wrote:
andrew Black wrote:
: $myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on
andrew Black wrote:
: $ myprog.pl *.html
:
: and the program is basically
: while ( )
: { do something }
:
: Is there a way of achieving the same on Win32, hopefully in
: a way that would still allow my script to run under Unix?
This works on my win XP box with 5.8.6.
Chris Wagner mailto:[EMAIL PROTECTED] wrote:
: Dang, what's wrong with ur mail server. This is like copy 10 of this.
I unsubscribed and I'm not sending email. All my other email is
received fine. It's only this list.
[shrug]
Charles K. Clarkson
--
Mobile Homes Specialist
254 968-8328
To: perl-win32-users
Subject: Re: Globbing
Rahul Chauhan wrote:
andrew,
this should work.
#glob.pl
my @Files = glob *.c;
print @Files;
Thanks for the various replies. I have now got a further problem.
I am having trouble globbing files with spaces in them.
When I run the following, I
In Unix, if you provide a list of wildcards on the command line, by the
time you program sees the list of files.
I have program that I call on Unix
$ myprog.pl *.html
and the program is basically
while ( )
{ do something }
Is there a way of achieving the same on Win32,
Andrew,
andrew Black wrote:
In Unix, if you provide a list of wildcards on the command line, by the
time you program sees the list of files.
I have program that I call on Unix
$myprog.pl *.html
and the program is basically
while ( )
{ do something}
Is there a way of achieving
PROTECTED]
[SMTP:[EMAIL PROTECTED] On Behalf Of
andrew Black
Sent: Monday, April 11, 2005 10:32 AM
To: perl-win32-users
Subject: Globbing
*** WARNING : This message originates from the Internet ***
In Unix, if you provide a list of wildcards on the command line, by the
time you program
andrew,
this should work.
#glob.pl
my @Files = glob *.c;
print @Files;
the idea is that you need to scheme it using the glob function.
cheers,
-Original Message-
From: andrew Black [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 3:02 PM
To: perl-win32-users
Subject: Globbing
- Original Message -
From: Tillman, James [EMAIL PROTECTED]
To: 'Conrad, Ben' [EMAIL PROTECTED]; Perl-Win32-Users
[EMAIL PROTECTED]
Sent: Wednesday, January 22, 2003 11:58
Subject: RE: Globbing speed
Sure:
* Don't use fileglobs, and open a dirhandle instead. You'll get results
Phil Ritchie wrote:
Thanks Ben. I was hoping to use the glob in combination with the '-n'
switch so that each file is opened but I can try to figure that out
myself. I suspect that at that point I may as well write a script and
execute it in the normal way.
Bill, I have no choice in the
22 matches
Mail list logo