SPUG: RE: Simple program - gone wrong

Parr, Ryan Ryan.Parr at wwireless.com
Wed Jul 10 11:21:09 CDT 2002


No one's ever told me I make things too simple :)

Instead of find -maxdepth 1 perhaps a simple ls ../*.htm? would be better?
That's from the command line of course. Programatically this definitely
*isn't* a good way to do it. It's so simple programatically that shelling
out is just a waste.

-- Ryan Parr

"I hate quotations." -- Ralph Waldo Emerson


-----Original Message-----
From: Richard Anderson [mailto:richard at richard-anderson.org] 
Sent: Tuesday, July 09, 2002 5:44 PM
To: David Dyck; Parr, Ryan
Cc: spug-list at pm.org
Subject: Re: SPUG: RE: Simple program - gone wrong


The find2perl program does not support the -maxdepth option because Perl was
developed on Unix and -maxdepth is not a valid option for the Unix find
command.  The GNU/Linux, OpenBSD, NetBSD and FreeBSD find commands
support -maxdepth.

When in doubt about what Unix/Linux/BSD command options are supported where,
check the man page multiplexer at http://www.freebsd.org/cgi/man.cgi  Of
course your Perl code will be more portable if you avoid running external
system command.

Cheers,
Richard
richard at richard-anderson.org
www.richard-anderson.org
www.raycosoft.com
----- Original Message -----
From: "David Dyck" <dcd at tc.fluke.com>
To: "Parr, Ryan" <Ryan.Parr at wwireless.com>
Cc: <spug-list at pm.org>
Sent: Tuesday, July 09, 2002 5:52 AM
Subject: RE: SPUG: RE: Simple program - gone wrong


> On Mon, 8 Jul 2002 at 21:58 -0700, Parr, Ryan <Ryan.Parr at wwireless.com>
wrote:
>
> > But perhaps what would be better is to do:
> > find .. -maxdepth 1 -type f -name "*.htm?" > output.txt
>
> Did anyone else notice that find2perl doesn't support -maxdepth (yet)?
>
>
>
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
>      Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org
>
>

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list