[10475] in Perl-Users-Digest
Perl-Users Digest, Issue: 4068 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 26 12:05:28 1998
Date: Mon, 26 Oct 98 09:02:07 -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 Mon, 26 Oct 1998 Volume: 8 Number: 4068
Today's topics:
delete htm files rk27@my-dejanews.com
display images in a directory!? vivekvp@hotmail.com
Re: display images in a directory!? dave@mag-sol.com
error code checking from ftp hemant_bendre@smb.com
Re: Error (Martien Verbruggen)
Re: faq? where is it? <r28629@email.sps.mot.com>
Re: faq? where is it? <rick@albrich.demon.co.uk>
File download script? (Bill Morgan)
getting the date & time directly from perl <gcato@nsw.bigpond.net.au>
Re: getting the date & time directly from perl (Martien Verbruggen)
Re: getting the date & time directly from perl (Tad McClellan)
Re: getting the date & time directly from perl (Bob N.)
Re: getting the date & time directly from perl (Martien Verbruggen)
Re: Gnu Unzip????? (Mattjm82)
Re: Gnu Unzip????? (Don Groves)
Re: Gnu Unzip????? (Tad McClellan)
Re: Gnu Unzip????? <dgris@rand.dimensional.com>
Re: Help - Linux/serial line problem <matt@ury.york.ac.uk>
How to build perl 5.005 in WinNT? <sailorbob24@hotmail.com>
Re: how to use CGI to download (Bill Morgan)
http://www.raduga.ru - iNFORMACIONNO-RAZWLEKATELXNYJ SE <andrey@raduga.ru>
Image Dimentions?! <m@hate_spam.com>
Re: Image Dimentions?! (Martien Verbruggen)
Re: Installing Modules <Savage.Ron.RS@bhp.com.au>
large cgi output cut off in browser <jimndi@sgi.net>
Re: Loop problems jbharvey@auspex.net
LWP problem (was Re: Getting a web page content using p mrauschkolb@yahoo.com
MacPerl Problem-Perl Won't Load Script (TEEDOFF 98)
Monitoring a child process. (EXCHANGE:CRK:5T11)
Re: need info on perl compilers <s.tuitjer@soricconsult.de>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 26 Oct 1998 08:07:15 GMT
From: rk27@my-dejanews.com
Subject: delete htm files
Message-Id: <711aji$gl4$1@nnrp1.dejanews.com>
Sorry if this appears to be a stupid question.
How can I tell my cgi script to delete all *.htm files using unlink
or some other command?
Thanks in advance,
rahul
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 26 Oct 1998 11:20:19 GMT
From: vivekvp@hotmail.com
Subject: display images in a directory!?
Message-Id: <711lti$td2$1@nnrp1.dejanews.com>
hi - i am looking for either a javascript or cgi script that will display
images that are uploaded or already existing a directory.
hope fully this script will list or thumbnail the pre existing pictures and
allow a user to view them full size.
anyone know where to find one? or is this a big project?
thanx!
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 26 Oct 1998 13:57:08 GMT
From: dave@mag-sol.com
Subject: Re: display images in a directory!?
Message-Id: <711v3k$6ri$1@nnrp1.dejanews.com>
In article <711lti$td2$1@nnrp1.dejanews.com>,
vivekvp@hotmail.com wrote:
> hi - i am looking for either a javascript or cgi script that will display
> images that are uploaded or already existing a directory.
> hope fully this script will list or thumbnail the pre existing pictures and
> allow a user to view them full size.
> anyone know where to find one? or is this a big project?
One of Randal's recent WebTechniques columns talks about a similar subject.
Try <http://www.stonehenge.com/merlyn/WebTechniques/> and read column 29 and
its associated code. This should get you started.
hth,
Dave..
--
dave@mag-sol.com
London Perl M[ou]ngers: <http://london.pm.org/>
[Note Changed URL]
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 26 Oct 1998 16:00:50 GMT
From: hemant_bendre@smb.com
Subject: error code checking from ftp
Message-Id: <7126bi$flb$1@nnrp1.dejanews.com>
How do I check the error code from ftp in perl:
Sample code:
open(FTP, "|ftp -i -n");
print FTP "open hostname\n";
print FTP "user username password\n";
How will I check the rror code from "open hostname" command or any other ftp
command?
Any help is appreciated.
Hemant
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Sun, 25 Oct 1998 23:16:57 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Error
Message-Id: <JjOY1.20$4V4.117392@nsw.nnrp.telstra.net>
In article <25467-363256E9-58@newsd-112.bryant.webtv.net>,
TipTup@webtv.net (TipTup JHA&HHA) writes:
> I'm sort of new to perl...........
>
> Heres the error I got:
>
> Can't modify logical and in scalar assignment at
> /data1/hypermart.net/nettv/mirc/test.pl line 55, near ""yes") " syntax
> error at /data1/hypermart.net/nettv/mirc/test.pl line 243, near "print"
> Execution of /data1/hypermart.net/nettv/mirc/test.pl aborted due to
> compilation errors.
> [Sat Oct 24 18:33:56 1998] access to
> /data1/hypermart.net/nettv/mirc/test.pl failed for 207.79.35.58, reason:
> Premature end of script headers
>
> Anyways what I did is earlier in the script I put this:
>
> $admin = "no";
>
> then later in the script if password eq password
> I typed this:
> $admin = "yes";
>
> which generated the errors above.......
>
> any suggestions?
Yes, there is a syntax error in your script at line 243. In which way
is that error message not clear? Have you checked the lines around
243? Are all your commands terminated by a ;? You can say that you
typed that, but did you really? Are all your strings terminated? did
you actually type
$admin = "yes";
or maybe
$admin = "yes;
There really is nothing we can do to tell you what is wrong, without
actually seeing the code. Note that this is not an invitation to send
the whole 243 lines to this group. You could just send a few lines,
surrounding that one, but I suggest you have a look yourself first.
And even those few lines around 243 might not contain the error. It
seems to me that you have some unterminated string somewhere.
Are you going to post a message to this group every time you get a
syntax error?
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Mon, 26 Oct 1998 00:54:54 -0500
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: faq? where is it?
Message-Id: <36340EAE.F99D6524@email.sps.mot.com>
Avshi Avital wrote:
>
> sorry if this seems a bit dumb, but where is the FAQ everybody is referring
> to? is there more than one? is it a news group, or a web page? will there
> ever be eternal peace?
perldoc perlfaq
-tk
------------------------------
Date: 26 Oct 98 09:00:04 +0000
From: "Rick Townsend" <rick@albrich.demon.co.uk>
Subject: Re: faq? where is it?
Message-Id: <453.603T226T5404046@albrich.demon.co.uk>
On 25-Oct-98 18:03:34, Avshi Avital said :
AA> sorry if this seems a bit dumb, but where is the FAQ everybody is
AA> referring to? is there more than one? is it a news group, or a
AA> web page? will there ever be eternal peace?
You can find a few links to Per FAQ's and other resources on my site
at http://www.albrich.demon.co.uk/links.html
Rick..
--
Albrich interactive
rick@albrich.demon.co.uk
http://www.albrich.demon.co.uk/
--
------------------------------
Date: Mon, 26 Oct 1998 15:17:43 GMT
From: wmorgan@nswc.navy.mil (Bill Morgan)
Subject: File download script?
Message-Id: <1998Oct26.151643.21697@relay.nswc.navy.mil>
I am looking for a way to download files from my web server to my local PC
without using standard http links. Is this possible? I have a Perl script to
upload files from my PC to the server, and I am looking for something similar
for downloads. Please email any responses as well as posting to this group.
Many thanks!
---------------------------------------------------------------------------
William E. Morgan NAVAL SURFACE WARFARE CENTER
Code N84 email: wmorgan@nswc.navy.mil
17320 Dahlgren Rd. phone: (540)653-6088
Dahlgren, VA 22448 fax: (540)653-1810
------------------------------
Date: Mon, 26 Oct 1998 13:41:41 +1100
From: Gavin Cato <gcato@nsw.bigpond.net.au>
Subject: getting the date & time directly from perl
Message-Id: <Pine.LNX.3.96.981026133853.757A-100000@patricia>
Hello All,
Is there a native perl equivalent to something like
system (" date +%d%m%y ");
?
Thanks
++Gavin;
------------------------------
Date: Mon, 26 Oct 1998 03:10:27 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: getting the date & time directly from perl
Message-Id: <DKRY1.42$4V4.233575@nsw.nnrp.telstra.net>
In article <Pine.LNX.3.96.981026133853.757A-100000@patricia>,
Gavin Cato <gcato@nsw.bigpond.net.au> writes:
> Hello All,
>
> Is there a native perl equivalent to something like
>
> system (" date +%d%m%y ");
Rudimentary:
# perldoc -f localtime
If you have a POSIX compliant system:
# perldoc POSIX
/ strftime()
Some modules on CPAN might do it as well, if you don't have POSIX.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Sun, 25 Oct 1998 21:36:59 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: getting the date & time directly from perl
Message-Id: <roq017.cn2.ln@flash.net>
Gavin Cato (gcato@nsw.bigpond.net.au) wrote:
: Is there a native perl equivalent to something like
: system (" date +%d%m%y ");
perldoc -f localtime
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Oct 1998 03:39:53 GMT
From: bobn@interaccess.com (Bob N.)
Subject: Re: getting the date & time directly from perl
Message-Id: <710qu9$qpu$2@supernews.com>
Probably takes 2 commands to do it. RTFM re: localdate or check the
various date-related modules on CPAN.
In Article <Pine.LNX.3.96.981026133853.757A-100000@patricia> , Gavin Cato (gcato@nsw.bigpond.net.au) said:
: Hello All,
:
: Is there a native perl equivalent to something like
:
: system (" date +%d%m%y ");
:
: ?
:
:
: Thanks
:
: ++Gavin;
:
:
:
------------------------------
Date: Mon, 26 Oct 1998 03:55:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: getting the date & time directly from perl
Message-Id: <6pSY1.50$4V4.250584@nsw.nnrp.telstra.net>
In article <710qu9$qpu$2@supernews.com>,
bobn@interaccess.com (Bob N.) writes:
> Probably takes 2 commands to do it. RTFM re: localdate or check the
^^^^
time
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 26 Oct 1998 01:44:31 GMT
From: mattjm82@aol.com (Mattjm82)
Subject: Re: Gnu Unzip?????
Message-Id: <19981025204431.00328.00001283@ng98.aol.com>
I asked what the extention .gz meant on THIS measage board and it was answerd.
So I thaught that some one might be able to tell me, and it is also the
extention of perl5 when you dounload it.
Matthew J. Meyer
------------------------------
Date: Sun, 25 Oct 1998 18:59:12 -0800
From: see@my.sig (Don Groves)
Subject: Re: Gnu Unzip?????
Message-Id: <MPG.109d855784402939989736@news.europa.com>
In article <19981025204431.00328.00001283@ng98.aol.com>, mattjm82@aol.com
says...
> I asked what the extention .gz meant on THIS measage board and it was answerd.
> So I thaught that some one might be able to tell me, and it is also the
> extention of perl5 when you dounload it.
It's also the extension of any other gzipped file that you download, it's
not specific to Perl.
Try www.gnu.org. Or, go to any search engine, like www.altavista.com,
and search on 'gunzip'.
--
Don Groves (groves_acm_org)
Replace underscores to get my email address
------------------------------
Date: Sun, 25 Oct 1998 22:00:44 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Gnu Unzip?????
Message-Id: <c5s017.mp2.ln@flash.net>
Mattjm82 (mattjm82@aol.com) wrote:
: I asked what the extention .gz meant on THIS measage board
^^^^^^^
This is a Usenet newsgroup, not a message board.
Usenet newsgroups are topical. That is, they discuss particular
topics.
c.l.p.misc is for discussing Perl.
GNU zip is not Perl, and is off-topic for this newsgroup.
news.announce.newusers is a newsgroup that has many helpful
postings for how to go about getting What You Want from
Usenet. Check it out.
: and it was answerd.
^^^^^^^
I now see that I made a mistake in answering you.
It won't be repeated.
(Actually I saw the mistake earlier when you sent me email
asking where to get GNU zip, which I felt compelled to
leave unanswered.
)
[ Probably should not have removed your domain name from
my kill filter... But I digress.
]
: So I thaught that some one might be able to tell me, and it is also the
^^^^^^^
: extention of perl5 when you dounload it.
^^^^^^^^^ ^^^^^^^^
There has been a recent development on the Internet known as the
World Wide Web. The WWW has these things called "search engines"
which can be used to find things (such as freely available
software that you might want to download).
Searching for "GNU zip" at: http://www.altavista.com
finds One Thousand Seven Hundred and Seventy hits.
I'll bet one of them could be used to get GNU zip.
So we are all wondering why you posted here asking where to get it...
P.S. Electronic communication such as email and Usenet are already
disadvantaged by lack of inflection and facial expression.
Throwing in numerous spelling/typing errors diminishes its
effectiveness further yet.
You should take a little more care
in communication effectively (ie. sans typos)
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Mon, 26 Oct 1998 03:33:17 GMT
From: Daniel Grisinger <dgris@rand.dimensional.com>
Subject: Re: Gnu Unzip?????
Message-Id: <m31znwj9gj.fsf@rand.dimensional.com>
tadmc@flash.net (Tad McClellan) writes:
> You should take a little more care
> in communication effectively (ie. sans typos)
s/cation/cating/;
Damn inconvenient place for that, though. :-)
dgris
--
Daniel Grisinger dgris@perrin.dimensional.com
Supporter of grumpiness where grumpiness is due on clpm.
perl -Mre=eval -e'$_=shift;;@[=split//;;$,=qq;\n;;;print
m;(.{$-}(?{$-++}));,q;;while$-<=@[;;' 'Just Another Perl Hacker'
------------------------------
Date: Mon, 26 Oct 1998 07:12:49 +0000
From: Matt Wilcox <matt@ury.york.ac.uk>
To: "Andrew M. Langmead" <aml@world.std.com>
Subject: Re: Help - Linux/serial line problem
Message-Id: <363420F1.F9805FBB@ury.york.ac.uk>
"Andrew M. Langmead" wrote:
> The Flying Scotsman <daj102@york.ac.uk> writes:
>
> >open (RECEIVER, "cat /dev/ttyd0 |");
>
> Why not "open RECEIVER, '/dev/ttyd0' or die" and remove the need for
> cat? Since the standard output of cat isn't a tty (its a pipe to your
> perl program) it will block buffer (except if you add the -u switch,
> but I still thing you'd be better off removing the pipe to "cat"
> rather than fixing it to work.) Are you setting the line correctly
> with stty or POSIX::Termios?
>
I did try this, but it seemed to muff it up completely and not receive
anything. Hmm. And the stty has been set to raw with the EOF and EOL
codes undef (we're trying to receive Independant Radio News data feeds
from the satellite receiver - the messages are bordered with ^A and ^D
characters).
>
> Also don't you mean "/dev/ttyS0"? (or /dev/cua0 for a device that
> ignores the RS-232 CD and DTR lines) Or did some versions of linux use
> ttyd0 for cua0?
Definitely ttyd0. We're using FreeBSD if that has any effect, but I think
it might be the fact that we're running an entire network from that
PC.... But I can't help you 'cos I didn't set it up!!
Many thanks for your help. I'll give it a blast again.
--DJ
>
> --
> Andrew Langmead
------------------------------
Date: Mon, 26 Oct 1998 03:38:35 +0200
From: Robert Shriver Barnes <sailorbob24@hotmail.com>
Subject: How to build perl 5.005 in WinNT?
Message-Id: <3633D29B.61FA47C@hotmail.com>
The question is fairly basic. I would like to embed a bare bones perl
compiler in a Borland C++ Builder 3.0 app under WinNT. I downloaded
the perl5.005_2 source code package and after reading the readme.win32
and other docs I'm a little confused. Anyone have experiance in this
area?
Thanks,
SailorBob
------------------------------
Date: Mon, 26 Oct 1998 15:42:23 GMT
From: wmorgan@nswc.navy.mil (Bill Morgan)
Subject: Re: how to use CGI to download
Message-Id: <1998Oct26.154124.22317@relay.nswc.navy.mil>
Once you download the file using this method, how do you save it, or where is
it saved to? Thanks.
In article <70pkkh$dma@romeo.logica.co.uk>, "Derren Weekes"
<weekesd@logica.com> wrote:
>How about sending the following:
>
><html>
><head>
><META HTTP-EQUIV="Refresh" CONTENT="1; URL=file.zip">
><title>Download Page</title>
></head>
><body bgcolor="#FFFFFF">
>If the file does not download automatically then click <a
>href="file.zip">here</a>
></body>
></html>
>
>This should start the download 1 second after the page has loaded, if the
>"refresh" meta tag is not supported by the browser, then it still has the
>old manual "click here" method to fall back on.
>
>
>>Ucalegon <eyebeam@unexpected.com> writes:
>>
>>>Is there any way within a perl program running on the web to download a
>>>file to the user's machine? If not, is there any way more
>>>straightforward than generating html that asks the user to click on a
>>>link to do the download?
>
>
>
>
---------------------------------------------------------------------------
William E. Morgan NAVAL SURFACE WARFARE CENTER
Code N84 email: wmorgan@nswc.navy.mil
17320 Dahlgren Rd. phone: (540)653-6088
Dahlgren, VA 22448 fax: (540)653-1810
------------------------------
Date: Mon, 26 Oct 1998 11:01:12 +0600
From: "Andrey Komarov" <andrey@raduga.ru>
Subject: http://www.raduga.ru - iNFORMACIONNO-RAZWLEKATELXNYJ SERWER
Message-Id: <710vam$31b$3@flute.sinor.ru>
http://www.raduga.ru - iNFORMACIONNO-RAZWLEKATELXNYJ SERWER
kU^A POLEZNOJ INFORMACII.
kONKURSY, prizy, igry NA java, TELEKONFERENCII, kazino, SETEWOJ MAGAZIN I
MNOVESTWO DRUGOGO NE MENEE INTERESNOGO !!!
uSTANOWKA TELEFONNYH , LOKALXNYH SETEJ (Intranet)
TShop
tORGOWYJ OTDEL SETI sITEK
fOTOTEHNIKA Minolta
aWTORIZOWANNYJ SERWISNYJ CENTR Panasonic
iSSLEDOWATELXSKO-KONSULXTACIONNAQ FIRMA alxt
Representation in London
G.Bass EGB Consulting
rEKLAMNAQ GAZETA "pRESTIV"
Welcome to Solt
lE^ENIE I OTDYH W SANATORIQH rOSSII.
pOLIGRAFIQ OT PROIZWODITELQ!
Courageous convictions
|LEKTRONNYE SISTEMY I REKLAMNO-SWETOWYE TEHNOLOGII.
sTROITELXSTWO DOMOW W pODMOSKOWXE PO NOWEJ[EJ TEHNOLOGII
ik "fINANSOWYE TEHNOLOGII"
bESPLATNYE RESURSY iNTERNET
rYBNYE KONSERWY
THE CITY SERVICE of ACQUAINTANCES
pOSTAWKI METALLA
------------------------------
Date: Sun, 25 Oct 1998 22:39:24 +0000
From: Mark Kotoff <m@hate_spam.com>
Subject: Image Dimentions?!
Message-Id: <3633A89C.624A3A5B@hate_spam.com>
Hi everyone!
I have a small question.
Is there any way to determine the image physical dimensions from the
content of the image file (.jpg or .gif).
Here is the task:
I do not know how many image files in given directory, they uploaded by
visitors. I can use array like this:
@other_files = glob("$filebase/*");
and then throw them in a loop, so I can deal with them one by one and
print them on a web page.
Since I do not know image dimension in DPI I can not use WIDTH and
HEIGHT tags.
Does anyone knows any way to figure out image dimensions by looking into
image file itself in Perl?
Say open it as: open(IMG,"<$file");
then match a certain string and get the dimensions out?
Please do not post any references to the web sites.
I'd appreciate your comments.
Regards.
Mark Kotoff.
http://web-masters.org
PS. Sorry for the inconvenience but I can not post my e-mail thanks to
e-mail spammers.
Please use my e-mail form @:
http://web-masters.org/contact.cgi
------------------------------
Date: Mon, 26 Oct 1998 03:48:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Image Dimentions?!
Message-Id: <YhSY1.45$4V4.250584@nsw.nnrp.telstra.net>
In article <3633A89C.624A3A5B@hate_spam.com>,
Mark Kotoff <m@hate_spam.com> writes:
> Is there any way to determine the image physical dimensions from the
> content of the image file (.jpg or .gif).
Image::Size, get it from CPAN.
> I do not know how many image files in given directory, they uploaded by
> visitors. I can use array like this:
> @other_files = glob("$filebase/*");
While globbing may work, opendir/readdir/closedir is preferred by me
personally.
> Please do not post any references to the web sites.
What web site? The one you mention in your email?
> http://web-masters.org
>
> PS. Sorry for the inconvenience but I can not post my e-mail thanks to
> e-mail spammers.
When did email spammers start making it impossible for anyone to use
their real email address in a usenet post? You probably mean that you
don't know of any other way to deal with spam than to make it hard on
anyone who wants to help you.
> Please use my e-mail form @:
> http://web-masters.org/contact.cgi
Then you won't get email from me. You really expect me to go off an
fire up a web browser, and use some crappy form to send you an answer
to some question? What do I gain from that? Not even a warm fuzzy
feeling.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: 26 Oct 1998 03:11:00 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: Installing Modules
Message-Id: <01be008d$aaf7ae20$77ea1286@steelres-pcm657.resmel.bhp.com.au>
Also, if you need to patch the Unix-style make file, see my web page for
patchMake.pl.
--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage
------------------------------
Date: Mon, 26 Oct 1998 09:48:16 +0500
From: Jim Strahl <jimndi@sgi.net>
Subject: large cgi output cut off in browser
Message-Id: <3633FF10.5C79@sgi.net>
I've written a perl script to perform a search on a database file based
on html form input. It works fine unless the search produces a large
output file, in which case the html output page is cut off at the
bottom. There is no problem when run from the command line. I've tried
using $|=1;, but this doesn't seem to make a difference. I'd appreciate
it if someone could tell me why this is happening.
Thanks!
Diane
------------------------------
Date: Sun, 25 Oct 1998 23:14:28 GMT
From: jbharvey@auspex.net
Subject: Re: Loop problems
Message-Id: <710bcj$fig$1@nnrp1.dejanews.com>
Well, where's your loop? Also, how about doing a while (1) around some pieces
that you want to loop around?
In article <70tv8v$qct$1@nnrp1.dejanews.com>,
baillie@my-dejanews.com wrote:
> I'm trying to loop through the following program so as to re-display the menu
> after each action is complete, here's the script:
>
> Someone Please tell me what I'm doing wrong here, I'd really rather not limit
> this to one iteration.
>
> #!/usr/bin/perl -w
>
> use Fcntl qw(:flock);
> use diagnostics;
>
> $logfile = "/tmp/blah";
> system "stty erase ^H";
>
> print <<End_Of_Menu; <- if i assign "$choice = 0" and put an
> \nPlease choose a menu item:\n until($choice ==4 ) {
> \t\t1) Add a record the program will iterate through
> \t\t2) View a record once and re-display the menu,
> \t\t3) Edit a record but when another $choice is
> \t\t4) Quit\n supplied, it just hangs there.
> End_Of_Menu this also happens with a while($choice != 4)...
>
> print "Enter Choice: ";
> chomp($choice = <STDIN>);
>
> if($choice == 1) {
> &add_entry;
> } elsif($choice == 2) {
> &view_entry;
> } elsif($choice == 3) {
> &edit_entry;
> } elsif($choice == 4) {
> exit;
> } else {
> print "\nNot a valid choice, exiting\n";
> }
> <- closing brace here..........
> sub add_entry {
> print "\nPlease enter your login name: ";
> chomp($name = <STDIN>);
>
> print "\nPlease enter some info about the change\n";
> print "End input by typing <RETURN> & ^D: ";
> while(defined($_ = <STDIN>)) {
> push(@comment_array, $_);
> }
>
> open(LOG, ">>$logfile") or die "Couldn't open file: $!";
> flock(LOG, LOCK_EX);
> seek(LOG, 0, 2);
>
> select(LOG);
> print '-' x 80, "\n";
> print "$name ", scalar localtime, "\n";
> print '-' x 80, "\n";
> print @comment_array, "\n";
>
> flock(LOG, LOCK_UN);
> close(LOG) or die "Can't close the file: $!";
> }
>
> sub view_entry {
> print "\nEnter keyword to search (i.e. name, date, etc)\n";
> print "or type ALL to see the entire file\n\n";
>
> print "KEYWORD: ";
> chomp($keyword = <STDIN>);
>
> if($keyword eq 'ALL') {
> system "more $logfile";
> } else {
> open(LOG, $logfile) or die "Couldn't open file: $!";
>
> $/ = '';
> while(<LOG>) {
> print if /\Q$keyword/s;
> }
> close(LOG) or die "Couldn't close file: $!";
> }
> }
>
> sub edit_entry {
> open(LOG, ">>$logfile") or die "Couldn't open file: $!";
> flock(LOG, LOCK_EX);
>
> system "vi $logfile";
>
> flock(LOG, LOCK_UN);
> close(LOG) or die "Couldn't close file: $!";
> }
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 26 Oct 1998 12:41:58 GMT
From: mrauschkolb@yahoo.com
Subject: LWP problem (was Re: Getting a web page content using perl)
Message-Id: <711qmm$1up$1@nnrp1.dejanews.com>
OK, I downloaded libwww, and while trying to install, it says that I need
4 more modules: HTML::Parser MIME::Base64 NET::FTP and ,MD5 (optional)
I've found all but the FTP module -- where is it, or what is it called?
Thanks
Mark
In article <ebohlmanF1DHvz.H93@netcom.com>
Eric Bohlman <ebohlman@netcom.com> wrote:
> Chris Lee <clee@innocent.com> wrote:
> : I am new about using perl with the internet. I would like to use perl to
> : get the web page content using perl. For example, if I input
> : "http://www.perl.com" to my perl program, my perl program will give me
> : the source content of that web page. Could this kind of thing be done by
> : perl? Any suggestion?
>
> Check out the documentation for the LWP module.
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 25 Oct 1998 22:44:00 GMT
From: teedoff98@aol.com (TEEDOFF 98)
Subject: MacPerl Problem-Perl Won't Load Script
Message-Id: <19981025174400.20660.00001013@ng-fc1.aol.com>
Hello,
I am trying to load a perl script made for Win95. I run a macintosh. Do you
know how to update it to work on the macintosh, please e-mail me.
Teedoff98@aol.com
------------------------------
Date: Mon, 26 Oct 1998 11:24:18 -0500
From: "Bowler, Michael (EXCHANGE:CRK:5T11)" <mkbowler@americasm01.nt.com>
Subject: Monitoring a child process.
Message-Id: <3634A232.1036A78D@americasm01.nt.com>
Is there a quick way to query the state of a child process? ie. Can I tell if
a child is still alive after I have forked it and done some processing?
My code.
if ($pid = fork) {
#Some parent processing.
} elsif (defined($pid)) {
#Child processing here.
CORE::exit;
} else {
&ErrorDialog("Cannot fork new process!");
}
#Some more parent processing.
if ($pid is alive) { #How do I do this?
print "Child is still alive!";
}
Thanks,
--
Michael Bowler Phone: 613-765-3432
IC Design Tools - 5T11 ESN: 39+53432
Nortel Semiconductors Email: mkbowler@nt.com
------------------------------
Date: Mon, 26 Oct 1998 08:07:26 +0100
From: "Stephan Tuitjer" <s.tuitjer@soricconsult.de>
Subject: Re: need info on perl compilers
Message-Id: <36341f93.0@news.ka.choin.net>
Take a look an www.perl.com or www.demoloader.com
Stephan
mailto:s.tuitjer@prosequm.de
http://www.prosequm.de
Mixmaster schrieb in Nachricht <70ubgi$pts@sirius.infonex.com>...
>are there any perl compilers out there available for download?
>I would love to have a list of them. thanks
>
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4068
**************************************