[8448] in Perl-Users-Digest
Perl-Users Digest, Issue: 2066 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 10 17:14:45 1998
Date: Tue, 10 Mar 98 14:01:54 -0800
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, 10 Mar 1998 Volume: 8 Number: 2066
Today's topics:
Missing output from write <feist@nortel.ca>
Need Perl Programmer: Los Angeles Area <ryoung@asucla.ucla.edu>
Re: Problem with "goto" in Perl (Steve Linberg)
Re: pty terminal control and IPC via pseudo-terminal de <chasecreek.systemhouse@usa.net>
read file problem <zlhu@iastate.edu>
Re: read file problem (Richard Bellavance)
Re: read file problem <kgraham@alpha.furman.edu>
Re: redirecting input AND output of a called program in <eike.grote@theo.phy.uni-bayreuth.de>
Re: replacing/removing a escape secquence <quentin@jihad.amd.com>
Retrieving file from root for download <pjmone@symbioticinc.com>
Re: Retrieving file from root for download (John Stanley)
Re: Retrieving file from root for download <pjmone@symbioticinc.com>
Seattle Perl Group; SLUG Perl Talk <tim@consultix.wa.com>
Skipping within a line to read URL? <skulk@Glue.umd.edu>
Re: Speed of sort routine vs. one-by-one compare (123 (Abigail)
Re: Speed of sort routine vs. one-by-one compare (123 <uri@sysarch.com>
Re: Speed of sort routine vs. one-by-one compare (123 (John Klassa)
Re: The -w switch (was Re: better way to do this?) (Craig Berry)
Uploading files gt 16mb bombs... (Diane T. Willis)
Where can I find perlman for perl/tk ? <apb.freddyb@mailexcite.com>
Win 32 serial port read and write <jimbo@soundimages.co.uk>
Re: Win32::Internet fails to retrieve files (Markus Laker)
Re: writing back to a file which is being read from <quentin@jihad.amd.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 10 Mar 1998 14:37:06 -0500
From: "Feist, Christopher" <feist@nortel.ca>
Subject: Missing output from write
Message-Id: <35059662.2E3D666D@nortel.ca>
Hi there. I seem to be having a problem with output from write.
The following code segment works just fine if I use STDOUT as the
destination for the writes but when i try to use a pipe I get
no output whatsoever from the write statements although
the pipe does execute and the mail is sent.
Am I missing something here? (This is the first thing
ive ever written in perl. I find it to be a very nice
language but like most languages it has alot of small
idiosyncracies you have to get used to)
Please note that there is no problem with format definitions
or missing variable data et al since this works fine on STDOUT.
Perl version is 5.002 and the script is running with
-w, strict and CGI.
Thanks in advance.
Chris
foreach( @maildata )
{
open( MAIL, "|mail $_\@nortel.ca" );
#$~ = "M_HEADER";
select( ( select( "MAIL" ), $~ = "M_HEADER" )[0] );
write MAIL;
$i = 0;
foreach( @functional )
{
#$~ = "M_FUNCTIONAL";
select( ( select( "MAIL" ), $~ = "M_FUNCTIONAL" )[0] );
write MAIL;
select( ( select( "MAIL" ), $~ = "M_OUTPUT" )[0] );
#$~ = "M_OUTPUT";
foreach( @{$arealist{$_}} )
{
write MAIL;
$i++;
}
}
close( MAIL );
}
--
0o0o0o0o0o0o0o0o0o0o0o00o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
o Chris Feist GCS/GMUd-s+:-a--C++++USUH$ULU+++P++L++E-W-N++o?Kw-- o
o Dept 7M52 O?M++V-PS+PEY+PGP+t+5+X-Rtv+b++DI++D++Ge++@hr--!y+ 0
0 SS7 Verification o
o feist@nortel.ca George Bush: "It's amazing how many people beat you 0
0 at golf now that you're no longer president." o
o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0o0
------------------------------
Date: Tue, 10 Mar 1998 13:37:22 -0800
From: rich <ryoung@asucla.ucla.edu>
Subject: Need Perl Programmer: Los Angeles Area
Message-Id: <3505B292.554E7CB2@SourceSvc.com>
A great company in west los angeles in need of someone with perl/html
background. If you're interested, please email back to
FoleyR@SourceSvc.com.
Thanks.
------------------------------
Date: Tue, 10 Mar 1998 15:39:06 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: Problem with "goto" in Perl
Message-Id: <linberg-1003981539060001@projdirc.literacy.upenn.edu>
In article <889479303.359052@thrush.omix.com>, Zenin <zenin@best.com> wrote:
> Andrew M. Langmead <aml@world.std.com> wrote:
> >snip<
> : The statement "goto LABEL" has its uses (maybe less so than in other
> : languages, but there are uses.)
>
> Show me one, please. So far I've yet to see a valid use that
> was not brought about by bad or no design.
I use GOTO quite a lot (after about 15 years of avoiding it like the
plague) in circumstances where there are many steps being taken in a
function, each of which may fail, and where simply quitting with an error
code isn't an option becuase there is cleaning up to do first.
It could be done with nested conditionals, but after about 4 layers deep
the code becomes unreadable. Which is cleaner?
if (cond1) {
blah
blah
if (cond2) {
blahblah
if (cond3) {
blahblahblah
blahblahblah
if (cond4) {
blahblah
blahblah
if (cond5) {
blah # repeat a few more layers
}
}
}
}
} # and we aren't even bothering with else
or
------
goto exit1 if (!cond1)
blah
blah
goto exit1 if (!cond2)
blahblah
goto exit1 if (!cond3)
blahblahblah # etc.
exit1:
clean up
return
Where there is a multi-step, linear process where each step depends on the
successful completion of the last, and especially where there is work to
do at the end (like closing files or databases), I find it much easier to
read, write and maintain code using goto.
_____________________________________________________________________
Steve Linberg National Center on Adult Literacy
Systems Programmer &c. University of Pennsylvania
linberg@literacy.upenn.edu http://www.literacyonline.org
------------------------------
Date: Tue, 10 Mar 1998 20:31:30 GMT
From: Bill Jones <chasecreek.systemhouse@usa.net>
Subject: Re: pty terminal control and IPC via pseudo-terminal devices
Message-Id: <3505A1DC.35F4@usa.net>
Hmmm, will either of these modules
'capture' the passwd I/O pipe
thereby tricking passwd into thinking
it is getting it's I/O from a particular
port?
I was just wondering, when I spoke to
Larry Wall during the time I was
writing the WebPass package, he led me
to believe it couldn't be done in Perl
without a big headache and suggested
I get the expect development system from
http://expect.nist.gov, which I did, and
after using it, I think they (Perl & Expect)
should be distributed as one
Development System :-) (IMHO.)
Just curious,
Bill :-)
Andrew M. Langmead wrote:
>
> Take a look at the Expect.pm module <URL:http://www.perl.com/CPAN/
> modules/by-authors/Austin_Schutz/Expect.pm-1.01.tar.gz>
>
> Or wait until the IO::Pty module becomes available. see
> <URL:http://reference.perl.com/module.cgi?IO::Pty> for details.
> Andrew Langmead
------------------------------
Date: Tue, 10 Mar 1998 13:38:52 -0600
From: Zhiliang Hu <zlhu@iastate.edu>
Subject: read file problem
Message-Id: <350596CB.C5B7CA16@iastate.edu>
I have a code to read a spreadsheet:
open(TEXT, "$DATABASE") || die "Cannot open database file!";
foreach $line(<TEXT>){
($1, $2, $3, $4, $5, $6, $8, $9, $10, $11, $12, $13, $14, $15, $16,
$17, $18, $19, $20, $21, $22) = split(/:/, $line);
}
close(TEXT);
while the error mesg says:
Modification of a read-only value attempted at expoolout.pl line 54,
<TEXT> chunk 1.
Changing "foreach $line(<TEXT>)" to "foreach $line(TEXT)" or to
"foreach $line(<TEXT)" didn't help. The file read/write permission
should not be a matter here since I am just READING the file. I have
the file writing permission open anyway.
Any comments are appreciated!
Zhiliang
------------------------------
Date: 10 Mar 1998 15:50:51 -0500
From: charlot@CAM.ORG (Richard Bellavance)
Subject: Re: read file problem
Message-Id: <6e493b$o3n@ocean.CAM.ORG>
In article <350596CB.C5B7CA16@iastate.edu>,
Zhiliang Hu <zlhu@iastate.edu> wrote:
>I have a code to read a spreadsheet:
>
> open(TEXT, "$DATABASE") || die "Cannot open database file!";
> foreach $line(<TEXT>){
> ($1, $2, $3, $4, $5, $6, $8, $9, $10, $11, $12, $13, $14, $15, $16,
>$17, $18, $19, $20, $21, $22) = split(/:/, $line);
> }
> close(TEXT);
>
The variables $1, $2, ... are read-only, and set when you use a regex
with "catching" parentheses. Change the name of your variables and all
should be well. I would use:
@record = split(/:/, $line);
And then access the fields as $record[0], $record[1], ...
>Modification of a read-only value attempted at expoolout.pl line 54,
><TEXT> chunk 1.
>
>Changing "foreach $line(<TEXT>)" to "foreach $line(TEXT)" or to
>"foreach $line(<TEXT)" didn't help.
>
Why are you changing line 53 when the problem is on line 54 ???
Hope this helps,
Richard.
--
Richard Bellavance -- charlot@cam.org -- http://www.cam.org/~charlot/
"All along this path I tread / My heart betrays my weary head
With nothing but my love to save / From the cradle to the grave"
(Eric Clapton, "From the cradle")
------------------------------
Date: Tue, 10 Mar 1998 16:27:05 -0500
From: kevin graham <kgraham@alpha.furman.edu>
To: zlhu@iastate.edu
Subject: Re: read file problem
Message-Id: <3505B029.D4A55927@alpha.furman.edu>
> open(TEXT, "$DATABASE") || die "Cannot open database file!";
> foreach $line(<TEXT>){
foreach would be a really ugly way to do this, even if it worked. The
accepted practice is while(<TEXT>) or while($line=<TExT>) in your case.
..kg..
------------------------------
Date: Tue, 10 Mar 1998 16:33:47 +0100
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: redirecting input AND output of a called program in perl
Message-Id: <35055D5B.446B@theo.phy.uni-bayreuth.de>
Hi,
Christof Ameye wrote:
>
> In perl you can easily redirect input OR output
>
> open(FILEO,"command |"); #for getting output
>
> open(FILEI,"| command"); #for giving input
>
> but you can't do :
>
> open(FILEIO,"| command |"); #for in AND output
>
> But that's just what I need ...
> Any idea how to do this easily ?
There is a perl module called 'IPC::Open2' (part of the standard perl
library) which does exactly what you want: open both STDIN and STDOUT
to another process. If this isn't enough, you can also add STDERR by
using 'IPC::Open3'.
Bye, Eike
--
=======================================================================
>>--->> Eike Grote <eike.grote@theo.phy.uni-bayreuth.de> <<---<<
-----------------------------------------------------------------------
Home Page, Address, PGP,...: http://www.phy.uni-bayreuth.de/~btpa25/
-----------------------------------------------------------------------
PGP fingerprint: 1F F4 AB CF 1B 5F 4B 1D 75 A1 F9 C5 7B 3F 37 06
=======================================================================
------------------------------
Date: 10 Mar 1998 12:50:10 -0600
From: Quentin Fennessy <quentin@jihad.amd.com>
Subject: Re: replacing/removing a escape secquence
Message-Id: <ximu396mlct.fsf@jihad.amd.com>
>>>>> "PS" == Peter Shankey <shankeyp@charlestoncounty.org> writes:
PS> I have a file which has been moved to a unix system from a dos
PS> system. The file contains a ^M or I should say a "ESC M". I
PS> know it a escape sequence because I see it in vi but not with
PS> a cat command.
These are not escape sequences -- control-M is the ASCII M with the
high (eighth) bit set. ^M is the 13th ascii character, conventionally
called 'carriage return'. Unix files are typically records that end
in newlines (^J), or the 10th ascii character. Check out ascii(5).
DOS files include a carriage return -- which must be stripped.
There is often a program available called dos2unix that can help
you.
perl -pi.bak -e 's/$//g' file1 file2 file3
This will fix each file listed, saving the orig contents
in a backup file named fileN.bak.
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: Tue, 10 Mar 1998 14:56:53 -0500
From: Paul Mone <pjmone@symbioticinc.com>
Subject: Retrieving file from root for download
Message-Id: <6e460l$3f4@bgtnsc03.worldnet.att.net>
My friends,
I am interested in keeping sensitive files below my htdocs
directory
(www root), so users cannot type in the absolute url and retrieve them.
These files are products that my company sells and users can (hopefully)
only download them if they enter the correct password on one of our web
pages. This is the script I have come up with and it doesn't
work...That's besides the point. I am spending too much time debugging
this tiny crappy script, I was hoping someone could provide me with a
quick tip or another script which would work immedietly :).
Any wisdom to be shed on doing a task like this would always be
very
appreicated. Paul
________________________________________________________________________
#!/usr/bin/perl
use CGI;
$|=1;
$query = new CGI;
$password = $query->param('pass');
$mypassword = "PASSWORD";
if ($password eq $mypassword)
{
$product = '/cgi-bin/files/product.zip';
$download_dir = '/htdocs/ftp';
$download_url = 'http://www.symbioticinc.com/ftp';
$unique_name = 'othername.zip';
symlink($product, "$download_dir/$unique_name");
print "Location: $download_url/$unique_name\n\n";
}
else
{
print "Location: http://www.howardstern.com/error.html\n\n";
}
------------------------------
Date: 10 Mar 1998 20:34:14 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: Retrieving file from root for download
Message-Id: <6e4846$fjl$1@news.orst.edu>
In article <6e460l$3f4@bgtnsc03.worldnet.att.net>,
Paul Mone <pjmone@symbioticinc.com> wrote:
> I am interested in keeping sensitive files below my htdocs
>directory
>(www root), so users cannot type in the absolute url and retrieve them.
>These files are products that my company sells and users can (hopefully)
>only download them if they enter the correct password on one of our web
>pages. This is the script I have come up with and it doesn't
>work...That's besides the point.
Yes, and a lot of unnecessary work. Study the documentation for your web
server and look for the section that deals with passwords. It's already
there, you don't have to reinvent the wheel. For cern servers, it can
be found under the "protection" and "protect" entries in the config
file.
------------------------------
Date: Tue, 10 Mar 1998 16:10:05 -0500
From: Paul Mone <pjmone@symbioticinc.com>
Subject: Re: Retrieving file from root for download
Message-Id: <6e4a9q$fmf@bgtnsc02.worldnet.att.net>
Paul Mone wrote:
>
> My friends,
> I am interested in keeping sensitive files below my htdocs
> directory
> (www root), so users cannot type in the absolute url and retrieve them.
> These files are products that my company sells and users can (hopefully)
> only download them if they enter the correct password on one of our web
> pages. This is the script I have come up with and it doesn't
> work...That's besides the point. I am spending too much time debugging
> this tiny crappy script, I was hoping someone could provide me with a
> quick tip or another script which would work immedietly :).
> Any wisdom to be shed on doing a task like this would always be
> very
> appreicated. Paul
>
OK, I feel I should give more information, because people keep
emailing me about .htaccess. I have a _crappy_ web hosting service with
a limit of 10 users (including email accounts), no telnet access, and
sometimes lack-luster technical support. I wish to end up having a
dozen or so account/passwords set up for different products. I don't
want to use .htaccess because I only have two more users left- I don't
want a user who buys one product to be able to get all of the products
with the same acct/passwrd, and I don't like the feel of using
.htaccess...
------------------------------
Date: Tue, 10 Mar 1998 11:07:19 -0800
From: Tim Maher/CONSULTIX <tim@consultix.wa.com>
Subject: Seattle Perl Group; SLUG Perl Talk
Message-Id: <35058F67.6C25FC15@consultix.wa.com>
This is a multi-part message in MIME format.
--------------18A9315F2F5455977B73BC3A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--
====================================================================
| Tim Maher, Ph.D. Tel/Fax: (206)781-UNIX |
| Head UNIX Guru, CONSULTIX Email: tim@consultix.wa.com |
| *The UNIX Training Experts* http://www.consultix.wa.com/yumpy/ |
| Seattle Perl Users Group: http://www.halcyon.com/yumpy/spug/ |
====================================================================
--------------18A9315F2F5455977B73BC3A
Content-Type: text/plain; charset=us-ascii; name="spug"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="spug"
UPCOMING PERL-RELATED EVENTS:
1) Seattle UNIX Group Meeting
2) Seattle Perl User's Group "First Ever" Meeting
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1) Seattle UNIX Group Meeting
MARCH 1998 SEATTLE Unix(R) GROUP MEETING
MEETING TIME AND PLACE
------------------------------------------------
Topics: ``Perl''
Time: March 10th 1998 (Second Tuesday) at 7pm
Place: Celestial Systems, Inc.
2835 82nd Ave S.E. Suite S-100
Mercer Island, WA 98040
Cost: $5.00 Non-Members.
Randy Bentson will discuss the minimum you need to know to start using Perl.
Mike Meadway will discuss building GUI applications with Perl/TK.
Tim Maher will present dynamic generation of web pages using Perl.
Seattle Unix Group INTERNET: slug@Seaslug.ORG
2835 82nd Ave SE Suite S-100 UUCP: camco!slug
PO Box 820 VOICE: (206) 947-5591
Mercer Island, WA 98040-0820 FAX: (206) 232-9186
http://www.seaslug.org/seaslug.html
2) Seattle Perl User's Group Meeting: Check Web page for directions
Topics: ``Plans for Perl User's Group; Overview of PERL''
Time: March 17th 1998 (Third Tuesday) at 7pm
Place: Loyal Heights Community Center
2101 NW 77th St.
Seattle, WA 98117
Cost: Free
Info: http://www.halcyon.com/yumpy/spug
Leader: Tim Maher, (206) 781-UNIX
--------------18A9315F2F5455977B73BC3A--
------------------------------
Date: Tue, 10 Mar 1998 15:30:16 -0500
From: "Shaila V. Kulkarni" <skulk@Glue.umd.edu>
Subject: Skipping within a line to read URL?
Message-Id: <Pine.SUN.3.95q.980310152733.11244A-100000@convertor.isr.umd.edu>
I am having trouble with the following bit and really don't know why my
code isn't working.
This line is present in a file i need to read:
[Sun Feb 1 00:07:38 1998] access to /homes/kanlis/public_html/Greek/grlinks.htm
l failed for neh116.pdx.oneworld.com, reason: File does not exist
I need to grab only the URL. there are several thousand of these lines and
the URLs vary in length. obviously some have more '/' than others.
------------------------------
Date: 10 Mar 1998 16:56:36 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Speed of sort routine vs. one-by-one compare (123)
Message-Id: <6e3rc4$jj0$1@client2.news.psi.net>
Nick Halloway (snowe@rain.org) wrote on 1652 September 1993 in
<URL: news:Pine.SUN.3.96.980309211528.26290A-100000@coyote.rain.org>:
++
++ Yes, it would be kept sorted, and each time a new record is added it
++ would be put into the right place. If anyone has a binary sort
++ routine to do this that would be plenty quick, I'm sure.
What is a binary sort routine?
++ routine to do this that would be plenty quick, I'm sure.
It will be linear in the size of the file. For each addition.
Abigail
--
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
print grep {$_{$_}} @_' < /usr/dict/words
------------------------------
Date: 10 Mar 1998 14:15:28 -0500
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Speed of sort routine vs. one-by-one compare (123)
Message-Id: <x7afayuzlb.fsf@sysarch.com>
abigail@fnx.com (Abigail) writes:
> Nick Halloway (snowe@rain.org) wrote on 1652 September 1993 in
> <URL: news:Pine.SUN.3.96.980309211528.26290A-100000@coyote.rain.org>:
> ++
> ++ Yes, it would be kept sorted, and each time a new record is added it
> ++ would be put into the right place. If anyone has a binary sort
> ++ routine to do this that would be plenty quick, I'm sure.
>
> What is a binary sort routine?
abby, i am surprised you asked this. binary sorts are among the first
algorithms i ever learned (too many years ago).
> It will be linear in the size of the file. For each addition.
not always true. depending on how the file is organized. unix has
bsearch and friends to find records in a sorted file which is O(log2n).
the berkley database stuff has binary and btree stuff too. all would be
faster than sorting each time after adding a record.
even a simple binary search of a linear file would be much faster than a
linear insert. you could find the record location in O(log2n) and then
copy large blocks until the insert point, insert the new record, finish
copying with large blocks. you eliminate many of the record compares
which is what eats up the cpu.
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: 10 Mar 1998 21:11:05 GMT
From: klassa@aursgh.aur.alcatel.com (John Klassa)
Subject: Re: Speed of sort routine vs. one-by-one compare (123)
Message-Id: <6e4a99$5t3$1@aurwww.aur.alcatel.com>
On 10 Mar 1998 14:15:28 -0500, Uri Guttman <uri@sysarch.com> wrote:
->even a simple binary search of a linear file would be much faster than a
->linear insert. you could find the record location in O(log2n) and then
->copy large blocks until the insert point, insert the new record, finish
->copying with large blocks. you eliminate many of the record compares
->which is what eats up the cpu.
...this approach may save CPU, but I think your CPU savings will be
entirely eaten up by the disk I/O since the insertion is happening for each
record.
I missed the early part of this thread so forgive me if this is irrelevant
or inappropriate. Why not keep an index in memory & use it to keep track
of order (I assume the problem is that there's too much data to keep in
core)? When you're ready to write the results, refer to the index and
seek() to the appropriate records (in order), writing them just once to a
final file.
--
John Klassa / Alcatel Telecom / Raleigh, NC, USA <><
------------------------------
Date: 10 Mar 1998 21:18:07 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: The -w switch (was Re: better way to do this?)
Message-Id: <6e4amf$5qb$1@marina.cinenet.net>
Joseph N. Hall (joseph@5sigma.com) wrote:
: "-w flushes out most problems" is a gross overstatement. It does,
: however, catch a lot of certain kinds of errors.
I stand by it. In terms of both error-detection count and
corrective-action time, I personally find that -w reduces by more than
half the amount of work I need to do. Perhaps I'm just prone to the sort
of errors -w catches. :)
: As far as comparing oil changes to -w, that one has me scratching
: my head.
My coworkers constantly call me on my more strained metaphors, so I'm not
all that surprised. In this case, I was trying to say "If you can't or
won't do the basics (use -w, read the docs, and so forth), then helping
you with advanced stuff is probably wasted time for both of us." My
analogy was that discussing carburetor adjustments and timing issues with
someone who can't or won't change the oil in their car is similarly a
waste of time for both parties. Yes, it was weak, I blame caffeine
deprivation and too many distractions while writing that post. Mea culpa.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: Tue, 10 Mar 1998 19:11:14 GMT
From: dwillis@nswc.navy.mil (Diane T. Willis)
Subject: Uploading files gt 16mb bombs...
Message-Id: <1998Mar10.190536.3994@relay.nswc.navy.mil>
I have a program that accepts any file of your choice and will upload
it to a designated directory on a server. Everything works fine until
the file gets to a certain size, like around 16 MB. Then it bombs.
But smaller files work fine. Anybody have any ideas? I'm new
to Perl and thought that variables adjusted automatically.
Any help would be greatly appreciated!
Regards,
Diane Willis
------------------------------
Date: Tue, 10 Mar 1998 15:59:46 -0500
From: "Alfred P. Bartholomai" <apb.freddyb@mailexcite.com>
Subject: Where can I find perlman for perl/tk ?
Message-Id: <3505A9C1.6A883AE5@mailexcite.com>
I am looking for perlman for perl/tk ? Does anyone know where I can
find it.
Thank you,
Fred Bartholomai
P.S. For those interested in perl on-line man pages see:
http://www.ptk.bnl.gov/pod/index.html
------------------------------
Date: 10 Mar 1998 19:45:45 GMT
From: "Jim Brewer" <jimbo@soundimages.co.uk>
Subject: Win 32 serial port read and write
Message-Id: <01bd4c5d$1de29520$0300000a@jimbosntserver>
I have the need to read and write to com ports on Win 95 and Win NT. I've
had had limited success in simply opening a file handle and reading the
port, although the data that comes through is garbage. Further, I have only
read the port successfully, and this using sysread as opposed to read.
using read the script just waits for something to happen and nothing does.
The write script seems to occasionnaly work, but not often. I've been using
these snippets in tandem to simulate the behaviour of some devices we don't
have avaiable on hand to use for testing. Hence, I need to be able to
simulate the data flow over the com port for the development of a data
capture and processing application. Because all the data is ascii text, it
is ideally suited to perl for processing. I am using the GS port of
5.004_04 compiled with MSVC 5 under Win NT.
The read code snippet follows:
use IO::File;
$com = new IO::File;
$com->open("<COM2");
$com->autoflush(1);
binmode $com;
for ($i = 0; $i < 10; ++$i) {
$com->sysread($fred, 1);
$buf .= $fred;
}
print "$buf";
The write code snippet follows:
use IO::File;
$com = new IO::File;
$com->open(">COM1");
$com->autoflush(1);
binmode $com1;
$com->syswrite("Hello", length "Hello");
------------------------------
Date: Tue, 10 Mar 1998 20:56:03 GMT
From: lakerSkipThisBit@tcp.co.uk (Markus Laker)
Subject: Re: Win32::Internet fails to retrieve files
Message-Id: <3509a87c.10993127@news.tcp.co.uk>
sneezy@contax.co.uk (Markus Laker) wrote:
> I'm getting unexpected errors using Aldo Calpini's Win32::Internet
> module (version 0.08) with Gurusamy Sarathy's Perl 5.004_02 port under
> NT4 SP3.
False alarm. It was a case problem. My program was finding the name of
each graphics file by scanning the HTML files on the server, where the
names are given in lower case but some of the filenames are actually in
upper case. Presumably, the way the Web browser works is simply by
trying all possible combinations.
Markus
--
[This message was emailed only, not posted to Usenet.]
------------------------------
Date: 10 Mar 1998 12:55:21 -0600
From: Quentin Fennessy <quentin@jihad.amd.com>
Subject: Re: writing back to a file which is being read from
Message-Id: <ximsooqml46.fsf@jihad.amd.com>
>>>>> "PS" == Peter Shankey <shankeyp@charlestoncounty.org> writes:
PS> I need to read one line at a time in a file (temp) each line
PS> may or may not need to be changed then I need to write back to
PS> the same file replacing what I have changed. I know I need to
[...]
perldoc perlfaq5
How do I change one line in a file/delete a line in a
file/insert a line in the middle of a file/append to the
beginning of a file?
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
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". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". 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". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 2066
**************************************