[23363] in Perl-Users-Digest
Perl-Users Digest, Issue: 5582 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 29 06:06:10 2003
Date: Mon, 29 Sep 2003 03:05:08 -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 Mon, 29 Sep 2003 Volume: 10 Number: 5582
Today's topics:
Re: A couple of hash questions <noreply@gunnar.cc>
Re: A couple of hash questions <dave.nospam@ntlworld.com>
Re: A couple of hash questions <dave.nospam@ntlworld.com>
Re: Artificial intelligence (AI) has been solved <luciusone@chapter.net>
Re: Hiding PERL code <abigail@abigail.nl>
Re: Hiding PERL code <davido@pacifier.com>
Re: Hiding PERL code <ak+usenet@freeshell.org>
Re: Make problems <jwillmore@cyberia.com>
Re: Max Memory in Perl and How to reuse gabage? <REMOVEsdnCAPS@comcast.net>
Re: Passing a directory into $ARGV[0] from a shell scri <jurgenex@hotmail.com>
Re: Perl Help - Windows Perl script accessing a Unix pe <kalinaubears@iinet.net.au>
Re: Perl Help - Windows Perl script accessing a Unix pe <abigail@abigail.nl>
Re: Perl Help - Windows Perl script accessing a Unix pe <jwillmore@cyberia.com>
POP3 - SMTP Script <nospam.h@yahoo.com>
Re: POP3 - SMTP Script <abigail@abigail.nl>
Re: POP3 - SMTP Script <jwillmore@cyberia.com>
refer to object in another package <coo_t2-NO-LIKE-SPAM@yahoo.com>
Re: refer to object in another package <michael.korte@materna.de>
Sendmail::Milter without threads <admin@asarian-host.net>
Unique identifiers in Sendmail::Milter 0.18 <admin@asarian-host.net>
Re: Uploading files using CGI.pm <jwillmore@cyberia.com>
Re: Uploading files using CGI.pm <notavailable@nospamplease.com>
Re: use strict with an undeclared variable (ko)
Re: <bwalton@rochester.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 29 Sep 2003 06:57:18 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: A couple of hash questions
Message-Id: <bl8e2q$9aid6$1@ID-184292.news.uni-berlin.de>
Dave Saville wrote:
> On Sun, 28 Sep 2003 20:29:52 +0200, Gunnar Hjalmarsson wrote:
>> Dave Saville wrote:
>>> If I only have a simple hash, just plain name/value pairs, then
>>> is it more efficient to use store() or a plain text file?
>>> Taking into account reading the thing back in.
>>
>> Have you considered using DBM files?
>
> For what I am trying to do that would be overkill
That made me curious, Dave.
I have never used Storable, but I'm storing a few small hashes in SDBM
files. I have never benchmarked, but it seems to be more durable than
plain text files, and the minimum size of an SDBM database is just 1 kiB.
What is it that makes you say it would be overkill?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Mon, 29 Sep 2003 08:46:36 +0100 (BST)
From: "Dave Saville" <dave.nospam@ntlworld.com>
Subject: Re: A couple of hash questions
Message-Id: <qnirfnivyyragyjbeyqpbz.hlz7ho4.pminews@text.news.ntlworld.com>
On 28 Sep 2003 20:42:28 GMT, Grendel wrote:
>In article <qnirfnivyyragyjbeyqpbz.hly1oo2.pminews@text.news.ntlworld.com>,
>Dave Saville wrote:
>
>> If the latter, is there a better way to read it back in, assuming space
>> separated one pair/line, than:
>>
>> ($name, $value) = split;
>> $hash{$name} = $value;
>
>That'll work, and if you're doing something that doesn't warrant a DBM
>file or such, I'll guess that the speed of how you're reading in a flat
>file won't matter either.
>
>You could do something with map, on the other hand, if you've already
>got all the delimited data in an array somehow and you know there won't
>by any empty values..
>
>%hash = map { split(':',$_) } @data;
Now that looks interesting - slurp the lot into an array and build the
hash out of the array. As long as I've enough memory :-) But I *think*
the file will only grow to 40K ish. Each pair is only 20 characters.
Time for playing I think - Thanks to those who pointed out benchmark.
Regards
Dave Saville
NB switch saville for nospam in address
------------------------------
Date: Mon, 29 Sep 2003 08:49:42 +0100 (BST)
From: "Dave Saville" <dave.nospam@ntlworld.com>
Subject: Re: A couple of hash questions
Message-Id: <qnirfnivyyragyjbeyqpbz.hlz7mu5.pminews@text.news.ntlworld.com>
On Mon, 29 Sep 2003 06:57:18 +0200, Gunnar Hjalmarsson wrote:
>> For what I am trying to do that would be overkill
>
>That made me curious, Dave.
>
>I have never used Storable, but I'm storing a few small hashes in SDBM
>files. I have never benchmarked, but it seems to be more durable than
>plain text files, and the minimum size of an SDBM database is just 1 kiB.
>
>What is it that makes you say it would be overkill?
I am only talking a couple of thousand pairs - and I don't have a DB
installed - at least not on this box and in any case I might be
releasing the code to a few friends and I can be sure they won't - a
plain file or a perl internal type file would be portable code.
Regards
Dave Saville
NB switch saville for nospam in address
------------------------------
Date: Sun, 28 Sep 2003 22:30:01 -0700
From: Lucius Chiaraviglio <luciusone@chapter.net>
Subject: Re: Artificial intelligence (AI) has been solved
Message-Id: <pan.2003.09.29.05.29.59.645143@chapter.net>
On Thu, 04 Sep 2003 11:17:56 +0000, Anno Siegel wrote:
> Artificial intelligence rests on the hope that eventually the computer
> will do something only humans can do. Software engineering rests on the
> hope that eventually the computer will do something, anything, please?
I assume you mean other than crash? :-)
--
Lucius Chiaraviglio
Approximate E-mail address: luciusone@chapter.net
To get the exact address: ^^^ ^replace this with 'r'
|||
replace this with single digit meaning the same thing
(Spambots of Doom, take that!).
------------------------------
Date: 29 Sep 2003 07:18:33 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Hiding PERL code
Message-Id: <slrnbnfn69.8qg.abigail@alexandra.abigail.nl>
Forte Agent (1443131@usenetplanet.com) wrote on MMMDCLXXXI September
MCMXCIII in <URL:news:754fnv0g3l4ndnjck564kain08om76ineb@4ax.com>:
<> Is there some way to hide PERL source code (maybe
<> encrypting/obfuscating it), so that you can distribute it without
<> revealing source code? Thank you in advance.
$ > your_code.pl
Abigail
--
package Just_another_Perl_Hacker; sub print {($_=$_[0])=~ s/_/ /g;
print } sub __PACKAGE__ { &
print ( __PACKAGE__)} &
__PACKAGE__
( )
------------------------------
Date: Mon, 29 Sep 2003 02:41:43 -0700
From: "David Oswald" <davido@pacifier.com>
Subject: Re: Hiding PERL code
Message-Id: <vnfviscbpo6jf1@corp.supernews.com>
"Forte Agent" <1443131@usenetplanet.com> wrote in message
news:754fnv0g3l4ndnjck564kain08om76ineb@4ax.com...
> Is there some way to hide PERL source code (maybe
> encrypting/obfuscating it), so that you can distribute it without
> revealing source code? Thank you in advance.
Who would want it? ;)
------------------------------
Date: Mon, 29 Sep 2003 09:56:51 +0000 (UTC)
From: Andreas Kahari <ak+usenet@freeshell.org>
Subject: Re: Hiding PERL code
Message-Id: <slrnbng0ev.ho5.ak+usenet@norge.freeshell.org>
In article <vnfviscbpo6jf1@corp.supernews.com>, David Oswald wrote:
>
> "Forte Agent" <1443131@usenetplanet.com> wrote in message
> news:754fnv0g3l4ndnjck564kain08om76ineb@4ax.com...
>> Is there some way to hide PERL source code (maybe
>> encrypting/obfuscating it), so that you can distribute it without
>> revealing source code? Thank you in advance.
>
> Who would want it? ;)
I was once working for a company that didn't want to thow its
"IP" around too much. Compiled Perl scripts was the only way to
distribute Perl programs to the outside of the company.
I'm not there anymore.
--
Andreas Kähäri
------------------------------
Date: Mon, 29 Sep 2003 07:59:31 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: Make problems
Message-Id: <20030929035929.0a77347b.jwillmore@cyberia.com>
On 27 Sep 2003 18:23:47 -0700
dennis@sutch.com (Dennis Sutch) wrote:
<snip>
> The Makefile seems to be corrupt. Could ExtUtils::MakeMaker-6.03 be
> at fault, or is there something that could be misconfigured on my
> system?
Yes :-)
Seriously, have you checked to make sure you have the latest versions
of CPANLUS and ExtUtils::MakeMaker? Have you tried to build the
module by hand? Or using just CPAN?
I've found that I need to update all or most of the modules provided
by Linux distros because they're almost always behind by the time the
distro is released.
HTH
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
There is nothing wrong with Southern California that a rise in
the ocean level wouldn't cure. -- Ross MacDonald
------------------------------
Date: Mon, 29 Sep 2003 03:31:21 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: Max Memory in Perl and How to reuse gabage?
Message-Id: <Xns94052DF5FD192sdn.comcast@206.127.4.25>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
deals@slip-12-64-108-121.mis.prserv.net (Great Deals) wrote in
news:cafe07c7.0309280528.3610d900@posting.google.com:
> If I use
> @lines = <INPUT>
> to read a file, to avoid the comlicated method from PerlFaq,
Do you really consider
@lines = <INPUT>;
foreach (@lines)
to be less complicated than
while (<INPUT>)
?
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP3ftxmPeouIeTNHoEQK32gCdGjTw9y+IHhq372KVUbqnYH0cYbsAoLNy
o9cwtbLsCzzITLGEJ84Xtsct
=pChz
-----END PGP SIGNATURE-----
------------------------------
Date: Mon, 29 Sep 2003 04:44:41 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Passing a directory into $ARGV[0] from a shell script
Message-Id: <ZMOdb.26058$FH3.20518@nwrddc02.gnilink.net>
John wrote:
[...
> And so, when the two scripts were run in sequence, the Perl script
> would die at:
> chdir '$ARGV[0]' || die "Cannot chdir to: $!\n";
As has been pointed out before: does a directory with the literal(!!!) name
$ARGV[0] exist?
You are using _single_ quotes, i.e. no stringification will happen, in
particular the variable name $ARGV[0] will not be expanded to the variables
value but it will be taken literally as the dollar sign, followed by an
upper case A, followed by upper R, followed by upper G, etc.
Also, you may want to replace the high-priority "||" with the low priority
"or".
Otherwise your expression will be evaluated as
chdir ("$ARGV[0]" || die "Cannot chdir to: $!\n");
which is not what you want.
jue
jue
------------------------------
Date: Mon, 29 Sep 2003 15:36:10 +1000
From: Sisyphus <kalinaubears@iinet.net.au>
Subject: Re: Perl Help - Windows Perl script accessing a Unix perl Script
Message-Id: <3f77c57e$0$23594$5a62ac22@freenews.iinet.net.au>
dpackwood wrote:
> Hello,
>
> I have two different scripts that do pretty much the same thing. The main
> perl script is on Windows. It runs and in the middle of it, it then calls
> out another perl script that then should run on a Unix box I have. Both
> scripts run ok, except for the part when Windows try's to call out the
> Unix script. I have it set up where the Unix is mapped through a drive
> letter and can drop stuff into the Unix box. It is going through another
> server to do that. So I can see the script and drop files into the Unix box
> but just can't figure out why perl will not call out the script. When I call
> out the perl script through the command line of windows I get " specified
> path not found", even though I'm in that directory.
>
> Has any one done anything like this that would be willing to either help me
> or point me in the right direction to do research on it. Thanks
>
> -Dale
>
>
Would help if we could see the code that calls the Unix script.
If you're specifying a relative path you might also verify that you're
in the directory you think you are:
use Cwd;
my $cwd = cwd;
print $cwd, "\n";
Cheers,
Rob
Cheers,
Rob
--
To reply by email u have to take out the u in kalinaubears.
------------------------------
Date: 29 Sep 2003 07:22:47 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: Perl Help - Windows Perl script accessing a Unix perl Script
Message-Id: <slrnbnfne7.8qg.abigail@alexandra.abigail.nl>
dpackwood (dpackwood@earthlink.net) wrote on MMMDCLXXXI September
MCMXCIII in <URL:news:BjNdb.7424$RW4.3844@newsread4.news.pas.earthlink.net>:
`` Hello,
``
`` I have two different scripts that do pretty much the same thing. The main
`` perl script is on Windows. It runs and in the middle of it, it then calls
`` out another perl script that then should run on a Unix box I have. Both
`` scripts run ok, except for the part when Windows try's to call out the
`` Unix script. I have it set up where the Unix is mapped through a drive
`` letter and can drop stuff into the Unix box. It is going through another
`` server to do that. So I can see the script and drop files into the Unix box
`` but just can't figure out why perl will not call out the script. When I call
`` out the perl script through the command line of windows I get " specified
`` path not found", even though I'm in that directory.
How are you contacting the Unix machine to instruct it to run that
other program? Just because you share a disk between the Windows and
Unix machine doesn't mean that if you execute the program from Windows
it's going to run on the Unix machine.
You need to use something. rsh, ssh, remsh, HTTP/CGI, SOAP, RPC, or
something else.
But none of that has anything to do with Perl. You'd do the same if you
were programming in another language. So, this isn't the appropriate
place to ask for details.
Abigail
--
$=-=4*++$|;{print$"x--$==>"\@\x7Fy~*kde~box*Zoxf*Bkiaox \r"
^
$/x24if!select$,,$,,$,,join+q=.==>$^W=>$|;$=&&redo}sleep$|;
------------------------------
Date: Mon, 29 Sep 2003 07:53:34 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: Perl Help - Windows Perl script accessing a Unix perl Script
Message-Id: <20030929035232.696d40ab.jwillmore@cyberia.com>
On Mon, 29 Sep 2003 03:05:05 GMT
"dpackwood" <dpackwood@earthlink.net> wrote:
> I have two different scripts that do pretty much the same thing. The
> main perl script is on Windows. It runs and in the middle of it, it
> then calls out another perl script that then should run on a Unix
> box I have. Both scripts run ok, except for the part when Windows
> try's to call out the Unix script. I have it set up where the Unix
> is mapped through a drive letter and can drop stuff into the Unix
> box. It is going through another server to do that. So I can see the
> script and drop files into the Unix box but just can't figure out
> why perl will not call out the script. When I call out the perl
> script through the command line of windows I get " specified path
> not found", even though I'm in that directory.
>
> Has any one done anything like this that would be willing to either
> help me or point me in the right direction to do research on it.
> Thanks
Code would be helpful :-)
So "pointers" to help you solve your own issue:
1) #!/usr/bin/perl -w on the first line :-)
2) use strict on the second line :-)
3) use diagnostics on the third line :-)
HTH
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
There is a green, multi-legged creature crawling on your
shoulder.
------------------------------
Date: Sun, 28 Sep 2003 23:50:32 -0500
From: "Matthew H" <nospam.h@yahoo.com>
Subject: POP3 - SMTP Script
Message-Id: <9SOdb.91$bk6.70821@news.uswest.net>
Does anyone know of a perl script that will pop3 all the messages out of a
given account and then SMTP them into a different account? What I am doing
is upgrading email servers and I need to move all the email out of the old
server into the new one.
Matt
------------------------------
Date: 29 Sep 2003 07:24:06 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: POP3 - SMTP Script
Message-Id: <slrnbnfngm.8qg.abigail@alexandra.abigail.nl>
Matthew H (nospam.h@yahoo.com) wrote on MMMDCLXXXI September MCMXCIII in
<URL:news:9SOdb.91$bk6.70821@news.uswest.net>:
## Does anyone know of a perl script that will pop3 all the messages out of a
## given account and then SMTP them into a different account? What I am doing
## is upgrading email servers and I need to move all the email out of the old
## server into the new one.
system "fetchmail";
and make an appropriate fetchmail.rc file. But there are other groups
to discuss the details, as that has nothing to do with Perl.
Abigail
--
tie $" => A; $, = " "; $\ = "\n"; @a = ("") x 2; print map {"@a"} 1 .. 4;
sub A::TIESCALAR {bless \my $A => A} # Yet Another silly JAPH by Abigail
sub A::FETCH {@q = qw /Just Another Perl Hacker/ unless @q; shift @q}
------------------------------
Date: Mon, 29 Sep 2003 07:43:12 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: POP3 - SMTP Script
Message-Id: <20030929034310.74a32acc.jwillmore@cyberia.com>
On Sun, 28 Sep 2003 23:50:32 -0500
"Matthew H" <nospam.h@yahoo.com> wrote:
> Does anyone know of a perl script that will pop3 all the messages
> out of a given account and then SMTP them into a different account?
> What I am doing is upgrading email servers and I need to move all
> the email out of the old server into the new one.
For a "pre-made" solution, go to http://freshmeat.net. You may find
something there.
If you want to write your own, use Net::POP3 and Net::SMTP.
If you work for a company and use a *NIX host system, have you used a
test box to see what happens when you use the /var/spool directory for
both SMTP servers apps? It _may_ not be a requirement to move the
files at all. For example, when going from sendmail to postfix, it's
mentioned in the FAQ on how to do this.
Maybe you're really looking at moving email from one service such as
Yahoo to Netscape or HotMail, in which case you can visit
http://search.cpan.org and search for modules that deal with web based
email -or- use Net::POP3, Net::SMTP, and LWP. You _may_ run into
issues though, because _some_ web based email requires that you have
JavaScript enabled to view the mail (because they use JSP or an applet
to maintain state between pages you view). I don't think LWP fits the
HTH
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
You will lose your present job and have to become a door to door
mayonnaise salesman.
------------------------------
Date: Mon, 29 Sep 2003 04:33:52 GMT
From: ed <coo_t2-NO-LIKE-SPAM@yahoo.com>
Subject: refer to object in another package
Message-Id: <8sbfnv837fdtd0l6iqcnvodbj8cvfsii3l@4ax.com>
Hey all. This is probably a simple question, but I've looked around
the faq and other parts of the manual and haven't found an answer yet.
I want to use an object from another package.
Example:
--- START Perl CODE -----
$obj = new Object;
# ... DO STUFF in anotherPackage ......
{ package anotherPackage;
# How do I refer to $obj from here?
# I've tried $main::obj and *main::obj
# but neither seem to work
}
--- END Perl CODE ------
tia,
--ed
------------------------------
Date: Mon, 29 Sep 2003 09:15:13 +0200
From: "Michael Korte" <michael.korte@materna.de>
Subject: Re: refer to object in another package
Message-Id: <bl8m63$cl2$1@pentheus.materna.de>
<snipped>
> I want to use an object from another package.
> { package anotherPackage;
<Snipped>
> # I've tried $main::obj and *main::obj
> # but neither seem to work}
try : $newobject = Package::Classname->new();
HTH
Michael
------------------------------
Date: Mon, 29 Sep 2003 08:11:31 +0200
From: "Mark" <admin@asarian-host.net>
Subject: Sendmail::Milter without threads
Message-Id: <Q9udnUe5tu-7UOqiRVn-uw@giganews.com>
Hello,
I am interested in Sendmail::Milter on my FreeBSD 4.7R machine, but then for
Perl without threads. When I installed Perl, I compiled it without thread
support, as I believe thread support is still experimental in Perl 5.8.0.
So, is there a Sendmail::Milter that will not require a threads-enabled
Perl? Or is there perhaps another Perl Milter out there I could use?
Thanks,
- Mark
------------------------------
Date: Mon, 29 Sep 2003 08:09:39 +0200
From: "Mark" <admin@asarian-host.net>
Subject: Unique identifiers in Sendmail::Milter 0.18
Message-Id: <CNidnZ04G5AlUeqiRVn-gg@giganews.com>
I am using Sendmail::Milter 0.18, on Perl 5.8.0, and I was wondering whether
the connection object $ctx has any properties which allow me to uniquely
identify it. For example:
sub connect_callback {
my $ctx = shift;
It appears $ctx is hardly unique, and can therefore not be use as follows:
my $hostname = shift;
my $sockaddr_in = shift;
my ($port, $iaddr);
if (defined $sockaddr_in) {
($port, $iaddr) = sockaddr_in ($sockaddr_in);
$connections{$ctx} = inet_ntoa ($iaddr);
}
return SMFIS_CONTINUE;
}
Since $ctx is not unique, the %connections hash becomes useless. So, does
$ctx have a unique property, per connection, which allows me to distinguish
it from others?
Much obliged,
- Mark
------------------------------
Date: Mon, 29 Sep 2003 08:07:00 GMT
From: James Willmore <jwillmore@cyberia.com>
Subject: Re: Uploading files using CGI.pm
Message-Id: <20030929040658.084be396.jwillmore@cyberia.com>
On Sun, 28 Sep 2003 12:55:22 +0100
"D Borland" <notavailable@nospamplease.com> wrote:
> Can anyone see why this is not working, when i use the script on my
> web hosting service, it returns success but no image has been
> uploaded when i look in the uploads dir, just can't see why it's not
> working...
<snip>
use strict should be in your code.
Have you checked the error log for the server? Are you sure you can
upload files? Some providers restrict that type of action. How about
the directory you're uploading to - have permission to place files
there? Also consider full paths instead of relative paths. The
server error log will aid you in determining if this is the issue.
There isn't much to go on - because you need to follow some of the
suggestions above and also need to consider posting to a CGI authoring
group.
HTH
--
Jim
Copyright notice: all code written by the author in this post is
released under the GPL. http://www.gnu.org/licenses/gpl.txt
for more information.
a fortune quote ...
Indifference will be the downfall of mankind, but who cares?
------------------------------
Date: Mon, 29 Sep 2003 10:08:09 +0100
From: "D Borland" <notavailable@nospamplease.com>
Subject: Re: Uploading files using CGI.pm
Message-Id: <NDSdb.6668$4D.4135685@newsfep2-win.server.ntli.net>
It's OK i managed to figure it all out in the end.
Below is a copy of the script which now works fine.
Thanks for everyones time in this matter.
Dagmar
__CODE__
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
use CGI::Carp 'fatalsToBrowser';
CGI::POST_MAX = 1024 * 500;
my $uploadDir = "$ENV{'DOCUMENT_ROOT'}";
my $query = new CGI;
my $filename = $query->param('image1');
$filename =~ s/.*[\/\\](.*)/$1/;
my $uploadFile = $query->upload('image1');
open (NEWFILE, ">$uploadDir/$filename")
or die "Unable to open $uploadDir/$filename : $!\n";
binmode (NEWFILE);
while (<$uploadFile> ) {
print (NEWFILE);
}
close (NEWFILE);
print $query->header,
$query->start_html('File Uploaded'),
$query->p('Succesful upload'),
$query->end_html;
__END__
------------------------------
Date: 28 Sep 2003 22:29:32 -0700
From: kuujinbo@hotmail.com (ko)
Subject: Re: use strict with an undeclared variable
Message-Id: <92d64088.0309282129.b6e5afa@posting.google.com>
Steve Grazzini <grazz@pobox.com> wrote in message news:<jUJdb.10991$yU5.742@nwrdny01.gnilink.net>...
> ko <kuujinbo@hotmail.com> wrote:
> > "Eric J. Roode" <REMOVEsdnCAPS@comcast.net> wrote:
> > > Because there exists such a thing as 'sort' (and because of how 'sort'
> > > works in Perl), the variables $a and $b are exempted from this check.
> >
> > Sometimes I need literal explanations :( Is it correct to say that $a
> > and $b are only exempt inside a condition and loop?
>
> No. They're always exempt. (Try it and see.)
>
> > For example, you
> > must declare $a or $b just like any other variable when used in the
> > main body of a program/sub:
> >
> > [SNIPPET]
> > #!/usr/bin/perl -w
> > use strict;
> > $a = 1;
> >
> > [RESULT]
> > Name "main::a" used only once: possible typo at f:\perl\a.pl line 3.
>
> That's different. The "used only once" warning has nothing to do
> with strict. If $a weren't exempt from strict-checking, you'd get
> a compilation error. (Try it with $c.)
And he *finally* sees the light! For some reason I had it stuck in my
head that $a and $b were only special within a sort routine, and have
always associated special variables with uppercased alphabetic or
punctuation characters.
Thanks for the straightforward explanation.
------------------------------
Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re:
Message-Id: <3F18A600.3040306@rochester.rr.com>
Ron wrote:
> Tried this code get a server 500 error.
>
> Anyone know what's wrong with it?
>
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {
(---^
> dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
...
> Ron
...
--
Bob Walton
------------------------------
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:
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.
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 V10 Issue 5582
***************************************