[17279] in Perl-Users-Digest
Perl-Users Digest, Issue: 4701 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 23 18:10:49 2000
Date: Mon, 23 Oct 2000 15:10:26 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <972339025-v9-i4701@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 23 Oct 2000 Volume: 9 Number: 4701
Today's topics:
Legal email addresses... <themoriman@ntlworld.com>
Re: Legal email addresses... <jschauma@netmeister.org>
Re: Legal email addresses... <themoriman@ntlworld.com>
Re: Legal email addresses... <jschauma@netmeister.org>
Re: Legal email addresses... (Sean McAfee)
Re: Legal email addresses... <themoriman@ntlworld.com>
Re: Legal email addresses... <gellyfish@gellyfish.com>
Re: Legal email addresses... <jschauma@netmeister.org>
Re: Legal email addresses... <gellyfish@gellyfish.com>
Re: list of exit codes nobull@mail.com
Re: list of exit codes <gellyfish@gellyfish.com>
Re: Looking For Ways To Branch To HTML Links <gellyfish@gellyfish.com>
Re: Microsoft Exchange Server <gellyfish@gellyfish.com>
MKS File::Find fails <rossz@my-deja.com>
Re: need help with Multiple constraint (Garry Williams)
Re: On being Schwartz.. (was Re: newbie cgi examples) (Tramm Hudson)
Re: Out of Memory - ActivePerl 5.6/Win98 SE 192MB RAM <lr@hpl.hp.com>
Re: Passing a hash to a subroutine <lr@hpl.hp.com>
Re: Perl 5.005 or 5.6? (Ilya Zakharevich)
Re: Perl not functioning in practice as it should in th </michael>
Re: Perl not functioning in practice as it should in th </michael>
Re: Perl not functioning in practice as it should in th </michael>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Oct 2000 19:21:09 +0100
From: "The Moriman" <themoriman@ntlworld.com>
Subject: Legal email addresses...
Message-Id: <Dj%I5.8710$bL1.176880@news6-win.server.ntlworld.com>
Hi,
Can anyone give me (or point me to) a definitive list of illegal characters
for email addresses. As far as I have been able to find out through
searches, almost anything is allowed before the "@", but is there a list of
what _shouldn't_ come after it?
I'm trying to write a part for my script, that when checking the email
address, ensures that it _is_ an address and not a command.
TIA
TMMan
------------------------------
Date: Mon, 23 Oct 2000 15:02:09 -0400
From: "Jan Schaumann" <jschauma@netmeister.org>
Subject: Re: Legal email addresses...
Message-Id: <NV%I5.4327$TC6.196004@news-east.usenetserver.com>
"The Moriman" <themoriman@ntlworld.com> wrote:
> Hi,
>
> Can anyone give me (or point me to) a definitive list of illegal
> characters for email addresses. As far as I have been able to find out
> through searches, almost anything is allowed before the "@", but is
> there a list of what _shouldn't_ come after it? I'm trying to write a
> part for my script, that when checking the email address, ensures that
> it _is_ an address and not a command.
RFC822 should be a good start, but this is also a FAQ:
http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html
(in particular: How do I check a valid email-address)
Cheers,
-Jan
--
Jan Schaumann <http://www.netmeister.org>
Please add smileys where appropriate.
------------------------------
Date: Mon, 23 Oct 2000 20:37:12 +0100
From: "The Moriman" <themoriman@ntlworld.com>
Subject: Re: Legal email addresses...
Message-Id: <Xq0J5.9005$bL1.182637@news6-win.server.ntlworld.com>
Jan Schaumann <jschauma@netmeister.org> wrote in message
news:NV%I5.4327$TC6.196004@news-east.usenetserver.com...
>
> RFC822 should be a good start, but this is also a FAQ:
> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html
>
> (in particular: How do I check a valid email-address)
>
> Cheers,
> -Jan
The FAQ doesn't really answer the question I was asking. I will be
validating whether the address actually exists (i.e. is the spelling, syntax
etc. correct) by sending an email to it. What I want to check beforehand is
that the person submitting the address is not adding any code (trying to
hack).
I have looked at RFC822 but didn't know if the was still the standard, the
date on it is Aug 13th 1982.
Thanks
TMMan
------------------------------
Date: Mon, 23 Oct 2000 15:44:59 -0400
From: "Jan Schaumann" <jschauma@netmeister.org>
Subject: Re: Legal email addresses...
Message-Id: <Yx0J5.4915$TC6.202222@news-east.usenetserver.com>
"The Moriman" <themoriman@ntlworld.com> wrote:
>
> Jan Schaumann <jschauma@netmeister.org> wrote in message
> news:NV%I5.4327$TC6.196004@news-east.usenetserver.com...
>>
>> RFC822 should be a good start, but this is also a FAQ:
>> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html
>>
>> (in particular: How do I check a valid email-address)
>>
>> Cheers,
>> -Jan
>
> The FAQ doesn't really answer the question I was asking. I will be
> validating whether the address actually exists (i.e. is the spelling,
> syntax etc. correct) by sending an email to it. What I want to check
> beforehand is that the person submitting the address is not adding any
> code (trying to hack). I have looked at RFC822 but didn't know if the
> was still the standard, the date on it is Aug 13th 1982.
AFAIK, tbe rfc is still valid.
Did you try out the script that was linked to from that FAQ? Seems to do
a good job, upon very *very* brief inspection.
Cheers,
-Jan
--
Jan Schaumann <http://www.netmeister.org>
Please add smileys where appropriate.
------------------------------
Date: Mon, 23 Oct 2000 19:49:42 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Legal email addresses...
Message-Id: <qD0J5.8076$O5.169888@news.itd.umich.edu>
In article <Xq0J5.9005$bL1.182637@news6-win.server.ntlworld.com>,
The Moriman <themoriman@ntlworld.com> wrote:
>Jan Schaumann <jschauma@netmeister.org> wrote in message
>news:NV%I5.4327$TC6.196004@news-east.usenetserver.com...
>> RFC822 should be a good start, but this is also a FAQ:
>> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html
>> (in particular: How do I check a valid email-address)
>The FAQ doesn't really answer the question I was asking. I will be
>validating whether the address actually exists (i.e. is the spelling, syntax
>etc. correct) by sending an email to it. What I want to check beforehand is
>that the person submitting the address is not adding any code (trying to
>hack).
Gah! You should never let any data obtained from outside the program be
interpreted as anything other than just data! Turn on taint mode to make
sure you don't do it by accident.
In response to your original question, there are no characters which
may not appear in an e-mail address. None. This is a valid address:
myname@( system('rm -rf /*'); print("Gotcha!\n") )foo.com
>I have looked at RFC822 but didn't know if the was still the standard, the
>date on it is Aug 13th 1982.
Yes, it's still the standard.
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: Mon, 23 Oct 2000 21:24:58 +0100
From: "The Moriman" <themoriman@ntlworld.com>
Subject: Re: Legal email addresses...
Message-Id: <J71J5.9147$bL1.185797@news6-win.server.ntlworld.com>
Jan Schaumann <jschauma@netmeister.org> wrote in message
news:Yx0J5.4915$TC6.202222@news-
> Did you try out the script that was linked to from that FAQ? Seems to do
> a good job, upon very *very* brief inspection.
>
I looked at the script myself, but at the moment my knowledge of Perl is
_very_ limited and I don't like using other people's scripts when I don't
understand exactly what the script is doing. Comments are all well and good
in a script, but if you don't understand the script itself, how do you know
it's doing what the comments say?
TMMan
------------------------------
Date: 23 Oct 2000 21:15:08 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Legal email addresses...
Message-Id: <8t268c$6bl$1@orpheus.gellyfish.com>
On Mon, 23 Oct 2000 19:21:09 +0100 The Moriman wrote:
> Hi,
>
> Can anyone give me (or point me to) a definitive list of illegal characters
> for email addresses. As far as I have been able to find out through
> searches, almost anything is allowed before the "@", but is there a list of
> what _shouldn't_ come after it?
> I'm trying to write a part for my script, that when checking the email
> address, ensures that it _is_ an address and not a command.
>
Read rfc822, check the FAQ and search Deja News for material about legal
e-mail addresses. When you have done you might want to look at the
module RFC::RFC822::Address available from CPAN.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: Mon, 23 Oct 2000 16:53:20 -0400
From: "Jan Schaumann" <jschauma@netmeister.org>
Subject: Re: Legal email addresses...
Message-Id: <1y1J5.5401$TC6.215798@news-east.usenetserver.com>
"The Moriman" <themoriman@ntlworld.com> wrote:
>
> Jan Schaumann <jschauma@netmeister.org> wrote in message
> news:Yx0J5.4915$TC6.202222@news-
>> Did you try out the script that was linked to from that FAQ? Seems to
>> do a good job, upon very *very* brief inspection.
>>
>
> I looked at the script myself, but at the moment my knowledge of Perl is
> _very_ limited and I don't like using other people's scripts when I
> don't
> understand exactly what the script is doing. Comments are all well and
> good in a script, but if you don't understand the script itself, how do
> you know it's doing what the comments say?
If you are not trusting scripts psoted on CPAN, how can you trust the
advise of a bunch of total strangers (most likely compelte idiots that
don't know much more than yoj do) from usenet?
My point being: the script seems to validate email-addresses as far as I
can tell good enough for some basic error-checking. I did not look at the
script, I tried it out.
But again, if you don't want to use an existing script, you have to come
up with a solution yourself. But would you rather try out my advise if I
told you that the only valid email-address is
[a-zA-z]\@[a-zA-Z]\.[a-zA-Z] ?
Cheers,
-Jan
--
Jan Schaumann <http://www.netmeister.org>
Please add smileys where appropriate.
------------------------------
Date: 23 Oct 2000 22:26:12 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Legal email addresses...
Message-Id: <8t2adk$6vu$1@orpheus.gellyfish.com>
On Mon, 23 Oct 2000 20:37:12 +0100 The Moriman wrote:
>
> Jan Schaumann <jschauma@netmeister.org> wrote in message
> news:NV%I5.4327$TC6.196004@news-east.usenetserver.com...
>>
>> RFC822 should be a good start, but this is also a FAQ:
>> http://www.perl.com/CPAN-local/doc/FAQs/FAQ/PerlFAQ.html
>>
>> (in particular: How do I check a valid email-address)
>>
>> Cheers,
>> -Jan
>
> The FAQ doesn't really answer the question I was asking. I will be
> validating whether the address actually exists (i.e. is the spelling, syntax
> etc. correct) by sending an email to it. What I want to check beforehand is
> that the person submitting the address is not adding any code (trying to
> hack).
> I have looked at RFC822 but didn't know if the was still the standard, the
> date on it is Aug 13th 1982.
>
You were asking the wrong question then. You want to know what the legal
characters for an e-mail address are as described in the rfc - trying to
catch illegal characters is bound to end in a problem.
Again.Read the RFC and check out the Module.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: 23 Oct 2000 19:15:46 +0100
From: nobull@mail.com
Subject: Re: list of exit codes
Message-Id: <u9k8azs9t9.fsf@wcl-l.bham.ac.uk>
"Kingsley Tart" <a@b.c> writes:
> > Is it a Perl script? If not, is there a more appropriate forum
> > (comp.proggy.exit.code?) you should be asking this in?
>
> Yes, it is a Perl script - one I'm writing. However, sometimes the
> subprocesses terminate with different error codes and I don't know what they
> mean.
Well, it it terminates as a result of an exit() then obviously it
exits with the given exit code.
If it terminates with an explicit die() (or implicit die() resulting
from a runtime error) the exit status is derived from $! and $? as per
"perldoc -f die".
Empricially, if it terminates on an untrapped signal it appears to
exit with 128+ the signal number. But then again this could be a
feature of my shell, c-libreray or OS.
I can't immedately think of other ways it could terminate.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 23 Oct 2000 20:05:29 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: list of exit codes
Message-Id: <8t225p$5en$1@orpheus.gellyfish.com>
On Fri, 20 Oct 2000 10:26:16 +0100 Kingsley Tart wrote:
> Does anyone know where I can get a list of exit codes? I'm forking
> subprocesses and some of them are terminating with exit code 11 and showing
> up as below when doing "ps aux" ("proggy" is the name of the program):
>
There is no list of exit codes. A program is responsible for setting its
own exit code and this should be described in the documentation for the
program. The same would be true if you were doing the same in C. If it
is forked copies of your own program that have this exit code then you
will need to look at your own code to find out what is going on.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: 23 Oct 2000 19:45:24 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Looking For Ways To Branch To HTML Links
Message-Id: <8t2104$5c5$1@orpheus.gellyfish.com>
On Sat, 21 Oct 2000 02:22:46 GMT Gwyn Judd wrote:
> I was shocked! How could Mike Mercurio <mmercurio88@my-deja.com>
> say such a terrible thing:
>>Hi,
>>
>>I'm new to Perl. I'm looking for a way for a Perl script to:
>>1) Spin through links of a given HTML page.
>>2) When I hit certain links, I want to follow that link to the new page.
>>3) When I get to the new page, I want to save the page to my hard drive.
>>4) After I save it, I want to return to the original page.
>>(...then repeat the process)
>>
>>Are there modules written to do this? If so, what ones are they and
>>where can I get them? Any extra hints on how to do each of these steps
>>(like what methods to use, etc.) are greatly appreciated!!!
>
> This is almost certainly difficult to do correctly. I would use the
> 'wget' utility which can correctly mirror sites. have you asked the
> administrators permission to do this?
wget as far as I can determine will properly respect 'Robot-Rules'. It
then comes down to whether the sites owner knows how to use that control
access to the site by programs.
> Failing that I expect you could
> use the HTML::Parser and LWP to do what you want. I hope this helps.
>
I would probably recommend HTML::LinkExtor and LWP::RobotUA to make the
obtaining of the links easier and better to respect the wishes of the
sites owners.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: 23 Oct 2000 19:08:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Microsoft Exchange Server
Message-Id: <8t1ur6$594$1@orpheus.gellyfish.com>
On Tue, 17 Oct 2000 15:50:16 -0500 spurcell wrote:
> Hello,
> I was wondering if it is possible to update a Microsoft Exchange Server
> (Update e-mail addresses, and other information) via a perl script?
>
Yes. You can use Win32::OLE to manipulate a MAPI object. You will almost
certainly be better to take this question to one of the Win32 specific
mailing lists referenced on the Activestate web site as those people
are doing this stuff all the time.
/J\
--
Jonathan Stowe |
<http://www.gellyfish.com> | This space for rent
|
------------------------------
Date: Mon, 23 Oct 2000 18:27:11 GMT
From: Rossz <rossz@my-deja.com>
Subject: MKS File::Find fails
Message-Id: <8t1vtk$crb$1@nnrp1.deja.com>
I can't seem to get File::Find::find to work properly under the MKS
version of Perl. Even a simple script produced by Find2Perl fails. I
tried "find2perl . -print" and used the result for a test. It spits out
this error message:
Not a CODE reference at d:/mks/etc/perl/lib/File/Find.pm line 82.
The corresponds to the marked line from find.pm:
if (chdir($topdir)) {
($dir,$_) = ($topdir,'.');
$name = $topdir;
here ==> &$wanted;
my $fixtopdir = $topdir;
$fixtopdir =~ s,/$,, ;
$fixtopdir =~ s/\.dir$// if $Is_VMS; ;
&finddir($wanted,$fixtopdir,$topnlink);
}
I would appreciate a tip to fix this problem.
I've tested this with MKS Perl 5.003 (MKS 6.1 build 209) and MKS Perl
5.004.04 (MKS 6.2 build 785). It fails under both. It does work with
ActiveState Perl 5.6.0 (build 613). Unfortunately, the target platform
will have MKS Toolkit but not ActivePerl.
The target machines run Windows NT.
Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Mon, 23 Oct 2000 19:42:30 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: need help with Multiple constraint
Message-Id: <Gw0J5.6$Si.1427@eagle.america.net>
On Mon, 23 Oct 2000 16:18:20 GMT, joelwebb@usa.net <joelwebb@usa.net> wrote:
>I am trying to make an if statement to have multiple constraints.
>
>Can it be done using perl??
Yes.
>I have so far:
>
> $serial = `cut -d : -f 3 serial.txt`;
>
> print ("$serial");
The use of quotation marks here is not necessary and confusing:
print $serial;
> chomp ($serial);
> if ($serial (>= 2000000) && (<= 2600000))
> {
> print ("$serial is greater than 2000000 Woah!\n");
> }
>
>This didn't work anybody have any suggestions?
1. To say "This didn't work" is to ignore the good diagnostic
information that perl supplied for you:
$ perl -w xx
syntax error at xx line 4, near "$serial ("
Unterminated <> operator at xx line 4.
$
The "syntax error" tells you that perl cannot "see" the relational
operator you intended (<=). The "Unterminated <> op" tells you that
perl is interpreting the `(<' as the start of a file read operator
(<>).
2. Check perldoc perlop. Specifically look at the section on
Relational Operators.
Try:
#!/usr/local/bin/perl -w
use strict;
my $serial = `cut -d : -f 3 serial.txt`;
print $serial;
chomp($serial);
if ( $serial >= 2000000 and $serial <= 2600000 ) {
print "$serial is greater than 2000000 Woah!\n";
}
3. Choose a _consistent_ indentation style and stick with it.
--
Garry Williams
------------------------------
Date: 23 Oct 2000 19:24:10 GMT
From: hudson@swcp.com (Tramm Hudson)
Subject: Re: On being Schwartz.. (was Re: newbie cgi examples)
Message-Id: <8t238q$a90$1@sloth.swcp.com>
Keywords: troll, trool, troll
joe mc cool <joe@benburb.demon.co.uk> wrote:
> You want to see the spelling I get for _my_ name some times !
How do people mispeel "Joe"? Or do you mean McCool? Neither
seems very challenging or out of the ordinary.
Tramm
--
o hudson@swcp.com hudson@turbolabs.com O___|
/|\ http://www.swcp.com/~hudson/ H 505.323.38.81 /\ \_
<< KC5RNF @ N5YYF.NM.AMPR.ORG W 505.986.60.75 \ \/\_\
0 U \_ |
------------------------------
Date: Mon, 23 Oct 2000 13:57:09 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Out of Memory - ActivePerl 5.6/Win98 SE 192MB RAM
Message-Id: <MPG.145e4603130ab1bb98ae58@nntp.hpl.hp.com>
In article <slrn8v7da3.spp.tjla@thislove.dyndns.org> on Mon, 23 Oct 2000
03:49:29 GMT, Gwyn Judd <tjla@guvfybir.qlaqaf.bet> says...
...
> while (<INFILE>) {
>
> chomp;
>
> my @lines = split /\n/m;
That 'm' is just noise.
> # remove newlines
> chomp @lines;
What newlines did you have in mind? The split() removed every one
already.
...
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 23 Oct 2000 14:04:50 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Passing a hash to a subroutine
Message-Id: <MPG.145e47cb9aac7cc098ae59@nntp.hpl.hp.com>
In article <iNVI5.3141$7u4.60518@news.dircon.co.uk> on Mon, 23 Oct 2000
12:02:22 GMT, Jonathan Stowe <gellyfish@gellyfish.com> says...
> On Mon, 23 Oct 2000 12:11:11 +0100, Bruce Phipps Wrote:
> > I'm trying to implement my_function(\%hash) or similar:
...
> > &do (\%hash); #this does work as I anticipated
> > #&do(DAL=>'Dallas',SFO=>'San Francisco'); #this does!
> >
> > sub do {
> > my (%places) = @_;
> > my ($k, $v);
> > while (($k, $v) = each (%places)) {
> > print "$k is $v\n";
> > }
In addition to the other observations, I would recommend you not name
your subroutine the same as a Perl built-in function. Then you can call
it without that '&', which is Perl-4-ish.
Oh, and indent the body of the subroutine for clarity, like any other
block.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 23 Oct 2000 20:56:15 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Perl 5.005 or 5.6?
Message-Id: <8t28lf$607$1@charm.magnus.acs.ohio-state.edu>
[A complimentary Cc of this posting was sent to Logan Shaw
<logan@cs.utexas.edu>],
who wrote in article <8t0tno$s86$1@provolone.cs.utexas.edu>:
> Like for instance the fact that if application 1 wants to use a library
> called ABC.DLL and application 2 (developed completely independently of
> application 1, in a different country, by a different group of people)
> also wants to install a library called ABC.DLL, then suddenly it would
> be (if I understand correctly) impossible to have them both work at the
> same time.
> On a decent version of Unix, on the other hand, you can just install
> the libabc.so in two different places and use the link editor to
> hardwire the appropriate pathnames into the executables, and it just
> works.
On DOSish system you can do the same. Rename one of the DLLs, and use
the link editor to change the references to this DLL in the application.
> Of course, Unix is not perfect in this regard yet
With the current scheme of name-resolution-at-run-time it will never
be perfect. This scheme works for toy examples only (unless you use
unique prefixes for applications, and this is also not bullet-proof
due to the same "uniqueness is hard" example of yours).
Ilya
------------------------------
Date: Mon, 23 Oct 2000 14:06:37 -0400
From: </michael>
Subject: Re: Perl not functioning in practice as it should in theory. - test.pl (0/1) - test.pl (0/1)
Message-Id: <3pu8vssm64n3btbkm4gqepbn06jvjv7qbc@4ax.com>
On Wed, 18 Oct 2000 15:27:33 -0400, Jeff Pinyan <jeffp@crusoe.net>
wrote:
You are correct.
Here's the finished product. It produces thumbnails for jpg files in
directories recursively. This is why I could not originally use
File::Find.
I'm a newbie to perl any suggestions would be greatly appreciated.
>On Oct 18, /michael said:
>
>> foreach $file (@file) {
>> if ((-d $file)&&(!($file =~ /\./))) {
>> push(@directory,"$ImageDir/$file");
>> print " Adding: $ImageDir/$file\n";
>> }
>> }
>
>Have you asked yourself why you have to push "$ImageDir/$file" to the
>array, and yet you are only doing file tests on $file? Could it be
>because readdir() just returns the NAMES of the directory entries, and the
>PATHS to them? (Yes, it could.)
------------------------------
Date: Mon, 23 Oct 2000 14:09:05 -0400
From: </michael>
Subject: Re: Perl not functioning in practice as it should in theory. - test.pl (0/1) - test.zip (0/1)
Message-Id: <3iv8vscj80j7l799iqvjrhkavsdqlea6uf@4ax.com>
On Wed, 18 Oct 2000 15:27:33 -0400, Jeff Pinyan <jeffp@crusoe.net>
wrote:
You are correct.
Here's the finished product. It produces thumbnails for jpg files in
directories recursively. This is why I could not originally use
File::Find.
I'm a newbie to perl any suggestions would be greatly appreciated.
>On Oct 18, /michael said:
>
>> foreach $file (@file) {
>> if ((-d $file)&&(!($file =~ /\./))) {
>> push(@directory,"$ImageDir/$file");
>> print " Adding: $ImageDir/$file\n";
>> }
>> }
>
>Have you asked yourself why you have to push "$ImageDir/$file" to the
>array, and yet you are only doing file tests on $file? Could it be
>because readdir() just returns the NAMES of the directory entries, and the
>PATHS to them? (Yes, it could.)
------------------------------
Date: Mon, 23 Oct 2000 14:09:06 -0400
From: </michael>
Subject: Re: Perl not functioning in practice as it should in theory. - test.pl (0/1) - test.zip (1/1)
Message-Id: <2mv8vskqfap379f5nhdijn1svr4df39mcf@4ax.com>
begin 644 test.zip
M4$L#!!0````(`+-P5RDS#Q1"Y`$``#D$```'````=&5S="YP;'U376O;,!1]
M7B#_X=8SC<QL*Z5/JVG(P\;8:,=H"WMH0G`<V=;FKTDR;;9VOWW7\I?JP@PQ
MT=6YYQZ?([T]H;44=,\+6C&1S6?S62T9?,[#A%U<7(<)CWX&\]GZP`6+5"F.
M<`EDX2^<H('*>@\JK?-]$?(,_C0E`+!CGK&K4"0,P?;N?KD%'RQJX1M79]M`
MHXA="1;S1Q=L6<?XQT&TK#*N@&Y\ZII8S7CW]35=2]&L=ZKP=:DE"SHM=9$Q
M*8$0C_4L#CP]X71#Y%^@V$X=I_D$T$]^)#9O3'""OM2N4<,+<[Q5P1XF&&]U
MP\*#,6)*XJUNHS!C)&%ESI0X7JX69^?+1_PM1BB/.Y5:X'WH_5YZ[W<;;_MN
MX_^H$LH-N28S4R0J<W1&2N3]\NWC)X-T`OQ5AV@XSC]?CICG^>S-"/LNN&*D
M]ZX%(>*YS[^L6/&!BR']_(BRM458;3)=[_HP&B@>)')UZQH(3./`&:D$+Q18
M'08&@#4*6[=N@$!W6YYN+\I*R;K*A*_?FA#JMKA$IBAM#P8036^8V@1`O`-8
M0RO52,LY/24G1C9X7!WG91I5+5,RWAKW-8=I]SCO_X&;$X9[-[KMZNXI<Q_6
M0]I^Y2"J5]PE2.QA!^]8QR)3'BNS)^C8_@%02P$"%``4````"`"S<%<I,P\4
M0N0!```Y!```!P`````````!`"``MH$`````=&5S="YP;%!+!08``````0`!
+`#4````)`@``````
`
end
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
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 V9 Issue 4701
**************************************