Thread View: comp.lang.perl.misc
4 messages
4 total messages
Started by Raj Rangarajan
Wed, 02 Oct 1996 00:00
Help!! What's wrong by doing it this way in perl?
Author: Raj Rangarajan
Date: Wed, 02 Oct 1996 00:00
Date: Wed, 02 Oct 1996 00:00
15 lines
1028 bytes
1028 bytes
Hi, I use the following command in perl to list all files in a directory including the ones in subdirectories: @files = `find $path -type f -print`; I know that the same can be accomplished by using the find2perl routine - I was just curious as the why the former was not used ? Is there anything that could potentially blow up by doing it the former way? Any help would be appreciated. Please post your replies her or mail them to raj@netcarta.com Thanks
Re: Help!! What's wrong by doing it this way in perl?
Author: Kevin Williams
Date: Thu, 03 Oct 1996 00:00
Date: Thu, 03 Oct 1996 00:00
28 lines
1600 bytes
1600 bytes
Raj Rangarajan wrote: > > Hi, > I use the following command in perl to list all files in a directory > including the ones in subdirectories: > > @files = `find $path -type f -print`; > > I know that the same can be accomplished by using the find2perl > routine - I was just curious as the why the former was not used ? Is there > anything that could potentially blow up by doing it the former way? Any help > would be appreciated. Please post your replies her or mail them to > raj@netcarta.com > > Thanks The big difference is that by using find.pl, you get to process each file as it is found, rather than waiting for the whole find command to finish and then going through each of the files. The other issue is that you end up storing a (potentially) huge array when you use the `find` method. Kevin
Re: Help!! What's wrong by doing it this way in perl?
Author: Alan Hirsch
Date: Fri, 04 Oct 1996 00:00
Date: Fri, 04 Oct 1996 00:00
8 lines
685 bytes
685 bytes
whats this doing being posted on ba.transportation? Alan Hirsch Ahirsch@best.com Palo Alto, CA 94303
Re: Help!! What's wrong by doing it this way in perl?
Author: Joseph N. Hall
Date: Sat, 05 Oct 1996 00:00
Date: Sat, 05 Oct 1996 00:00
17 lines
1349 bytes
1349 bytes
Alan Hirsch wrote: > > whats this doing being posted on ba.transportation? What's this doing being posted on comp.lang.perl.misc? -joseph -- 76% of all CGI questions posted in comp.lang.perl.misc are answered by: "CGI.pm. LWP. http://www.perl.com/CPAN/modules/01modules.index.html." .... Joseph N. Hall http://www.5sigma.com/joseph/ joseph@5sigma.com Proprietor, 5 Sigma Productions P.O. Box 6250 Chandler AZ 85246 Perl instruction (http://www.5sigma.com/perl/), C++/C/Perl software, web stuff, original music >>>Perl questions? mailto:perlq@5sigma.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads