[32064] in Perl-Users-Digest
Perl-Users Digest, Issue: 3328 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 23 00:09:40 2011
Date: Tue, 22 Mar 2011 21:09:16 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 22 Mar 2011 Volume: 11 Number: 3328
Today's topics:
Re: "getting" a website <Uno@example.invalid>
Re: "getting" a website <Uno@example.invalid>
Re: "getting" a website <uri@StemSystems.com>
Re: "getting" a website (Randal L. Schwartz)
Re: "getting" a website <Uno@example.invalid>
Re: "getting" a website <Uno@example.invalid>
Re: "getting" a website <uri@StemSystems.com>
Re: Data::Dumper vs. UTF-8, as usual <xhoster@gmail.com>
Re: Data::Dumper vs. UTF-8, as usual <nospam-abuse@ilyaz.org>
Data::Dumper vs. UTF-8 jidanni@jidanni.org
File::Slurp 9999.14 is released <uri@StemSystems.com>
Re: How to pass arguments to perl <cartercc@gmail.com>
Re: How to pass arguments to perl <moonhkt@gmail.com>
Re: Parsing some pdf files failed <*@eli.users.panix.com>
using File::Find <Uno@example.invalid>
Re: using File::Find (Randal L. Schwartz)
Re: using File::Find <Uno@example.invalid>
Re: using File::Find (Randal L. Schwartz)
Re: using File::Find <jurgenex@hotmail.com>
Re: using File::Find <tadmc@seesig.invalid>
Re: using File::Find (Randal L. Schwartz)
Re: using File::Find <Uno@example.invalid>
Re: using File::Find <Uno@example.invalid>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 22 Mar 2011 18:42:04 -0600
From: Uno <Uno@example.invalid>
Subject: Re: "getting" a website
Message-Id: <8ustutF6erU1@mid.individual.net>
On 03/18/2011 06:54 AM, Jürgen Exner wrote:
> Uno<Uno@example.invalid> wrote:
>> On 03/10/2011 04:24 AM, Jürgen Exner wrote:
>>> perldoc perlretut
>>
>>
>> $ perldoc perlretut
>> You need to install the perl-doc package to use this program.
>
> Well, then why don't you tell the adminstrator of your system that he
> didn't finish his job?
He finally did. He just also happens to be my maid, mechanic, chef, and
stunt double.:)
I thought I was ahead of the curve to be able to get around using the f
and b keys:
"cats and dogs" =~ /cat|dog|bird/; # matches "cat"
"cats and dogs" =~ /dog|cat|bird/; # matches "cat"
Interesting. Might a person call the alternating operator "idempotent?"
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 18:50:15 -0600
From: Uno <Uno@example.invalid>
Subject: Re: "getting" a website
Message-Id: <8usue8F9eoU1@mid.individual.net>
On 03/18/2011 06:00 AM, Tad McClellan wrote:
> Uno<Uno@example.invalid> wrote:
>> On 03/10/2011 06:35 AM, Tad McClellan wrote:
> ^^^^^^^^^^^^^^^^^^^
>>
>> [re-ordered, for thematic reasons}
>
>
> I did NOT write that...
I did, and wish I had edited differently. Apparently I was surprised
that $_ was giving me the whole line instead of only what I was matching
against.
Well of course it does. It was my first rodeo writing a control with a
match in it.
<snip>
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 21:17:04 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: "getting" a website
Message-Id: <8762razldb.fsf@quad.sysarch.com>
>>>>> "U" == Uno <Uno@example.invalid> writes:
U> "cats and dogs" =~ /cat|dog|bird/; # matches "cat"
U> "cats and dogs" =~ /dog|cat|bird/; # matches "cat"
U> Interesting. Might a person call the alternating operator "idempotent?"
not interesting. you don't get the ordering. a regex scans the data and
then tries to match it in the regex. cat will always match first since
it is first in the string.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Tue, 22 Mar 2011 18:18:32 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: "getting" a website
Message-Id: <86lj067hxz.fsf@red.stonehenge.com>
>>>>> "Uno" == Uno <Uno@example.invalid> writes:
Uno> "cats and dogs" =~ /cat|dog|bird/; # matches "cat"
Uno> "cats and dogs" =~ /dog|cat|bird/; # matches "cat"
The matches are tried from left to right, at a starting position that
goes left to right.
Try this instead to see the difference:
"cats dogs" =~ /dog|cat|cats/;
"cats dogs" =~ /dog|cats|cat/;
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
------------------------------
Date: Tue, 22 Mar 2011 19:36:56 -0600
From: Uno <Uno@example.invalid>
Subject: Re: "getting" a website
Message-Id: <8ut15pFptfU1@mid.individual.net>
On 03/18/2011 02:45 AM, Uno wrote:
[big snip]
Had I made better editing choices I would simply have posted what I had
here:
> success is 200
> http://www.germanresistance.com/documents/GermanResistanceV2.zip
> success is 200
> $ cat gurl9.pl
> #!/usr/bin/perl -w
> # gurl - get content from an url
>
> use LWP::Simple;
> require HTML::TokeParser;
>
> my $file = "bonhoeffer2";
> my $URL = 'http://germanresistance.com/index-of-papers/';
>
>
> my $p = HTML::TokeParser->new(bonhoeffer2);
>
>
> while (my $token = $p->get_tag("a")) {
> my $url = $token->[1]{href} || "-";
> if ($url =~ "http://www.germanresistance.com/documents.*(pdf|zip)" ) {
> print "$url\n";
>
> my $success = getstore( $url, "/pdfs/$url" );
> print "success is $success\n";
> }
> }
>
> So why am I told that 200 is my success when I have none?
200 OK
Standard response for successful HTTP requests. The actual response
will depend on the request method used. In a GET request, the response
will contain an entity corresponding to the requested resource. In a
POST request the response will contain an entity describing or
containing the result of the action.[2]
getstore($url, $file)
Gets a document identified by a URL and stores it in the file. The
return value is the HTTP response code.
So I was able to track down the loose ends here and get this squared away:
$ perl gurl9.pl
http://www.germanresistance.com/documents/Intro_to_Bonhoeffer.pdf
Intro_to_Bonhoeffer.pdf
success is 200
...
http://www.germanresistance.com/documents/GermanResistanceV2.zip
GermanResistanceV2.zip
success is 200
$ cd pdfs
$ ls
Agent_of_Grace.pdf
Bonhoeffer_on_Abortion.pdf
Chronology_of_the_life_of_Dietrich_Bonhoeffer.pdf
Dietrich_Bonhoeffer_and_Canossa.pdf
Dietrich_Bonhoeffer_and_Karl_Barth.pdf
Dietrich_Bonhoeffer_and_Liberalism.pdf
Dietrich_Bonhoeffer_and_the_Formula_of_Concord.pdf
Dietrich_Bonhoeffer_and_the_Russian_Religious_Renaissance.pdf
Dietrich_Bonhoeffer_and_the_Theology_of_the_Cross.pdf
Dietrich_Bonhoeffer_on_Authority.pdf
Dietrich_Bonhoeffer_the_resistance_and_the_two_kingdoms.pdf
Dietrich_Bonhoeffer_and_the_German_Resistance_'95.pdf
From_Dietrich_Bonhoeffer’s_Wedding_Sermon.pdf
GermanResistanceV2.zip
Intro_to_Bonhoeffer.pdf
Invidious_Comparisons.pdf
Luther_and_Bonhoeffer_misunderstood.pdf
Luther_Bonhoeffer_and_Revolution.pdf
Pius_XII_and_the_Jews.pdf
The_German_Resistance_60_years.pdf
The_German_Resistance_and_Dietrich_Bonhoeffer_'07.pdf
The_stereotyping_of_Dietrich_Bonhoeffer.pdf
$ cd ..
$ cat gurl9.pl
#!/usr/bin/perl -w
# gurl - get content from an url
use LWP::Simple;
require HTML::TokeParser;
my $file = "bonhoeffer2";
my $URL = 'http://germanresistance.com/index-of-papers/';
my $p = HTML::TokeParser->new(bonhoeffer2);
my ($dir, $file2);
$dir = 'pdfs/';
while (my $token = $p->get_tag("a")) {
my $url = $token->[1]{href} || "-";
if ($url =~
"http://www.germanresistance.com/documents.*(pdf|zip)" ) {
print "$url\n";
$file2 = $url;
$file2 =~ s#http://www.germanresistance.com/documents/##;
print "$file2\n";
my $success = getstore( $url, $dir.$file2 );
print "success is $success\n";
}
}
So I'm really pleased with this result and thank the forum for its help.
Also looking for tips on how to make this look like it wasn't written
with crayon.
--
Uno
$
------------------------------
Date: Tue, 22 Mar 2011 19:57:22 -0600
From: Uno <Uno@example.invalid>
Subject: Re: "getting" a website
Message-Id: <8ut2c3F1kfU1@mid.individual.net>
On 03/22/2011 07:17 PM, Uri Guttman wrote:
>>>>>> "U" == Uno<Uno@example.invalid> writes:
>
> U> "cats and dogs" =~ /cat|dog|bird/; # matches "cat"
> U> "cats and dogs" =~ /dog|cat|bird/; # matches "cat"
>
> U> Interesting. Might a person call the alternating operator "idempotent?"
>
> not interesting. you don't get the ordering. a regex scans the data and
> then tries to match it in the regex. cat will always match first since
> it is first in the string.
So, are you saying that man perlretut is uninteresting? There's so much
about regex's that I don't know that i have to skip alot of it.
I think I'm cool as cats because I just went up to it and typed
/alternat
and got
Matching this or that
Sometimes we would like our regexp to be able to match different
possible words or character strings. This is accomplished by
using the
alternation metacharacter "|". To match "dog" or "cat", we form the
regexp "dog|cat". As before, Perl will try to match the regexp
at the
earliest possible point in the string. At each character position,
Perl will first try to match the first alternative, "dog". If "dog"
doesn't match, Perl will then try the next alternative, "cat". If
"cat" doesn't match either, then the match fails and Perl moves
to the
next position in the string. Some examples:
"cats and dogs" =~ /cat|dog|bird/; # matches "cat"
"cats and dogs" =~ /dog|cat|bird/; # matches "cat"
Even though "dog" is the first alternative in the second regexp,
"cat"
is able to match earlier in the string.
, without hitting f once.
What other things do you ascribe idempotence to?
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 23:26:26 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: "getting" a website
Message-Id: <87zkomy0t9.fsf@quad.sysarch.com>
>>>>> "U" == Uno <Uno@example.invalid> writes:
U> On 03/22/2011 07:17 PM, Uri Guttman wrote:
>>>>>>> "U" == Uno<Uno@example.invalid> writes:
>>
U> "cats and dogs" =~ /cat|dog|bird/; # matches "cat"
U> "cats and dogs" =~ /dog|cat|bird/; # matches "cat"
>>
U> Interesting. Might a person call the alternating operator "idempotent?"
>>
>> not interesting. you don't get the ordering. a regex scans the data and
>> then tries to match it in the regex. cat will always match first since
>> it is first in the string.
U> So, are you saying that man perlretut is uninteresting? There's so
U> much about regex's that I don't know that i have to skip alot of it.
no, your comments are uninteresting. you don't seem to get how regexes
run and you read the docs and still don't get them.
U> Matching this or that Sometimes we would like our regexp to be
U> able to match different possible words or character strings. This
U> is accomplished by using the alternation metacharacter "|". To
U> match "dog" or "cat", we form the regexp "dog|cat". As before,
U> Perl will try to match the regexp at the earliest possible point in
U> the string. At each character position, Perl will first try to
U> match the first alternative, "dog". If "dog" doesn't match, Perl
U> will then try the next alternative, "cat". If "cat" doesn't match
U> either, then the match fails and Perl moves to the next position in
U> the string. Some examples:
U> "cats and dogs" =~ /cat|dog|bird/; # matches "cat"
U> "cats and dogs" =~ /dog|cat|bird/; # matches "cat"
U> Even though "dog" is the first alternative in the second
U> regexp, "cat"
U> is able to match earlier in the string.
U> , without hitting f once.
which is just what happens and you seem to think it should be different.
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Mon, 21 Mar 2011 22:37:42 -0700
From: Xho Jingleheimerschmidt <xhoster@gmail.com>
Subject: Re: Data::Dumper vs. UTF-8, as usual
Message-Id: <4d8935fc$0$13555$ed362ca5@nr5-q3a.newsreader.com>
jidanni wrote:
> Gentlemen, I need to use
> use utf8;
> use open qw/:std :encoding(utf8)/;
> in my program, but it has the side effect of causing
> print Dumper "é¾”";
without utf8, Perl is interpreting that character as just 3 bytes,
printing those three bytes, and it is your terminal that is converting
those back into the character that you see. If you were to print the
length, rather than the output of Dumper, you would see the difference
that "use utf8" makes.
As far as I can tell, the "use open" part makes no difference, other
than to silence a warning about wide characters.
> to print
> $VAR1 = "\x{9f94}";
> instead of
> $VAR1 = "é¾”";
> like it would otherwise. I dare not touch the 'use' stuff, so how can I
> tweak this?:
Without writing your own version of Data::Dumper (or extending/fixing
the current one), or doing something basically equivalent, I don't see
how you can. However, my version of Data::Dumper is rather old, maybe
it has been already tweaked in the mean time. It could use something
like $Data::Dumper::Useutf8.
Xho
------------------------------
Date: Wed, 23 Mar 2011 03:21:03 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: Data::Dumper vs. UTF-8, as usual
Message-Id: <slrnioipov.75j.nospam-abuse@powdermilk.math.berkeley.edu>
On 2011-03-21, Peter J. Holzer <hjp-usenet2@hjp.at> wrote:
>>> use Data::Dumper;
>>> print Dumper "?";
>>
>> What are you using for editing your files? Are you sure you use a
>> real question mark?
>
> The only question mark in jidanni's posting was at the end of "how can I
> tweak this?". The character jidanni wants to be displayed is a CJK
> character: http://unicode.org/cgi-bin/GetUnihanData.pl?codepoint=9F94
>
>> I see no problem here with 5.8.8,
>
> I see a problem with your newsreader ;-).
I do not see any problem with it. It is told that the TTY understands
latin-1, and performs accordingly. The real problem is with wetware -
I could have guessed that this question mark is not \x3f...
Thanks,
Ilya
------------------------------
Date: Sun, 20 Mar 2011 04:53:51 +0000 (UTC)
From: jidanni@jidanni.org
Subject: Data::Dumper vs. UTF-8
Message-Id: <im418u$adq$1@news.datemas.de>
Gentlemen, I need to use
use utf8; use open qw/:std :encoding(utf8)/;
in my program, but it has the side effect of causing
print Dumper "é¾”";
to print
$VAR1 = "\x{9f94}";
instead of
$VAR1 = "é¾”";
like it would otherwise, and it's driving me nuts. How to adjust this:
use strict;
use warnings FATAL => 'all';
use open qw/:std :encoding(utf8)/;
use utf8;
use Data::Dumper;
print Dumper "é¾”";
------------------------------
Date: Tue, 22 Mar 2011 23:53:51 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: File::Slurp 9999.14 is released
Message-Id: <8762raxzjk.fsf@quad.sysarch.com>
File::Slurp 9999.14 is released and on cpan. many changes and
improvements were made. it's been way too long for an update but it is
finally here. the next version will be out in a few months with some
more new features (see the TODO file). the changes are below
uri
9999.14 Sun Mar 20 16:26:47 EDT 2011
- Added LICENCE (same as perl) to POD
- Added special faster code to slurp in small text files which
is a common case
- Rewrote the extras/slurp_bench.pl script. It has a full
legend, better CLI options, size is selectable, benchmark
entries have more consistant names and it compares the new
fast slurp for small files to the general slurp code.
Thanks to Mark Friendlich
- Cleaned up pod
- Added more Synopsis examples
- Added t/error.t to actually test error conditions. Previous
error.t was renamed to error_mode.t which better reflects its
tests.
- t/error.t uses a new test driver module. this may get used by
other tests in the future.
- Fixed check for SEEK_SET and other constant subs being defined
- Added support for binmode other than :raw and binmode.t test
Thanks to Martin J. Evans, Peter Edwards, Bryce Nesbitt
- Added support for perms option in write_file and perms.t test
Thanks to Peter Corlett and Paul Miller
- Added check to the rename call in atomic mode. Tested in error.t.
Thanks to Daniel Scott Sterling
- Added POD to state that using scalar_ref or buf_ref will be faster
and save memory due to not making a copy
Thanks to Peter Edwards
- read_file in list mode keeps data tainted
Thanks to Sébastien Aperghis-Tramoni
- read_file checks for an overloaded object to get the file
name.
Thanks to Sébastien Aperghis-Tramoni
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.sysarch.com --
----- Perl Code Review , Architecture, Development, Training, Support ------
--------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com ---------
------------------------------
Date: Tue, 22 Mar 2011 09:29:31 -0700 (PDT)
From: ccc31807 <cartercc@gmail.com>
Subject: Re: How to pass arguments to perl
Message-Id: <eb455903-c8dc-474f-88a9-68053a8c2a74@z27g2000prz.googlegroups.com>
On Mar 21, 11:15=A0pm, moonhkt <moon...@gmail.com> wrote:
> In kshell, how to past argument to perl ?
If you run a Perl script in a shell instance, your command line
arguments are contained in the @ARGV array. In this respect, Perl is
similar to the main() function in a C program.
CC.
------------------------------
Date: Tue, 22 Mar 2011 18:11:54 -0700 (PDT)
From: moonhkt <moonhkt@gmail.com>
Subject: Re: How to pass arguments to perl
Message-Id: <de0810ba-68a6-48db-89fe-ef8df0ed301a@g10g2000yqj.googlegroups.com>
On Mar 23, 12:29=A0am, ccc31807 <carte...@gmail.com> wrote:
> On Mar 21, 11:15=A0pm, moonhkt <moon...@gmail.com> wrote:
>
> > In kshell, how to past argument to perl ?
>
> If you run a Perl script in a shell instance, your command line
> arguments are contained in the @ARGV array. In this respect, Perl is
> similar to the main() function in a C program.
>
> CC.
Thank. Update my script as below
PROCESS ()
{
echo $SOU
echo $TAR
perl -pi -e "s/${SOU}/${TAR}/ig" $FN
}
------------------------------
Date: Tue, 22 Mar 2011 20:29:03 +0000 (UTC)
From: Eli the Bearded <*@eli.users.panix.com>
Subject: Re: Parsing some pdf files failed
Message-Id: <eli$1103221605@qz.little-neck.ny.us>
In comp.lang.perl.misc,
Peter Jamieson <ldolan@thinkinghatbigpond.net.au> wrote:
> I am using the following script to parse a collection of
> supplied pdf files. Most of the files parsed as expected but
> with some the script fell over, no output was produced,
> as though the file was invisible. The files are only
> alpha-numeric text, no images or graphics.
Looks like a CAM:PDF problem.
I modified you script to look like this:
#!/usr/bin/perl -w
use strict;
use warnings;
use CAM::PDF;
my $file = shift;
my $pdf = CAM::PDF->new($file);
printf "%s: %d pages\n", $file, ($pdf->numPages());
for my $page (1 .. $pdf->numPages()) {
my $text = $pdf->getPageText($page);
my @lines = split (/\n/, $text);
foreach my $line (@lines) {
print $line;
}
}
__END__
And plugged in various PDFs I have lying around. One called "Hektor.pdf"
produces copious non-text output with that script, but pdftotext gives
me lots of clean text output.
$ perl /tmp/campdfprint Hektor.pdf | strings | wc
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
Use of uninitialized value $text in split at /tmp/campdfprint line 14.
1 3 21
$ pdftotext Hektor.pdf ; strings Hektor.txt |wc
161 4023 23930
$ strings Hektor.pdf |head -1
%PDF-1.4
$
Elijah
------
[1] <URL:http://www.hektor.ch/Book/Hektor.pdf/>
Yes, it has a trailing slash in the link.
[2] pdftotext version 3.02
Copyright 1996-2007 Glyph & Cog, LLC
------------------------------
Date: Tue, 22 Mar 2011 18:26:36 -0600
From: Uno <Uno@example.invalid>
Subject: using File::Find
Message-Id: <8ust1tFaaU1@mid.individual.net>
I just installed perldoc on my machine and wanted to go take a look at
it, to see where it is and what it looks like. For example, I wrote:
$ whereis perlretut
perlretut: /usr/share/man/man1/perlretut.1.gz
$
and poked around there, but I didn't see a perlretut that looked
uncompressed, and it could be there, but this is one of those
directories where if you just hit ls, you get a deluge of files.
So I thought I'd give it a shot with perl and looked at 9.7 of _Perl
Cookbook_, p. 361. I tried to adapt it to the situation and am not
quite sure what I'm looking at:
$ perl find1.pl
Use of uninitialized value in numeric gt (>) at find1.pl line 7.
Use of uninitialized value in numeric gt (>) at find1.pl line 7.
Use of uninitialized value in numeric gt (>) at find1.pl line 7.
/usr/share/man/man1 Tue Mar 22 17:08:00 2011
$ cat find1.pl
#! usr/bin/perl -w
use strict;
use File::Find;
@ARGV = ('/usr/share/man/man1') unless @ARGV;
my ($age, $name);
sub youngest {
return if defined $age && $age > -M;
$age = (stat(_))[9];
$name = $File::Find::name;
}
find(\&youngest, @ARGV);
print "$name " . scalar(localtime($age)) . "\n";
$
It seems to me that $name should be giving me the name of a file in the
directory, not the directory itself. It also seems to me unlikely that
this directory would be born today, and later than its contents.
So 2 questions.
q1) How do I re-write this so that it outputs the filename?
q2) I seem to get a varying number of warnings on "use of uninitialized
value" depending on the directory it runs in. What does it mean?
Thanks for your comment,
and cheers,
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 18:19:44 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: using File::Find
Message-Id: <86hbau7hvz.fsf@red.stonehenge.com>
>>>>> "Uno" == Uno <Uno@example.invalid> writes:
Uno> I just installed perldoc on my machine and wanted to go take a look
Uno> at it, to
Uno> see where it is and what it looks like. For example, I wrote:
Uno> $ whereis perlretut
Uno> perlretut: /usr/share/man/man1/perlretut.1.gz
Uno> $
Uno> and poked around there, but I didn't see a perlretut that looked uncompressed,
Uno> and it could be there, but this is one of those directories where if you just
Uno> hit ls, you get a deluge of files.
"man perlretut" would have shown it just fine.
Deleted the rest.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
------------------------------
Date: Tue, 22 Mar 2011 19:44:42 -0600
From: Uno <Uno@example.invalid>
Subject: Re: using File::Find
Message-Id: <8ut1kbFsnpU1@mid.individual.net>
On 03/22/2011 07:19 PM, Randal L. Schwartz wrote:
>>>>>> "Uno" == Uno<Uno@example.invalid> writes:
>
> Uno> I just installed perldoc on my machine and wanted to go take a look
> Uno> at it, to
> Uno> see where it is and what it looks like. For example, I wrote:
>
> Uno> $ whereis perlretut
> Uno> perlretut: /usr/share/man/man1/perlretut.1.gz
> Uno> $
>
> Uno> and poked around there, but I didn't see a perlretut that looked uncompressed,
> Uno> and it could be there, but this is one of those directories where if you just
> Uno> hit ls, you get a deluge of files.
>
> "man perlretut" would have shown it just fine.
>
> Deleted the rest.
>
Did you notice that the subject is using File::Find?
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 19:36:32 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: using File::Find
Message-Id: <86bp127ebz.fsf@red.stonehenge.com>
>>>>> "Uno" == Uno <Uno@example.invalid> writes:
Uno> Did you notice that the subject is using File::Find?
"man File::Find" then.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
------------------------------
Date: Tue, 22 Mar 2011 19:48:47 -0700
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: using File::Find
Message-Id: <5rnio6t0j93oanb2ol5pvtc4e9bj851mvn@4ax.com>
merlyn@stonehenge.com (Randal L. Schwartz) wrote:
>>>>>> "Uno" == Uno <Uno@example.invalid> writes:
>
>Uno> Did you notice that the subject is using File::Find?
>
>"man File::Find" then.
Didn't you mean
perldoc File::Find
maybe?
jue
------------------------------
Date: Tue, 22 Mar 2011 22:07:24 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: using File::Find
Message-Id: <slrnioiom1.q7r.tadmc@tadbox.sbcglobal.net>
Uno <Uno@example.invalid> wrote:
> I just installed perldoc on my machine and wanted to go take a look at
> it, to see where it is and what it looks like. For example, I wrote:
>
> $ whereis perlretut
perldoc will tell you where the docs are if you ask it to...
perldoc perldoc
perldoc -l perlretut
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Tue, 22 Mar 2011 20:09:31 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: using File::Find
Message-Id: <8639me7ct0.fsf@red.stonehenge.com>
>>>>> "Jürgen" == Jürgen Exner <jurgenex@hotmail.com> writes:
Jürgen> Didn't you mean
Jürgen> perldoc File::Find
Jürgen> maybe?
Oh, sorry. I have tools that make it so that "man File::Find" works.
Much simpler for my brain.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
------------------------------
Date: Tue, 22 Mar 2011 21:39:11 -0600
From: Uno <Uno@example.invalid>
Subject: Re: using File::Find
Message-Id: <8ut8avF6guU1@mid.individual.net>
On 03/22/2011 09:07 PM, Tad McClellan wrote:
> Uno<Uno@example.invalid> wrote:
>> I just installed perldoc on my machine and wanted to go take a look at
>> it, to see where it is and what it looks like. For example, I wrote:
>>
>> $ whereis perlretut
>
>
> perldoc will tell you where the docs are if you ask it to...
>
> perldoc perldoc
> NAME
perldoc - Look up Perl documentation in Pod format.
Ok.
> perldoc -l perlretut
>
>
=head2 Acknowledgments
The inspiration for the stop codon DNA example came from the ZIP
code example in chapter 7 of I<Mastering Regular Expressions>.
The author would like to thank Jeff Pinyan, Andrew Johnson, Peter
Haworth, Ronald J Kimball, and Joe Smith for all their helpful
comments.
=cut
$ /usr/share/perl/5.10/pod/perlretut.pod
bash: /usr/share/perl/5.10/pod/perlretut.pod: Permission denied
$ man cat
$ perldoc -l perlretut
/usr/share/perl/5.10/pod/perlretut.pod
$ cat /usr/share/perl/5.10/pod/perlretut.pod >text1
$ ls
ch09.code find1.pl lst rmtree1 symirror uvi
fdirs find2.pl rename rmtree2 text1
$ whereis perlretut
perlretut: /usr/share/man/man1/perlretut.1.gz
$
Am I correct to think that whereis didn't find the pod file because it
didn't exist when it booted?
--
Uno
------------------------------
Date: Tue, 22 Mar 2011 21:43:39 -0600
From: Uno <Uno@example.invalid>
Subject: Re: using File::Find
Message-Id: <8ut8jcF803U1@mid.individual.net>
On 03/22/2011 09:09 PM, Randal L. Schwartz wrote:
>>>>>> "Jürgen" == Jürgen Exner<jurgenex@hotmail.com> writes:
>
> Jürgen> Didn't you mean
> Jürgen> perldoc File::Find
> Jürgen> maybe?
>
> Oh, sorry. I have tools that make it so that "man File::Find" works.
>
> Much simpler for my brain.
>
Does your perl documentation survive the latest install? Although I'm
not a detached observer, I would say that mine did not.
--
Uno
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3328
***************************************