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
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
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
!=
"..") ){
> &godown ("$startat/$f") if -d "$startat/$f"
> }
> chdir $cwd;
> }
> }
- Original Message -
From: "Anthony Kong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday,
>>>>> "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
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
> "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
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
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
>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,
- 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
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
-
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
- 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
> "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
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
> "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 -
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
>> 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.
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
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 {} |;
>
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
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
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
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
& 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:
&
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
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;
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
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
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;
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
> "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
33 matches
Mail list logo