Re: find2perl

2008-01-18 Thread Chas. Owens
On Jan 17, 2008 3:52 PM, oryann9 <[EMAIL PROTECTED]> wrote: snip > Will anyone help me with this issue? These three lines of code work, > but work in a way that I am not expecting. When I tell this module to set > no_chdir to 1 it should NOT descend directories yet it does. Am I > supposed to ha

Re: find2perl

2008-01-18 Thread joe blow
>> I am not a liar! I am a Christian Presumably, Christians don't lie. Is that it? Not to stir up the pot or anything... - Looking for last minute shopping deals? Find them fast with Yahoo! Search.

Re: find2perl

2008-01-17 Thread Tom Phoenix
On Jan 17, 2008 4:18 PM, oryann9 <[EMAIL PROTECTED]> wrote: > I am not a liar! I am a Christian and the only little help I have received is: If you don't see that the help you're being given is neither "only" nor "little", you're not paying attention. > P.S. Apologizes for not knowing I was supp

Re: find2perl

2008-01-17 Thread oryann9
Original Message From: Randal L. Schwartz <[EMAIL PROTECTED]> To: oryann9 <[EMAIL PROTECTED]> Cc: Perl List Sent: Thursday, January 17, 2008 7:04:40 PM Subject: Re: find2perl >>>>> "oryann9" == oryann9 <[EMAIL PROTECTED]> writes: oryan

Re: find2perl

2008-01-17 Thread Randal L. Schwartz
> "oryann9" == oryann9 <[EMAIL PROTECTED]> writes: oryann9> No one from perlmonks seems to know the answer either, likewise here. This is a lie. If you don't see that it's a lie, then no amount of answering in EITHER place will HELP you. Hire a programmer, please. -- Randal L. Schwartz -

Re: find2perl

2008-01-17 Thread oryann9
- Original Message From: Randal L. Schwartz <[EMAIL PROTECTED]> To: oryann9 <[EMAIL PROTECTED]> Sent: Thursday, January 17, 2008 6:39:35 PM Subject: Re: find2perl The following message is a courtesy copy of an article that has been posted to perl.beginners as well. &g

Re: find2perl

2008-01-17 Thread Randal L. Schwartz
> "oryann9" == oryann9 <[EMAIL PROTECTED]> writes: oryann9> Will anyone help me with this issue? These three lines of code work, oryann9> but work in a way that I am not expecting. Then you aren't reading the docs, or listening to anyone's help here. Not only that, you've been rude by repos

Re: find2perl

2008-01-17 Thread oryann9
- Will anyone help me with this issue? These three lines of code work, but work in a way that I am not expecting. When I tell this module to set no_chdir to 1 it should NOT descend directories yet it does. Am I supposed to have a wanted routine other than whats below? Below are the 3 lines I h

Re: find2perl

2008-01-16 Thread John W. Krahn
oryann9 wrote: Randal L. Schwartz - Stonehenge Consulting Services, Inc. You're misusing it. Set it within the wanted() routine when you're looking at a directory that you don't want to descend. It'll be cleared to 0 before calling wanted(), so setting it before calling find() is completely

Re: find2perl

2008-01-16 Thread oryann9
- Original Message From: oryann9 <[EMAIL PROTECTED]> To: beginners@perl.org Sent: Friday, January 11, 2008 2:32:11 PM Subject: Re: find2perl >You're misusing it. Set it within the wanted() routine when you're >looking at >a directory that you don't want

Re: find2perl

2008-01-11 Thread oryann9
>You're misusing it. Set it within the wanted() routine when you're >looking at >a directory that you don't want to descend. It'll be cleared to 0 >before >calling wanted(), so setting it before calling find() is completely >useless. >-- >Randal L. Schwartz - Stonehenge Consulting Services,

Re: find2perl

