find2perl

2003-01-14 Thread Anthony Kong
Hi, all, I have used find2perl to generate a perl script. Upon execution it gives these message: Use of uninitialized value in chdir at test.pl line 52. Use of chdir('') or chdir(undef) as chdir() is deprecated at test.pl line 52. This find2perl comes with perl 5.8. Then I want

find2perl

2008-01-07 Thread oryann9
In find2perl, prune is set to 1 for true as in DO NOT desend dirs? From the man page "-prune" Do not descend into the directory currently matched. Likewise for File::Find prune set to 1? $ find2perl /dirname -size +4092k -ls -prune

find2perl

2001-07-30 Thread Greg Tomczyk
understand this find2perl routing. I know find pretty well, but the documentation on find2perl is confusing to me. Can anyone help.. Here is the Unix find command: find $dir -local -exec grep -q $string {} |; and I would like some sort of perl equivalent which would allow the results of this

Re: find2perl

2003-01-14 Thread Mark Goland
!= "..") ){ > &godown ("$startat/$f") if -d "$startat/$f" > } > chdir $cwd; > } > } - Original Message - From: "Anthony Kong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday,

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. Sc

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 PROTE

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-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-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-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-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-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-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-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
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 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-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-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

2001-07-30 Thread Brett W. McCoy
mmand an put contents into a flat file, but I would like to > understand this find2perl routing. I know find pretty well, but the > documentation on find2perl is confusing to me. Can anyone help.. > > Here is the Unix find command: > > find $dir -local -exec grep -q $string {} |; >

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 an

Use of find2perl utility

2005-09-06 Thread Sastry
Hi The perl document says that with the use of find2perl, "the resulting code is typically faster than running find itself" 1) Can you tell me how it is? 2) Does it provide all the functionalities that normal 'find' utility provided in bash/korne shell? Thanks in advance Ravi Sastry

find2perl output to array

2007-06-19 Thread Matt
Using the find2perl utility how would I send the output to an array? By default it will print out the results like: /home/ftpuser/aef/flexvault/EOM033107/DATAAG.zip /home/ftpuser/aef/flexvault/EOM033107/DATAHZ.zip I'd like those lines to be put into an array instead of printed to stdou

find2perl; File::Find attempt

2001-04-26 Thread McCormick, Rob E
gang, If I'm tackling too much for a beginner, I realize you're not in the business of doing someone else's work. Here goes: I'm attempting to use find2perl using Binary build 522 provided by ActiveState Tool Corp. http://www.ActiveState.com Built 09:52:28 Nov 2 1999 p

Re: find2perl output to array

2007-06-19 Thread Martin Barth
& push @files, $name; at the end you have all files in the @files array. HTH Martin On Tue, 19 Jun 2007 06:34:33 -0600 Matt <[EMAIL PROTECTED]> wrote: > Using the find2perl utility how would I send the output to an array? By > default it will print out the results like: &

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 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 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 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 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 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-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