[6998] in Perl-Users-Digest
Perl-Users Digest, Issue: 623 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 17 08:17:30 1997
Date: Tue, 17 Jun 97 05:00:36 -0700
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, 17 Jun 1997 Volume: 8 Number: 623
Today's topics:
Re: Case Conversion (Jahwan Kim)
Delay access times?? <perlprogrammer@hotmail.com>
dereferecing variables in another variable name jwk6@cornell.edu
extract character(s) from line at pos(x,y) <boeken@rdc.nl>
Re: extract character(s) from line at pos(x,y) (Tad McClellan)
file date in perl ? (Paul S. Cutt)
Re: file date in perl ? <sfairey@metrica.co.uk>
Re: Help w/ Data Structures (James E. Lee)
Re: HELP: How to limit the length of contents in guestb <perlprogrammer@hotmail.com>
Interesting Net::FTP quandary (Dennis Taylor)
Interesting Net::FTP quandary (Dennis Taylor)
Re: Look for a good IDE for win32 (Brian Orpin)
Re: mod_perl or fastcgi install, liberl.so help.. <perlprogrammer@hotmail.com>
Re: Module installation and usage without root access - <friedman@uci.edu>
Re: Newbee (Nathan V. Patwardhan)
Re: News servers function in Perl Is it possible ? (Dylan Northrup)
Re: PERL Amiga..... (Erik Braun)
Problem using Net::FTP behind a firewall (Krishan Purahoo)
Reference guide updated to 5.004 ? (Helmut Jarausch)
Re: Sort equivalent in Perl (Paul Slootman)
Trouble compiling TkPerl under NT <chriswareham@dial.pipex.com>
Re: What does "UNIX" stand for.. (Jim Seymour)
Re: What is CGI? <perlprogrammer@hotmail.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 17 Jun 1997 06:12:03 GMT
From: jahwan@supernova.math.lsa.umich.edu (Jahwan Kim)
Subject: Re: Case Conversion
Message-Id: <slrn5qcalj.p7t.jahwan@supernova.math.lsa.umich.edu>
On 16 Jun 1997 18:44:41 GMT, M.J.T. Guy <mjtg@cus.cam.ac.uk> wrote:
[snip]
> x eq uc(x). I would consider a locale not satisfying this condition
> to be seriously bent.
>
> To spell out in detail
>
> i) x is a non-letter x eq lc(x) eq uc(x)
>
> ii) x is upper case x eq uc(x)
>
> iii) x is lower case x eq lc(x)
>
> iv) anything else is a letter, but neither upper case nor lower case.
> This is the possibility I consider to be broken. It may even be
> ruled out by the locale standards - I haven't bothered to check.
>
>
> Mike Guy
There are *many* kinds of locale which *should not* have lc or uc.
Jahwan
------------------------------
Date: Tue, 17 Jun 1997 03:47:37 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Delay access times??
Message-Id: <33A66B49.30F8@hotmail.com>
I'm trying to figure out the best way to go about having a delay in
access times on my script. There are far too many people using it, and
they seem to all be hitting post with no delay.. needless to dsay, it's
eating up more CPU time. I am trying to find info on how to make is so
(in my chat script), if someone hits chat/update, etc. too frequently,
that it will give them a message saying "In the of interests of better
CPU performance, please reduce the frequency of access/requests to no
more then every 10 seconds. Please hit "back" on your broswer to
continue your conversation.. thank you.." Or something to that effect
and have the script exit cleanly, so I don't have 10 proccesses going
from one person.. My chats are slow from all the people, and the main
reason, is due to this.. any ideas?. I'm not sure to go about it. Thanks
for any advice..
------------------------------
Date: Tue, 17 Jun 1997 02:14:05 -0400
From: jwk6@cornell.edu
Subject: dereferecing variables in another variable name
Message-Id: <33A62AE0.12A4126F@cornell.edu>
I am trying to use a counter variable inside another var name to keep
track of which vars belong with which section of a form.
The code looks as follows :
$QUESTION_NUMBER = ... #defined elsewhere
$question$QUESTION_NUMBER_type = 'multchoice';
basically, if $QUESTION_NUMBER is 1, then $question1_type = 'multchoice'
the problem comes in that $QUESTION_NUMBER isn't being recognized as a
variable to be dereferenced, and instead is just plain not working -
i've tried explicitly dereferencing it, etc, etc, not much seems to be
working....
Any suggestions would be greatly appreciated,
Thanks,
John Knight
jknight@iname.com
------------------------------
Date: Tue, 17 Jun 1997 12:02:34 +0200
From: "tommy" <boeken@rdc.nl>
Subject: extract character(s) from line at pos(x,y)
Message-Id: <5o5n1s$1li2@rdc.nl>
hi there,
Perl ain't my strength... so I'll drop this question here :)
I have a text file containing X-lines.
I would like to extract a certain string, in each line, say from position
117 to 122.
Sounds easy, but can't find a way to do this...
Hope someone can help me out with this!
Thanks,
Tom
------------------------------
Date: Tue, 17 Jun 1997 06:18:37 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: extract character(s) from line at pos(x,y)
Message-Id: <dqr5o5.4i.ln@localhost>
tommy (boeken@rdc.nl) wrote:
: Perl ain't my strength... so I'll drop this question here :)
: I have a text file containing X-lines.
: I would like to extract a certain string, in each line, say from position
: 117 to 122.
: Sounds easy, but can't find a way to do this...
: Hope someone can help me out with this!
$part = substr($_, 116, 6);
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Tue, 17 Jun 1997 06:53:51 GMT
From: cutt@netcom.com (Paul S. Cutt)
Subject: file date in perl ?
Message-Id: <cuttEBwr5r.95G@netcom.com>
I wonder how I can get the date of a file in perl formatted in
day month year ? Loked at the stat command but does not seem to give the
time in
the right format or I do not know how to convert it.
ThaThanks,
paul
------------------------------
Date: Tue, 17 Jun 1997 12:52:36 +0100
From: Simon Fairey <sfairey@metrica.co.uk>
To: "Paul S. Cutt" <cutt@netcom.com>
Subject: Re: file date in perl ?
Message-Id: <33A67A84.167E@metrica.co.uk>
Paul S. Cutt wrote:
>
> I wonder how I can get the date of a file in perl formatted in
> day month year ? Loked at the stat command but does not seem to give the
> time in
> the right format or I do not know how to convert it.
>
> ThaThanks,
>
> paul
The 3 times returned by stat are last access, last modification and
inode change time. All of these are in a format which can be passed to
localtime() (haven't checked but I am fairly sure this is the case) so
something along the lines of:
#!/bin/perl
@atime = localtime( (stat(shift))[8] );
print "\nLast access time = $atime[3]/$atime[4]/$atime[5]\n";
etc....
NB: Remember month runs from 0 to 11
Have fun.
Simon
------------------------------
Date: 17 Jun 1997 08:44:19 GMT
From: jelee@atlas.ucdavis.edu (James E. Lee)
Subject: Re: Help w/ Data Structures
Message-Id: <5o5ip3$bjd$1@mark.ucdavis.edu>
Eric Finley (ez041407@dilbert.ucdavis.edu) wrote:
> Eric Finley (ez041407@dilbert.ucdavis.edu) wrote:
> : Hi,
> : I have the following data structure:
> : $timing = {
> : INPUT => {
> : INPUT => [
> : INPUT => {
> : NAME => { %name_info },
> : SRISING => [ @setup_rising ],
> : SFALLING => [ @setup_falling ],
> : SEDGE => $sedge,
> : SREF_CLK => $sref_clk,
> : SMULTIM => $smultim,
> : HRISING => [ @hold_rising ],
> : HFALLING => [ @hold_falling ],
> : HEDGE => $hedge,
> : HREF_CLK => $href_clk,
> : HMULTIM => $hmultim,
> : },
> : ],
> : NUM_INPUTS => $num_inputs,
> : DIR => $direction,
> : },
> :
> : OUTPUT => {
> : OUTPUT => [
> : OUTPUT => {
> : NAME => [
> : NAME => {
> : NAME => $hold_name,
> : REF_CLK => $hold_ref_clk,
> : REF_EDGE => $reledge,
> : CAP => $hold_cap,
> : },
> : ],
> : F_DELAY => [ @f_delay ],
> : F_TRANS => [ @f_trans],
> : R_DELAY => [ @r_delay ],
> : R_TRANS => [ R_DELAY ],
> : },
> : ],
> : NUM_OUTPUTS => $num_outputs,
> : DIR => $out_dir,
> : },
> :
> : CLK => {
> : CLK2 => [
> : CLK3 => {
> : NAME => $clk_name,
> : CAP => $capacitance,
> : MPW_HIGH => $mpwh,
> : MPW_LOW => $mpwl,
> : CLOCK => $clock,
> : },
> : ],
> : NUM_CLK => $num_clk,
> : },
> : };
> :
> : this structure has evolved from 3 simpler structures. When I try doing:
> : while (<INFILE>) {
> : last if (/^\s*?\n$/);
> : $timing->{CLK}->{NUM_CLK}++;
> :line:133 ($timing->{CLK}[ $timing->{CLK}->{NUM_CLK}]->{NAME},
> : $timing->{CLK}[ $timing->{CLK}->{NUM_CLK} ]->{CAP},
> : $timing->{CLK}[ $timing->{CLK}->{NUM_CLK} ]->{MPW_HIGH},
> : $timing->{CLK}[ $timing->{CLK}->{NUM_CLK} ]->{MPW_LOW},
> : $timing->{CLK}[ $timing->{CLK}->{NUM_CLK} ]->{CLOCK})
> : = split /\s+/;
> : }
> : I get the following error:
> : Not an ARRAY reference at convert.pl line 133, <INFILE> chunk 8.
> : Now the code I wrote in the previous verion worked but I can't seem to
> : make this work. Other lines that are similar seem to work. Any help
> : would be very appreciated.
> : Thanks,
> : Eric Finley
> :
> Sorry I forgot to indicate the line number.
> Eric
--
_____________________________________________________________
J a m e s E. L e e atlas.ucdavis.edu/~jelee
------------------------------
Date: Mon, 16 Jun 1997 23:56:52 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Re: HELP: How to limit the length of contents in guestbook script?
Message-Id: <33A63534.7D11@hotmail.com>
Craig Berry wrote:
>
> Jimmy (jhsetyo@students.wisc.edu) wrote:
> : Hi, I have a guestbook script that was created using perl 5, and I want
> : to limit the length of user's comments. Let say 500 characters.
> :
> : So, if someone write his comment over 500 characters, he will
> : get a message to warn him.
> :
> : How can I do that?
>
> Let's presume you have the user's comments in a variable named
> $comments. The following fragment will chop to 500 chars, add an
> ellipsis of your choosing, and warn the user if the comment length
> exceeds 500:
>
> # Warning - not tested, typing directly to news post...
>
> $comments_length_limit = 500;
>
> if (length($comments) > $comments_length_limit) {
> my $ellipsis = ' [...]';
>
> substr($comments, $comments_length_limit) = $ellipsis;
>
> print "Warning: Comments too long - truncated at $comments_length_limit characters.\n";
> }
>
> Note that if you're using this in a CGI script (as seems likely), you'll
> probably want to wrap some HTML tags around that warning message to (for
> example) put it in a separate paragraph, perhaps bolded or in a larger
> size or whatever, to make it stand out better.
>
> Hope this helps!
>
> PS for the anal-retentive: The code above actually ends up limitting the
> stored comment size to ($comments_length_limit + length($ellipsis)
> characters. Resolution of this is left as an exercise for the student. :)
>
> ---------------------------------------------------------------------
> | 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."
cool idea, but how could you limit the size to 500 chars, yet let the
comment go through still, and just stop at the 500th char?. Without an
error, etc?. Link in a chat room, to limit the size of people's posts?.
Any ide-erz?..
------------------------------
Date: Tue, 17 Jun 1997 00:37:56 -0600
From: dptaylor@post.smu.edu (Dennis Taylor)
Subject: Interesting Net::FTP quandary
Message-Id: <dptaylor-1706970037560001@galileo.mdm.mke.execpc.com>
Greets, c.l.p.m....
I have an interesting problem that I was hoping someone might shed
some light on. I'm writing a script that mirrors the contents of a
directory to another machine via FTP, using the Net::FTP module. (And
don't tell me to use 'mirror'... the reason I'm writing this is because it
munches so badly. ;) In fact, it already works quite well, assuming all
your files are in one flat directory. :P
Now, I'm trying to write a routine that produces a list of all the
files on the mirror site that don't exist on the main site -- i.e., files
that have been deleted locally, so that I can DELE them. Problem is, I
can't get a bloody
"ls -R" of the remote site! I've tried quite a few things, including
rolling my own with NLST, but it's not working... seems like practically
everything ls-associated is returning an undefined value. And I don't have
permission to run an 'ls -R' cronjob on the remote site... *sigh*
Has anyone ever done something like this before with FTP? If so, I'd
kill for a look at your code. Otherwise, if some brave, intrepid soul
cares to glance at my code, it's at
http://cmitlab.smu.edu/~dennis/glass.pl ( a weak pun on "mirror"). All
the lines marked with "# TEST TEST TEST" are debugging prints that don't
print anything. In fact, the program prints nothing to std{out,err} --
kinda surprising, considering how many print statements I stuck in there.
(The logfile prints work, though).
Now, I'm not begging for someone to fix my code for me... I was just
wondering if someone had solved this before, or if you might have some
suggestions or criticism. Thanks in advance!
-- dennis taylor (fimmtiu, #perl)
---------------------
This space intentionally left blank.
------------------------------
Date: Tue, 17 Jun 1997 00:38:11 -0600
From: dptaylor@post.smu.edu (Dennis Taylor)
Subject: Interesting Net::FTP quandary
Message-Id: <dptaylor-1706970038110001@galileo.mdm.mke.execpc.com>
Greets, c.l.p.m....
I have an interesting problem that I was hoping someone might shed
some light on. I'm writing a script that mirrors the contents of a
directory to another machine via FTP, using the Net::FTP module. (And
don't tell me to use 'mirror'... the reason I'm writing this is because it
munches so badly. ;) In fact, it already works quite well, assuming all
your files are in one flat directory. :P
Now, I'm trying to write a routine that produces a list of all the
files on the mirror site that don't exist on the main site -- i.e., files
that have been deleted locally, so that I can DELE them. Problem is, I
can't get a bloody
"ls -R" of the remote site! I've tried quite a few things, including
rolling my own with NLST, but it's not working... seems like practically
everything ls-associated is returning an undefined value. And I don't have
permission to run an 'ls -R' cronjob on the remote site... *sigh*
Has anyone ever done something like this before with FTP? If so, I'd
kill for a look at your code. Otherwise, if some brave, intrepid soul
cares to glance at my code, it's at
http://cmitlab.smu.edu/~dennis/glass.pl ( a weak pun on "mirror"). All
the lines marked with "# TEST TEST TEST" are debugging prints that don't
print anything. In fact, the program prints nothing to std{out,err} --
kinda surprising, considering how many print statements I stuck in there.
(The logfile prints work, though).
Now, I'm not begging for someone to fix my code for me... I was just
wondering if someone had solved this before, or if you might have some
suggestions or criticism. Thanks in advance!
-- dennis taylor (fimmtiu, #perl)
---------------------
This space intentionally left blank.
------------------------------
Date: Tue, 17 Jun 1997 07:58:05 GMT
From: brian.orpin@gecmX.com (Brian Orpin)
Subject: Re: Look for a good IDE for win32
Message-Id: <33a64298.3142126@news.geccs.gecm.com>
On Sun, 15 Jun 1997 03:02:00 -0500, "Joshua Frank" <joshua@midwest.net>
wrote:
>Does anyone know of a good integrated development enviroment for windows
>95.
>I getting tired of writing my programs with notepad. I found a one for perl
>4 but I could find one for perl 5.
It is not exactly an IDE but an editor called PFE allows you to run your
Perl script and capture the output. It is also language sensitive so set
it up for C and it works pretty well. There is also no limit on file
size. http://www.lancs.ac.uk/people/cpaap/pfe/ and its free.
Posted and emailed.
--
Brian Orpin (These thoughts are my own ......... for once!)
brian.orpin@gecmX.com or BrianOrpin@BigfootX.com
http://www.borpin.demon.co.uk/ **Anti-spam reply-to remove X**
------------------------------
Date: Tue, 17 Jun 1997 00:10:07 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Re: mod_perl or fastcgi install, liberl.so help..
Message-Id: <33A6384F.443F@hotmail.com>
Doug MacEachern wrote:
>
> perl guy wrote:
> >
> > Hi..
> >
> > I am looking to do a few things, but I'm not sure how much I can do
> > remotely.
> > Needless to say, I'm hoping for a little direction in where to tell my
> > server tech to look, and to do with some things he's having trouble
> > with.
> > I'm trying to get either mod_perl or fastcgi to work on this system so I
> > won't chew up the CPU, etc.. Right now I have a chat site, and it's
> > getting so much traffic, that it's much too slow, and doing a number on
> > the machine it's run on.
> >
> > The chat scripts are in Perl and I want to keep them that way for
> > portability, etc... so please don't post to me about how I should do
> > this in C, etc.
> >
> > Also, I am looking into building a shared libperl.so library to link my
> > script to. I want to link my main perl binary with this, as I
> > understand is will make my 500BK+ /usr/bin/perl file run as small as
> > only 11k to 30K in size! I could really use that feature at this point
> > as well, or at least untill we get the mod_perl working. But he's having
> > trouble installing it.
> >
> > I need to do something, but my access is somewhat limited, because I'm
> > not the tech at my server, and although I do have root access, I can
> > only do things remotely via telnet. I think they might get annoyed wth
> > me going to the server and tweaking the Linux box. So, what exactly can
> > I do from remote access via Telnet?
> >
> > Is there anyone that can advise me about how to get the mod_perl going,
> > and what and *if* I need to change in my scripts usually. I am a plain
> > perl hacker (not an expert), in other words, I do scripts.. I don't have
> > knowledge of how everythign workds, let alone, .pm, etc files and mods..
> > and I surely know very little about the actual Linux box and how to go
> > about installing a plugin such as mod_perl. I'm looking and learning as
> > much as I can, but this needs to be done soon, and I would appreciate
> > any advice, etc.. I hope that I don't have to change much in my scripts,
> > but I am more concerned with getting this working. My tech hs read
> > through all the fiels wth information about the mod_perl install, but
> > yet, he's having trouble wth it. *cringe* For now, I'm stuck. Any ideas,
> > advice, or pointers? Maybe I need to send him to a mod_perl site for
> > dummies?. maybe I should look there too :0
> >
> > BTW, I'm running Linux, with Ret Hat 4, Apache 1.2 (not beta), perl
> > 5.003, Kernel is 2.0.18 .. Thanks for any advice. This is all new to
> > me, and all the info is vague it seems. Thanks again for any help.
>
> You don't explain the problem(s) you're having with mod_perl.
> Configure/build/install usually involves nothing more than:
>
> perl Makefile.PL && make test && make install
>
> The docs explain this and more if you need to link static Perl extensions,
> enable additional features, etc.
>
> mod_perl.pod explains how to configure your server:
>
> ---
> For using mod_perl as a CGI replacement, the recommended configuration is as
> follows:
>
> Alias /perl/ /real/path/to/perl-scripts/
> <Location /perl>
> SetHandler perl-script
> PerlHandler Apache::Registry
> Options ExecCGI
> </Location>
>
> ---
>
> You don't need to be "an expert" or know how everything works to use
> mod_perl. If you're script doesn't run out-of-the box, read the FAQ. It
> explains where CGI lets you get away not cleaning up global variables, etc.,
> and how 'use strict' and '-w' will help you a great deal, along with other
> tips.
>
> -Doug
Sorry for not explaining the exactt problem. Thank you for the help. I
am (and have been) anxiously awaiting for the info I need from the tech
at my server.. I am still waiting.. sorry.. Thank you for the help you
offered!.. I'll repost if he still has problems, and actually tells me
what is going on. I was basically looking for genral advice. But I
suppose that is rather difficult with very little info.> sorry.. and
thanks again..
------------------------------
Date: 15 Jun 1997 17:13:43 GMT
From: "Eric D. Friedman" <friedman@uci.edu>
Subject: Re: Module installation and usage without root access - Summary
Message-Id: <5o17s7$jp3@news.service.uci.edu>
[mailed, posted]
In article <33a35e8d.2530205@nntp.netcruiser>,
Brian Lavender <brian@brie.com> wrote:
<To install a module in a local directory use the following
<
<> 1.Unpack the source into a temporary area.
<
<> 2. perl Makefile.PL PREFIX=~/perl
< If your shell expands the ~ it will follow the path from
<your home directory. Someone also suggested to me to use
Randal explained in a response to my post that, in fact, the shell
doesn't expand the tilde, MakeMaker does. here's the relevant snippet
from the MakeMaker manpage:
"Note, that in both cases the tilde expansion is done by
MakeMaker, not by perl by default, nor by make."
<To use a module installed in a local directory insert the following in
<your code. Insert the following at the beginning of your script.
<Replace the path with the absolute path on your machine where the
<modules are installed.
<
<use lib "/usr/path/to/module/lib";
Two things here:
(1) Why use double quotes on a string that has no variables to
interpolate?
(2) Why not use the handy qw() syntax to do the quoting? that way,
when you need to use more than one library path, you can just
add it to the list:
use lib qw(/usr/path/to/personal/modules /usr/path/to/friends/modules);
--
Eric D. Friedman
friedman@uci.edu
------------------------------
Date: 17 Jun 1997 04:53:51 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Newbee
Message-Id: <5o558v$ci6@fridge-nf0.shore.net>
ctd (ctd@red.East.Sun.com) wrote:
: Is this the correct place to post questions about Perl....very basic
: stuff?
Get the FAQ from http://www.perl.com/FAQ, see if it answers any
questions you may have, then fire away if it the FAQ doesn't answer
your questions.
--
Nathan V. Patwardhan
nvp@shore.net
------------------------------
Date: 16 Jun 1997 23:44:54 GMT
From: northrup@chem.ufl.edu (Dylan Northrup)
Subject: Re: News servers function in Perl Is it possible ?
Message-Id: <5o4j5m$1rb$1@nostromo.clas.ufl.edu>
An infinite number of monkeys in the guise of Tom Phoenix <rootbeer@teleport.com> wrote:
=:On 10 Jun 1997, Ccadic wrote:
=:
=:> Connect to any newsgroups server (specified into the var configuration)
=:> Read all newsgroups titles and save them in a txt file.
=:> Then retrieve any the articles if a word is in it.
=:
=:Perl can do this with the NNTP module; you'll find modules on CPAN. Hope
=:this helps!
=:
=: http://www.perl.org/CPAN/
=: http://www.perl.com/CPAN/
And if you want an example of how to use the NNTP module once you (or your
admin) gets it installed, check out 'news.cgi' at ftp.chem.ufl.edu in the
/pub/staff/northrup/perl directory. This is a backend to a form I have that
accepts a newsgroup and a regular expression and returns all the articles
that match the RE.
Hope this helps.
--
Dylan Northrup <*> northrup@pobox.com <*> http://pobox.com/~northrup <*>
Ask me about e-mail P.O. Boxes <*> "I don't want the world, just your half"
---------------
Random B5 Quote
---------------
"We are fighting to save one another and some of us must be sacrificed if
all are to be saved."
-- Kosh (as G'kar's father), "Dust to Dust"
------------------------------
Date: 17 Jun 1997 08:56:58 GMT
From: erik@paxp01.mipool.uni-jena.de (Erik Braun)
Subject: Re: PERL Amiga.....
Message-Id: <slrn5qckam.dh2.erik@paxp01.mipool.uni-jena.de>
On 15 Jun 97 01:19:26, Geoff Taylor <dreamland@207.69.188.186> wrote:
>Anyone out there using PERL on AMIGA?
Yes, sure, me. Perl for Amiga runs quite well. I had a few incompatibilies
with seek/tell.
You can find it on the Geek-Gadgets-CD (http://www.ninemoons.com or in
ftp://ftp.uni-erlangen.de/pub/amiga/ade/current/amiga-bin/).
>or know if there is a PERL 5 compiler for WIN95/3.1/MSDOS
Have a look to the "Perl Reference" (URL http://www.panix.com/~clay/perl/).
There you also find a link to Perl foer Win32.
Bye, Erik
--
erik@minet.uni-jena.de
------------------------------
Date: 17 Jun 1997 10:39:00 GMT
From: kpur@jet.uk (Krishan Purahoo)
Subject: Problem using Net::FTP behind a firewall
Message-Id: <5o5pg4$iqf@flex.uunet.pipex.com>
Hi,
I am trying to use Net::FTP to ftp from behind a firewall, using the
following code.
1 #!/usr/local/bin/perl
2
3 use Net::FTP;
4
5 $ftp = Net::FTP->new("some.site", Firewall => "firewall", Timeout => 10);
6 $ftp->login("anonymous", "email_address");
7 print $ftp->pwd,"\n";
8 print $ftp->ls('-l');
9 $ftp->quit;
When I run the above code, I get the following error message:
Can't call method "login" without a package or object reference at line 6
Reading through Net::FTP.3, I couldn't find anything else that I could try
to get the above to work. Does anybody has any idea what is wrong in the above
code.
TIA
krishan
krishan.purahoo@jet.uk
------------------------------
Date: 17 Jun 1997 10:30:45 GMT
From: jarausch@numa1.igpm.rwth-aachen.de (Helmut Jarausch)
Subject: Reference guide updated to 5.004 ?
Message-Id: <5o5p0l$7hm$1@news.rwth-aachen.de>
Hi,
I very much like the Perl reference guide by Johan Vromans
(perlref-5.001.2.tar.gz).
Has anybody checked it if it's still up-to-date and if not, is there
an updated version or a list of suggested changes?
Thanks,
--
Helmut Jarausch
Lehrstuhl f. Numerische Mathematik
Institute of Technology
RWTH Aachen
D 52056 Aachen, Germany
------------------------------
Date: Tue, 17 Jun 1997 13:06:39 GMT
From: paul@wau.mis.ah.nl (Paul Slootman)
Subject: Re: Sort equivalent in Perl
Message-Id: <EBx8F4.2vu@wau.mis.ah.nl>
Simon Fairey <sfairey@metrica.co.uk> wrote:
>Thee Boon Hoo wrote:
>>
>> sort -f -t : <filename>
>>
>Try having a look at the following:
>
>http://www.perl.com/perl/everything_to_know/sort.html
I've looked there, and I'm not sure I'm better off for it :-)
For the above sort command, what's the point of the "-t :" part, if
you're not going to use the fields distinctly anyway?
Anyway, I want to do something similar. I'm building a script which
will be used to restore a system from online backups. The problem is
that this has to run off a tiny filesystem, so most of the system
commands aren't available, notably sort. I have perl, however. I'm
trying to implement the "sort -r -t. +2" command in perl, and have
come up with this:
sub bydate {
($ax = $a) =~ s/(.*)\.(.*)\.(.*)/$3.$2.$1/;
($bx = $b) =~ s/(.*)\.(.*)\.(.*)/$3.$2.$1/;
$bx cmp $ax;
}
while (<>) {
$x{"$_"} = 1;
}
print sort bydate (keys %x)'
Please forgive my misuse of associative arrays for this...
I can't help thinking that there should be a more elegant way of doing this.
The data will typically consist of about 10 lines, so a slow algorithm isn't
my concern. Sample data:
/backup1/dump/0/var.0.19970617.Z
/backup1/dump/0/var.1.19970617.Z
/backup1/dump/1/var.0.19970615.Z
/backup2/dump/0/var.0.19970616.Z
/backup2/dump/1/var.0.19970614.Z
/backup2/dump/1/var.1.19970614.Z
/backup2/dump/1/var.1.19970618.Z
I'd look it up in my "Learning Perl" book, but I'm still waiting
(Randal: hint! :-)
Paul Slootman
--
Murphy Software, Enschede, The Netherlands | UNIX is easy to use.
email work: paul@wau.mis.ah.nl / paul@murphy.nl | UNIX is not necessarily
email home: paul@wurtel.demon.nl | easy to learn.
http://www.wurtel.demon.nl | Learn the difference.
------------------------------
Date: 17 Jun 1997 09:47:37 GMT
From: "Chris Wareham" <chriswareham@dial.pipex.com>
Subject: Trouble compiling TkPerl under NT
Message-Id: <01bc7b03$d88e1600$038182c1@TI_SGML_SUNDOG>
According to the documentation, the last two alpha versions of TkPerl
(402.000 and 402.001)
should compile under WinNT using Visual C++, and now under Borland's C++
compiler (presumably
C++ Builder). I compiled Perl 5.004 under Visual C++ v2.0 with no problem,
and installed the
pre-compiled binaries of Tcl7.6 / Tk4.2.
My goal was to compile TkPerl 402.000 (402.001 as of this morning), so I
could replace my Tcl/Tk
scripts, and use the better string manipulation in Perl. However, I can't
get the bugger to work.
I had to edit the Makefiles to include ntwin32.mak rather than win32.mak,
and added compiler
flags for the CPU type (CPU = i386), but now it's bombing out saying it
can't make TkPhotoImg.esc
because it isn't defined in the tk header file. I've scratched around in
comp.lang.perl.misc and
comp.lang.perl.tk for answers, and on the Web, but to no avail.
So, if anyone has successfully compiled TkPerl under NT, can I have a copy
of your binary? Or
failing that, any details of what version of Visual C++ is best and any
workarounds needed.
I'll keep a beady eye on the newsgroup, in anticipation of any answers ...
Chris Wareham
Analyst/Programmer,
Product Application Development and Research,
Technical Indexes Ltd.
chriswareham@dial.pipex.com
office +44 0(1)344 426311 extension 307
fax +44 0(1)344 424971
------------------------------
Date: 14 Jun 1997 12:36:40 -0400
From: jseymour@jimsun.medar.com (Jim Seymour)
Subject: Re: What does "UNIX" stand for..
Message-Id: <5nuhao$kg5$1@jimsun.uucp>
In article <5nkah1$7qj@camel3.mindspring.com>,
Kevin Schaffer <kxs@mindspring.com> wrote:
>In article <339D7121.F121CA82@inorbit.com>, av@inorbit.com wrote:
>>Bill (Gates) Erwin wrote:
>>
>>> UNIX started out as "Castrated MULTICS" and was shortened from there.
>>> Check out the "UNIX Haters Handbook" for further details.
>>>
>>> Bill
>>
>>I don't know what the "UNIX Haters Handbook" is, but sounds like
>>bullshit...
>>
>
>Tar Dash Ecks Vee Eff
I concur. Flexible components are a Bad Thing [tm]. They only
needlessly confuse people.
>
>
>
>.. and don't forget to type in the number of cylinders on your
>hard disk.
Again, I concur. The customer would be better-off not having to
deal with this kind of arcane techno-drivel. This end can easily
be accomplished by limiting said customer's choices to a few pre-
defined options determined by the vendor to be the best for all.
Regards,
Jim
--
Jim Seymour | I think they may have got it wrong in the
jimsun!jseymour@medar.com | translation. It should probably have been
| translated as: "And the mediocre shall
| inherit the Earth." - Me
------------------------------
Date: Tue, 17 Jun 1997 00:00:26 -0700
From: perl guy <perlprogrammer@hotmail.com>
Subject: Re: What is CGI?
Message-Id: <33A6360A.59E1@hotmail.com>
Mr Mah Hang Chin wrote:
>
> I am a novice. Can anyone tell me what is CGI pls and what is so
> good about it?
> Cheers.
>
> Yours sincerely,
> HANG CHIN
Commom Gateway Interface.. Ask in the CGI news group for more my friend
:o)
comp.infosystems.www.authoring.cgi
------------------------------
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 623
*************************************