2008-01-09 Thread Tom Phoenix
On Jan 9, 2008 12:21 PM, oryann9 <[EMAIL PROTECTED]> quoted Randal Schwartz: > > You're misusing it. Set it within the wanted() routine when you're > Is this what you mean on line 9? I tried and it does not seem to work, > meaning it still descending. > > 1 sub find_me { > 2

Re: find2perl

2008-01-09 Thread oryann9
oryann9> No, but good point. My intent was to determine when -prune was set on oryann9> the CLI what the De-parsed code told me, 1==true, 0==false because oryann9> when I run this code below prune = 0 is not working, its descending oryann9> down "/". You're misusing it. Set it within the wan

Re: find2perl

2008-01-07 Thread Randal L. Schwartz
> "oryann9" == oryann9 <[EMAIL PROTECTED]> writes: oryann9> No, but good point. My intent was to determine when -prune was set on oryann9> the CLI what the De-parsed code told me, 1==true, 0==false because oryann9> when I run this code below prune = 0 is not working, its descending oryann9> d

Re: find2perl

2008-01-07 Thread oryann9
oryann9> $ find2perl /dirname -size +4092k -ls -prune Since -prune is *after* the condition of -size, you're setting prune only for VERY VERY LARGE directories. Is that your intent? -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[EMAIL PROTECTED]> http://www.st

Re: find2perl

2008-01-07 Thread Randal L. Schwartz
> "oryann9" == oryann9 <[EMAIL PROTECTED]> writes: oryann9> $ find2perl /dirname -size +4092k -ls -prune Since -prune is *after* the condition of -size, you're setting prune only for VERY VERY LARGE directories. Is that your intent? -- Randal L. Schwartz - Stonehenge Consulting Services,

Re: find2perl output to array

2007-06-20 Thread Randal L. Schwartz
> "Matt" == Matt <[EMAIL PROTECTED]> writes: Matt> #!/usr/bin/perl use File::Finder; # in the CPAN Matt> $cuid = "aef"; Matt> $directory = "EOM033107"; Matt> $smallcuid = lc $cuid; my @result = File::Finder->type('f')->name(qr/^DATA.*\.zip\z/)->in( '/home/ftpuser/'.$smallcuid.'/flexvaul

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, > Ahh, very good. Thanks Rob (and Martin from earlier). I think I > understand now. It calls the wanted sub routine, populates the @files > array for each iteration. Then when that completes the contents of the > array @files are printed. . .? > > Matt > you're right, Matt. the name

Re: find2perl output to array

2007-06-19 Thread Matt
Rob Dixon wrote: Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Martin Barth wrote: Hi Matt, I did that, and then at the bottom of the script I tried looping through just to verify that @files was populated - no dice. (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, name; What have I do

Re: find2perl output to array

2007-06-19 Thread Rob Dixon
Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi Matt, > I did that, and then at the bottom of the script I tried looping through > just to verify that @files was populated - no dice. > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, name; > What have I done wrong? push @files, $name;

Re: find2perl output to array

2007-06-19 Thread Matt
Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, $name; at the end you have all f

Re: find2perl output to array

2007-06-19 Thread Martin Barth
Hi, change following line: > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && print("$name\n"); to > (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && > /^DATA.*\.zip\z/s && push @files, $name; at the end you have all files in the @files ar

Re: find2perl

2003-01-14 Thread Mark Goland
You need tp pass starting directory to argument to your program "prog.pl c:\" might also consider ... > #!/bin/perl > > use strict; > use Cwd; > > my ($startpath, $cwd, $startat, $list); > > $startpath = $ARGV[0]; > $cwd = getcwd(); > > chdir $startpath; > $startpath = getcwd(); > > sub godown($@

Re: find2perl

2001-07-30 Thread Michael Fowler
On Mon, Jul 30, 2001 at 01:50:55PM -0700, Greg Tomczyk wrote: > Anyone have any ideas? maybe find2perl is not the answer; I do not know.. find2perl is exactly what you want. It takes a command line as you'd give it to find and converts it into Perl. You can then take this code and use it direct

Re: find2perl

2001-07-30 Thread Brett W. McCoy
On Mon, 30 Jul 2001, Greg Tomczyk wrote: > I am new to this list and hope someone, will be able to help me. I am > trying to do a find/search on a directory tree and store the results of > that find into an array which I can then manipulate. I can run find using > the system command an put conten