[13171] in Perl-Users-Digest
Perl-Users Digest, Issue: 581 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 18 23:07:14 1999
Date: Wed, 18 Aug 1999 20:05:09 -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 Wed, 18 Aug 1999 Volume: 9 Number: 581
Today's topics:
ANNOUNCE: libxml-perl-0.05 <ken@bitsko.slc.ut.us>
Re: Creating perl reports (Ronald J Kimball)
Re: Creating perl reports (brian d foy)
Re: DBI & Oracle connect problem. <makkulka@cisco.com>
Re: Does anyone know Perl call PL/SQL store procedure U <makkulka@cisco.com>
FontMonkey <pmagnus@fecundity.com>
Re: HARASSMENT -- Monthly Autoemail <tchrist@mox.perl.com>
Re: HARASSMENT -- Monthly Autoemail <drclue@drclue.net>
How do you create a directory??? <vbenjam@provalue.net>
Re: How to get length of multidimensional array element (brian d foy)
Re: How to get length of multidimensional array element <bwalton@rochester.rr.com>
Re: How to get length of multidimensional array element (elephant)
Re: learning perl from a book,need help (elephant)
Re: net use won't work in perl <bwalton@rochester.rr.com>
Re: net use won't work in perl (elephant)
Re: problem using open in a package (Martien Verbruggen)
Question about date (Jimtaylor5)
Re: Question about date <cmd@maths.uq.edu.au>
Re: reverse() weirdness <bwalton@rochester.rr.com>
Re: Strange Error <jimmy@blackhole-designs.com>
Re: system() under Win32 <bwalton@rochester.rr.com>
Re: Upload file via html and browse (Martien Verbruggen)
Re: while ($filename = <*.pm> (Ronald J Kimball)
Re: while ($filename = <*.pm> <makkulka@cisco.com>
Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Aug 1999 01:12:20 GMT
From: Ken MacLeod <ken@bitsko.slc.ut.us>
Subject: ANNOUNCE: libxml-perl-0.05
Message-Id: <7pfllk$5gn$1@play.inetarena.com>
libxml-perl-0.05 is making it's way to CPAN archive sites.
libxml-perl is a collection of smaller Perl modules, scripts, and
documents for working with XML. libxml-perl software works in
combination with XML::Parser, PerlSAX, XML::DOM, XML::Grove, and
others.
<http://www.perl.org/CPAN/modules/by-module/XML/>
HTML-rendered PODs can be found on the home page,
<http://bitsko.slc.ut.us/libxml-perl/>
Significant changes since libxml-perl-0.04:
* Major update to the PerlSAX specification:
* Added an introduction
* Added a ``Deviations from the Java version'' section
* Re-added the `set_document_locator()' handler method
* Added arguments to method synopses
* Attributed most of the content to the SAX 1.0 Java
Implementation documentation
* XML::Handler::XMLWriter: a new PerlSAX handler for writing
readable XML (in contrast to Canonical XML). Similar to
XML::Parser's Stream style
* XML::Handler::Subs: a new PerlSAX handler base class for calling
user-defined subs by element-name. Similar to XML::Parser's Subs
style
* XML::PatAct::ToObjects: added a CopyAttributes option and a
`-grove-contents' action
libxml-perl contains the following:
Modules
XML::Parser::PerlSAX
XML::Handler::XMLWriter
XML::Handler::Subs
XML::Handler::Sample
XML::Handler::CanonXMLWriter
XML::ESISParser
Data::Grove
Data::Grove::Parent
Data::Grove::Visitor
XML::PatAct::ActionTempl
XML::PatAct::Amsterdam
XML::PatAct::MatchName
XML::PatAct::PatternTempl
XML::PatAct::ToObjects
XML::SAX2Perl
XML::Perl2SAX
Documents
PerlSAX
Using PerlSAX
Using PatAct Modules
Creating PatAct Modules
List of Perl XML modules by category, in XML
--
Ken MacLeod
ken@bitsko.slc.ut.us
------------------------------
Date: Wed, 18 Aug 1999 21:38:57 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Creating perl reports
Message-Id: <1dwr45o.unyf3q1iudiiwN@p20.block2.tc1.state.ma.tiac.com>
Bill <isspecial@fast.net> wrote:
> I'm new to perl programming and was wondering if there is any utility
> or package out there to allow me to design a perl report using a
What is a "perl report"?
> WYSIWYG interface. I need to develope perl code that can access a
> MYSQL database and build a report page or pages that can be directly
> viewed on the company web site and look like the current paper reports
> we already generate. I'm sure it can be done but I'm getting a bit
> overwhelmed with the code itself and if I could generate most of the
> report code with a utility and then tweek it to use my database it
> would certainly speed up the process. So if anyone could give me a
> boot in the right direction I would really appreciate it.
Generate your HTML in your favorite WYSIWYG editor. Paste it into your
Perl code in a print statement (probably in a here-doc), and insert Perl
variables in the appropriate places.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Wed, 18 Aug 1999 21:50:16 -0400
From: brian@pm.org (brian d foy)
Subject: Re: Creating perl reports
Message-Id: <brian-ya02408000R1808992150160001@news.panix.com>
In article <1dwr45o.unyf3q1iudiiwN@p20.block2.tc1.state.ma.tiac.com>, rjk@linguist.dartmouth.edu (Ronald J Kimball) posted:
> Bill <isspecial@fast.net> wrote:
>
> > I'm new to perl programming and was wondering if there is any utility
> > or package out there to allow me to design a perl report using a
>
> What is a "perl report"?
that would be soemthing made with write(), i would think. that R part
of Perl. :)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Wed, 18 Aug 1999 18:18:29 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: DBI & Oracle connect problem.
Message-Id: <37BB5B65.37A6AC5@cisco.com>
[Parai Ly wrote:
> The problem is when I try to connect, I get the below error.
> DBI->connect failed: ORA-12154: TNS:could not resolve service name (DBD ERROR: OCIServerAttach) at /home/lye/dbi.pl line 4
Try setting the Environment variable inside a BEGIN {} block in your script.
BEGIN{ $ENV{'ORACLE_HOME') ='/opt/products/oracle/current' ; }
--
------------------------------
Date: Wed, 18 Aug 1999 19:08:52 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: Does anyone know Perl call PL/SQL store procedure URL links?
Message-Id: <37BB6734.65C76EC2@cisco.com>
[ Weiming He wrote:
> Does anyone know Perl call PL/SQL store procedure URL links?
> Especially for transaction PL/SQL procedure. If someone knows
> please drop me lines. Thanks in advance.
This is clearly explained in the DBI FAQ ( items 5.3 and 5.4 ).
--Makarand
------------------------------
Date: Wed, 18 Aug 1999 18:12:09 -0700
From: "P.D. Magnus" <pmagnus@fecundity.com>
Subject: FontMonkey
Message-Id: <MLIu3.6733$K8.142861@newsr1.san.rr.com>
When I began developing my website, I was disappointed that I couldn't
find a shareware or freeware cgi counter that would present the output as
one graphic-- the only ones I could find output an ascii number or a chain
of IMG tags. In the course of writing such a thing, I wrote a general
purpose module which assembles alphanumeric messages into gif's in several
different layouts and fonts. It took some work and it's fairly robust, but
it's no killer app-- it uses GD for graphic handling.
So, my question is this: should I make this available as freeware? I'd
have to write some docs for it and so on, but it'd be no big deal if anyone
might use it. If such a things already exists somewhere or if it would fall
still-born from the press, however, I'll just go on with other things.
I guess my question is as much about the Perl community as about
anything. Is this the sort of thing that one makes publicly available?
Thanks,
P.D.
* * *
full name : P.D. Magnus
internet mail : mailto:pmagnus@fecundity.com
web emplacement: http://www.fecundity.com
shoe size : 9 1/2
------------------------------
Date: 18 Aug 1999 19:30:37 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <37bb5e3d@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
darsal@erols.com (Dave Salovesh) writes:
:In article <37bb49d8.39263948@nntp.ix.netcom.com>,
:miker3@ix.netcom.com (Michael Rubenstein) opined:
:
:>But this has nothing to do with what Tom is doing. He is not
:>responding to articles -- he's harassing. He's sending email to
:>someone who has asked that he stop.
:
:I see that. I don't know what anyone expects you or me to do about it.
A false hypothesis has an irrevelvant conclusion.
If someone asks me to stop mentioning to them every month or three that
their postings have been mangled and maybe they should check into it, then
I put an entry in the database so they don't get sent that reminder again.
I should put the modules, programs, and datafiles that I use for all
this up again so that everyone can play. Peer pressure works.
--tom
--
Timesharing: the use of several people by the computer
------------------------------
Date: Wed, 18 Aug 1999 19:03:24 -0700
From: ".." <drclue@drclue.net>
Subject: Re: HARASSMENT -- Monthly Autoemail
Message-Id: <37BB65E8.E1FE5D4E@drclue.net>
Uriel Wittenberg wrote:
> This comp.infosystems.www.authoring.html participant appears to have
> opted to openly harass me -- by a monthly autoemail of his message --
> in order to make me conform to his idea of correct style in posting.
>
> Regardless of anyone's position on posting style, I would hope just
> about everyone understands the vindictive and antisocial nature of
> such behavior.
The auto email from one who does not value the interaction enough to do it him/her self sucks, and as far as I'm conerned , any
automated response not specifically asked for IS spam.
The fact that a vocal minority should achieve something for being more annoying
than honest folks is even more annoying.
I'm just a simple software engineer, not a highschool trenchcoat, nor a day trader , but
vocal ignorance does have me looking at my abilities in the digital fertilizer realm.
It would be so easy , but I'd prefer an honest debate about why it's ok to inflict ones self
on posters w/o ever answering their posts, making the format of interaction more important
than an answered question?
--
--=<> Dr. Clue (A.K.A. Ian A. Storms) <>=--
--=<[]>=- http://www.drclue.net
--=<[]>=- C++ HTML JavaScript JAVA VRML DHTML CGI NSAPI TCP/IP SQL
--=<[]>=- http://www.drclue.net/F1.cgi/HTML/HTML.html (My famous HTML/CGI guide.)
------------------------------
Date: Sun, 15 Aug 1999 21:33:24 -0500
From: "Ben Valentine" <vbenjam@provalue.net>
Subject: How do you create a directory???
Message-Id: <DWJu3.412$Kr3.6352@newsfeed.slurp.net>
see subject.
thanks,
Ben
------------------------------
Date: Wed, 18 Aug 1999 21:47:45 -0400
From: brian@pm.org (brian d foy)
Subject: Re: How to get length of multidimensional array element
Message-Id: <brian-ya02408000R1808992147450001@news.panix.com>
In article <7pfl12$c2q$1@panix3.panix.com>, gshalet@panix.com (Greg Shalette) posted:
> $#ComData[2] doesn't work for getting the length of the 3rd element of
> the array ComData.
you want $#{$ComData[2]}
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Monger Hats! <URL:http://www.pm.org/clothing.shtml>
------------------------------
Date: Wed, 18 Aug 1999 21:43:54 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: How to get length of multidimensional array element
Message-Id: <37BB615A.65AED3F7@rochester.rr.com>
...
> How does one get the length of one element of a multidimensional array?
>
> Eg.
>
> $#ComData[2] doesn't work for getting the length of the 3rd element of
> the array ComData.
>
...
Greg, you need something like:
$#{$ComData[2]}
but that doesn't get you the length either -- it gets you the element
number of the last element of the array referenced by $ComData[2]. If $[
is 0 (the default), that is one less than the number of elements. If you
want the number of elements, try:
@{$ComData[2]}
in a scalar context.
Example:
$ComData[2]=['one','two','three','four'];
print $#{$ComData[2]}."\n";
print @{$ComData[2]}."\n";
prints:
3
4
------------------------------
Date: Thu, 19 Aug 1999 12:18:00 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: How to get length of multidimensional array element
Message-Id: <MPG.1226146084a364b989c4b@news-server>
Greg Shalette writes ..
>How does one get the length of one element of a multidimensional array?
>
>Eg.
>
> $#ComData[2] doesn't work for getting the length of the 3rd element of
> the array ComData.
assuming
my @a = ( [1,2], [3,4,5], [6,7,8,9]);
then
my $lengthOfThirdArray = @{$a[2]};
my $indexOfLastElementInThirdArray = $#{$a[2]};
of course .. if your initial declaration was an anonymous array ref as
well then you just dereference that .. ie. assuming
my $ar = [ [1,2], [3,4,5], [6,7,8,9]];
then
my $lengthOfThirdArray = @{$$a[2]};
my $indexOfLastElementInThirdArray = $#{$$a[2]};
HTH
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Thu, 19 Aug 1999 11:57:49 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: learning perl from a book,need help
Message-Id: <MPG.12260fabb451ea00989c4a@news-server>
Ben Horowitz writes ..
>i need help, i dont understand the jargan?,what is a string?,when do you use
>double postrophies",and when do you use single postrophies'?is it possiable
>to learn only from a book,i just started and am a real newbie,?
yes - you can learn a book's worth of Perl from a book .. if you really
don't know what a string is then you should seriously consider getting a
book like Learning Perl By Randal L. Schwartz & Tom Christiansen from
O'Reilly .. more details from their web site
http://www.oreilly.com/catalog/lperl2/
once you can understand the simple terminology - like "string" .. you'll
learn a lot from the online documentation (including the answer to your
double-quote single-quote question)
assuming that you've got perl installed - at a command prompt type
perldoc perl
and go from there .. btw - IMHO the ordering is a little unhelpful for a
beginner .. skip over perldelta and perl5004delta (how is that still in
there ?) and skim through perlfaq and perltoc and start in earnest with
perldoc perldata
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Wed, 18 Aug 1999 21:57:04 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: net use won't work in perl
Message-Id: <37BB6470.BED585A7@rochester.rr.com>
...
> I am using Perl to map a drive. However, it never works. Here is my
> statement:
> system( "net use t: \\\\srvrabc\\c\$ /user:administrator" );
> or `net use t: \\\\srvrabc\c$ /user:administrator`;
...
I tried it, and it works fine, although I didn't try it with a "c$"
name, but rather a share name I defined, since I'm running Windows 95.
You might note that your second line should read:
`net use t:\\\\srvrabc\\c\$ /user:administrator`;
since `` are interpolated just like "".
Are you sure your commands work if typed directly into the command
prompt?
------------------------------
Date: Thu, 19 Aug 1999 12:41:32 +1000
From: elephant@squirrelgroup.com (elephant)
Subject: Re: net use won't work in perl
Message-Id: <MPG.122619e3a8707ac2989c4c@news-server>
Sam Chan writes ..
>I am using Perl to map a drive. However, it never works. Here is my
>statement:
>system( "net use t: \\\\srvrabc\\c\$ /user:administrator" );
this works for me .. are you able to do
net use t: \\srvrabc\c$ /user:administrator
from the NT command prompt ? .. because obviously if it doesn't work
there then it will not work in your script .. also - if your script is
not being executed by you - but by some other mechanism (eg. via a web
server) then the user context under which the script is being executed
may prevent this command working
>or `net use t: \\\\srvrabc\c$ /user:administrator`;
this will not work because you don't have enough backwacks in there for
perl to be happy - remember that backticks are interpolated the same as
a double-quoted string unless the qx delimiter is the single quote
but for me
my $x = `net use t: \\\\srvrabc\\c\$ /user:administrator`;
also works a treat
although I prefer
my $x = qx'net use t: \\\srvrabc\c$ /user:administrator';
much neater (don't forget that even in a single quoted string a \\ = \
.. hence the triple '\' (a product of Microsoft's stupidity)
btw .. until now I never knew that you could put whitespace between the
$, @ or % (one presumes the & as well) and the identifier name
--
jason - elephant@squirrelgroup.com -
------------------------------
Date: Thu, 19 Aug 1999 02:30:53 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: problem using open in a package
Message-Id: <x%Ju3.283$6U2.8216@nsw.nnrp.telstra.net>
In article <01bee98d$c5dfed80$0664a8c0@psusa6.petrosys-usa.com>,
"Alec Kelingos" <akelingos@petrosys-usa.com> writes:
> When I use the open statement in a local subroutine things work fine. But
> if the same routine is called from a package the file handle won't open.
# perldoc perlfaq5
How can I make a filehandle local to a subroutine? How do I
pass filehandles between subroutines? How do I make an
array of filehandles?
Martien
--
Martien Verbruggen |
Interactive Media Division | +++ Out of Cheese Error +++ Reinstall
Commercial Dynamics Pty. Ltd. | Universe and Reboot +++
NSW, Australia |
------------------------------
Date: 19 Aug 1999 01:44:57 GMT
From: jimtaylor5@aol.com (Jimtaylor5)
Subject: Question about date
Message-Id: <19990818214457.08472.00000771@ng-fw1.aol.com>
Can anyone tell me how I would check a date to see if two or more days have
passed? For example I tried taking the standard date time
(Mon Aug 16 21:57:34 1999) splitting it, matching, and incrimenting, which of
course doesn't work consistently. Has anyone done this check with any of their
programs or can show me a way to accurately check if a couple days have passed?
------------------------------
Date: Thu, 19 Aug 1999 12:34:11 +1000
From: chris dawson <cmd@maths.uq.edu.au>
Subject: Re: Question about date
Message-Id: <37BB6D23.B43A20D6@maths.uq.edu.au>
Jimtaylor5 wrote:
>
> Can anyone tell me how I would check a date to see if two or more days have
> passed?
Isn't the localtime() function sufficient for this?
Chris.
------------------------------
Date: Wed, 18 Aug 1999 22:27:55 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: reverse() weirdness
Message-Id: <37BB6BAB.997810F3@rochester.rr.com>
...
> Hi I was mucking around with reversing a flat file so that the first line would
> end up on the bottom. Anyway I wrote a two line program to do this and print
> the reversed file to STDOUT.
>
> If I do this it works fine:
> open(FILE, "$file") || die "$! $file\n";
> print reverse(<FILE>);
>
> But if I do this:
> open(FILE, "$file") && print reverse(<FILE>) || die "$! $file\n";
>
> Not only does it reverse the order of the file but all of the charactes in the
> file are printed in reverse order. Why does one do one thing and he other do
> another?
...
The problem is in operator precedence. The || operator has a higher precedence
that the "print reverse(<FILE>)", so it gets interpreted as:
print(reverse(<FILE>) || die "$! $file\n");
rather than the desired:
(print reverse(<FILE>)) || die "$! $file\n";
When the output of reverse is applied to a scalar operator (like ||), it causes
reverse to concatenate its list input and then do a string reverse. See perlfunc.
Try:
open(FILE,"$file") and print reverse(<FILE>) or die "$! $file\n";
That works because the "and" and "or" operator precedence is lower than the
space-style function call operator, causing reverse to retain its array context.
Or try:
open(FILE,"$file") && (print reverse(<FILE>)) || die "$! $file\n";
which also works.
Or try:
open(FILE, "$file") && print(reverse(<FILE>)) || die "$! $file\n";
That works too. With and and or, you can save your wrist a bit by removing the
()'s on open also:
open FILE,$file and print reverse <FILE> or die "$! $file\n";
But note that something as commonly innocuous-appearing as:
print reverse(<FILE>)."\n";
will cause reverse to do a string reverse rather than an array reverse. Cool, but
sort of deep, good for obfuscation.
------------------------------
Date: Thu, 19 Aug 1999 01:32:52 GMT
From: Jimmy Humphrey <jimmy@blackhole-designs.com>
Subject: Re: Strange Error
Message-Id: <37BB5F61.8A93BA8B@blackhole-designs.com>
Nevermind guys, I saw that I did not put a "use POSIX 'strgtime' (or
whatever it is)
Jimmy
Jimmy Humphrey wrote:
> Hi,
>
> I'm getting the following error in my perl/cgi script in my log files.
>
> [Wed Aug 18 09:34:23 1999] [error] [client 24.93.92.238] Premature end
> of script
> headers: /home/sailing/public_html/cgi-bin/signup.pl
>
> Could anybody tell me why this might be happening. You can view my
> code at http://www.sailingpoint.com/signup.txt
>
> I'm using perl 5.005_02 on SunOS 5.7. And, everything with my html
> form is correct btw.
>
>
> Jimmy
>
>
------------------------------
Date: Wed, 18 Aug 1999 21:09:47 -0400
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: system() under Win32
Message-Id: <37BB595A.BA6E77DE@rochester.rr.com>
> ...
> Consider the call: system $x;
> That is, one argument to system, holding a string.
>
> If the string contains
> foo.exe arg arg arg
>
> it works just fine.
>
> If the string contains
> "foo.exe" arg arg arg
>
> the spawning process fails to find the program.
> In this case, it's not necessary. But if the program name contained spaces,
> the quotes would be required. Shouldn't the logic behind system()
> understand this?
>
> As a work-around, I used two arguments to system: the first containing the
> program name, the second containing the args. This handles the case where
> the first arg contains spaces.
...
John, you can't really blame this one on Perl, but rather on Microsoft's
braindead command interpreter (you are, I assume, using Win32 given the nature
of the command quoting you are attempting, even though you neglected to mention
what your OS is). Note, for example, that if you type
echo hi there
at a command prompt, it works, and that if you type:
"echo" hi there
it doesn't work (it gives "Bad command or file name").
But if you have a file called "junk.bat", you can run it with either:
junk
or
"junk"
and that
"junk junk"
will work for "junk junk.bat". Don't ask me why some commands can be quoted and
others cannot -- ask Microsoft, they're the ones who blew it. Note that this
same thing works from Perl's system command, too.
"system"'s job in life is to present its argument to the shell for execution,
and that is what is does. It is up to you to make sure that the argument is a
command the shell you are using knows how to execute. If you can't do it at a
command prompt, you can't do it in "system"; if you can do it at a command
prompt, you should be able to do it in "system", using exactly the same string.
If you think about it a bit, I'm sure you will agree that you wouldn't want Perl
attempting to somehow automatically adjust your command strings in the system
command before presenting them to the shell -- after all, what if you were using
some other shell, like maybe one you wrote yourself? How would Perl know what
needs fixing and what doesn't? BTW, you could use the "bash" (Bourne again)
shell under Win32 and get around some of the annoying behavior of the Microsoft
command shell.
------------------------------
Date: Thu, 19 Aug 1999 02:14:51 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Upload file via html and browse
Message-Id: <vMJu3.277$6U2.8216@nsw.nnrp.telstra.net>
In article <37BA68E0.2F01ACD@reimer.ch>,
Patrick Stalder <internet@reimer.ch> writes:
> I have create a html page with a form, on which I can upload a file
> to the server via directly via browser. The perl program receive
> this file and save this to the local disk. This process is working
> correctly. But if I upload a file larger than 50 KByte, the server
> cut this file and save only the first 50 Kbyte.
Are these files maybe what NT calls binary files? If so, did you
remember to use binmode on both the read and write file handles?
> Has anyone the same problems? Maybe it is a configuration problem of IIs
> 4.0!
If it is, this is not the group to talk about that. There are spcific
groups about server configuration in the comp.infosystems.www.*
hierarchy.
Martien
--
Martien Verbruggen |
Interactive Media Division | The world is complex; sendmail.cf
Commercial Dynamics Pty. Ltd. | reflects this.
NSW, Australia |
------------------------------
Date: Wed, 18 Aug 1999 21:38:59 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: while ($filename = <*.pm>
Message-Id: <1dwr58r.1f6psov1fmvn30N@p20.block2.tc1.state.ma.tiac.com>
Derek <nospam-derek@realware.com.au> wrote:
> The line
>
> while ($filename = <$path>)
>
> causes the error
>
> Uncaught exception from user code:
> Can't use string ("*.pm") as a symbol ref while "strict refs" in use
> at G:\Build\file_report.pl line 21.
> I have looked in perlref, but have not figured out how to get $path to satisfy
> the requirements. Is it possible.
Look in perlop instead, under I/O operators. <$path> is a filehandle
read, not a file glob.
Use glob($path) instead.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Wed, 18 Aug 1999 18:54:42 -0700
From: Makarand Kulkarni <makkulka@cisco.com>
Subject: Re: while ($filename = <*.pm>
Message-Id: <37BB63E2.AE93C73E@cisco.com>
[ Derek wrote:
{ lots of code snipped...}
> The line while ($filename = <$path>) causes the error
> Uncaught exception from user code:
> Can't use string ("*.pm") as a symbol ref while "strict refs" in use at
> G:\Build\file_report.pl line 21.
> when I run the script with parameters script.pl path=*.pm
Try using glob () like this
foreach $filename ( glob ($path)){
}
------------------------------
Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 1 Jul 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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq" from
almanac@ruby.oce.orst.edu. The real FAQ, as it appeared last in the
newsgroup, can be retrieved with the request "send perl-users FAQ" from
almanac@ruby.oce.orst.edu. Due to their sizes, neither the Meta-FAQ nor
the FAQ are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq" from
almanac@ruby.oce.orst.edu.
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 581
*************************************