[18578] in Perl-Users-Digest
Perl-Users Digest, Issue: 746 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 23 14:05:51 2001
Date: Mon, 23 Apr 2001 11:05:11 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <988049111-v10-i746@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Mon, 23 Apr 2001 Volume: 10 Number: 746
Today's topics:
Re: ? Do you know some similar service ? (Michel Dalle)
Re: bmp with %username% on up right corner nobull@mail.com
Compression (to .zip/.gz) using system/backticks <webmaster@webdragon.unmunge.net>
Re: Daemon: should the parent exit or _exit after the f (Anno Siegel)
Re: GD/TrueType weirdness (CODE SAMPLE) <dharding@uiuc.edu>
Getting a list of modules currently installed <stumo@bigfoot.com>
Re: Getting a list of modules currently installed (Anno Siegel)
Re: Getting character codes (Rudolf Polzer)
Re: Good editor for perl (Monte)
Re: Good editor for perl <Lyle_Goldman@ibi.com>
Re: Good editor for perl <Lyle_Goldman@ibi.com>
Re: Good editor for perl <Lyle_Goldman@ibi.com>
Re: Good editor for perl (Anno Siegel)
Re: Good editor for perl <bart.lateur@skynet.be>
Re: Good editor for perl (Anno Siegel)
Re: Good editor for perl <bart.lateur@skynet.be>
Re: Good editor for perl <moverho1@nycap.rr.com>
Re: Good editor for perl (Anno Siegel)
Re: Good editor for perl <simon@super-simon.com>
Re: Good editor for perl <joe+usenet@sunstarsys.com>
Re: Good editor for perl <smilepak@hotmail.com>
Re: Good editor for perl (Rudolf Polzer)
Re: Good editor for perl (Rudolf Polzer)
Re: Including another file nobull@mail.com
LWP::UserAgent? <smilepak@hotmail.com>
Re: LWP::UserAgent? <xarbosa@yahoo.com>
Re: Mod perl,Apache,Win 98 <randy@theoryx5.uwinnipeg.ca>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 23 Apr 2001 16:42:36 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: ? Do you know some similar service ?
Message-Id: <9c1m1j$9lh$1@news.mch.sbs.de>
In article <9c0vp1$9gb$1@news.EUnet.yu>, "Debizi" <debizi@yahoo.com> wrote:
>Do you know some good service like SwapResources.com Newsletter
>swap_it-subscribe@listbot.com where you can submit your swap request for
>your programming web site or newsletter?
>Regards,
> Debizi
Hmmm, I'm not sure. Have you tried abuse@EUnet.yu yet ?
You'll probably find like-minded people on that list...
Michel.
------------------------------
Date: 23 Apr 2001 18:09:37 +0100
From: nobull@mail.com
Subject: Re: bmp with %username% on up right corner
Message-Id: <u9zod7mtke.fsf@wcl-l.bham.ac.uk>
"novastar" <root@novastar.dtds.net> writes:
> I am asked to write a logon script (win), where among all the other user
> enviroment personalization will have to set a black bmp wallpaper with
> username and host IP at the up right corner !!!
> I search at cpan for any bmp manipulating modules but I found nothing ...
At least you looked. You didn't look very hard though, I looked and
found Image::Magick.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 23 Apr 2001 17:30:18 GMT
From: "Scott R. Godin" <webmaster@webdragon.unmunge.net>
Subject: Compression (to .zip/.gz) using system/backticks
Message-Id: <9c1ora$573$0@216.155.32.16>
I have two text files (one .html, and one plain .txt) generated by a
Perl CGI script I'm working on. I was considering having the script
e-mail the files to the end-user, but two things occured to me.
1> there is a (slight to moderate) possibility of it being used for
abuse, in that the user could enter an incorrect (i.e. someone else's)
mail address
2> I'd most likely want to use Mail::Mailer or MIME::Lite to send
the files as attachments, and in either case, it would require the host
to install those perl modules. Since in 5 months, I haven't even been
able to get them to update some stock modules that I *know* have bugs in
them, and really *require* newer versions... this doesn't seem likely.
SO, I'm considering calling out to the shell via system or backticks to
have it compress the two files into a .zip archive.
Two things have me pausing.. one, I'm not 100% certain of the syntax
needed to .zip (which I use more of between Mac and Windoze) a file
instead of gzip (which I use more of between my Mac and my shell). I'm
quite familiar with gzip from the shell but I've never used anything
that created plain .zip files from unix, so I'm unsure which way to go.
Since I'm of certainty approaching 100% that the people using this
script to generate the templates will be on Windows systems, (and some
may be complete newbies) I'd rather give them a file that I'm confident
can be "unzipped" with something like WinZip[1].
so it boils down to two questions
A. (non-perl) does anyone offhand know whether WinZip can uncopress a
unix .gz file?
B. (perl ! and thus saving my bacon :) would the proper command look
something like
`cat $file1 $file2 | gzip > ${fileprefix}.gz`
or die "$!";
.. or would it be $@ and not $! ?
Obviously I know the unix part -- cat filea fileb |gzip >foo.gz --
that's not what I'm asking in B, above. *cough* :-)
Or would you do it a different way?
Thanks for any tips.[2]
[1] I mean, ok, it's easy enough to just let them 'save as' from the
browser preview of the files, but not all browsers preserve the original
file name, plus as a .zip file it takes up less of our precious
bandwidth while they download. I'd just like to idiot-proof the whole
thing as much as possible, and prevent the users from even THINKING of
re-naming the files "README.html" or "ReadMe.txt", as with 3700 files in
the database, each 'readme.foo' overwrites the previous one as the end
users unzip 'em. bleh. I'd love to prevent more of this insanity. :)
[2] If you'd rather not answer because you think the whole thing is too
much unix and not enough perl[3], would you be so kind as to provide a
helpful suggestion as to which comp.unix.* group would be most receptive
and responsive to my questions above? I looked, but there's enough of
'em that I'm not sure. I *will* be sure to keep any answer to [2] in
mind in the future however, with many thanks for the tip.
[3] really ran the gamut on this one today, didn't I? ... perl, cgi,
unix, zip, modules, net-abuse, which-newsgroup-should-I-*?, etc.. :-)
ay yi yi.
--
unmunge e-mail here:
#!perl -w
print map {chr(ord($_)-3)} split //, "zhepdvwhuCzhegudjrq1qhw";
# ( damn spammers. *shakes fist* take a hint. =:P )
------------------------------
Date: 23 Apr 2001 17:13:54 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Daemon: should the parent exit or _exit after the fork?
Message-Id: <9c1nsi$q0$7@mamenchi.zrz.TU-Berlin.DE>
According to Philip Newton <nospam.newton@gmx.li>:
> On Sun, 22 Apr 2001 01:49:39 GMT, garry@ifr.zvolve.net (Garry
> Williams) wrote:
>
> > On Thu, 19 Apr 2001 20:25:51 +0200, Philip Newton
> > <pne-news-20010419@newton.digitalspace.net> wrote:
> >
> > > I'm writing a daemon in Perl and am wondering whether I need to call
> > > exit or _exit (well, POSIX::_exit) in the parent after the fork.
> >
> > If you check the exit(2) manual page, you find that _exit(2) will not
> > flush open output streams or call the registered atexit(3) functions.
> > I suppose I can't think of a reason you would want this behavior, but
> > that's the difference.
>
> For example, because you don't want the child's output streams (which
> it shares with the parent) to be flushed along with the parent's
> streams when it calls exit()? Probably makes things less confusing.
What makes the final flush special? Parent and kid will have flushed
in an un-coordinated way all along. If this is a problem, the streams
must be separated.
Anno
------------------------------
Date: Mon, 23 Apr 2001 12:39:09 -0500
From: Dan Harding <dharding@uiuc.edu>
Subject: Re: GD/TrueType weirdness (CODE SAMPLE)
Message-Id: <3AE468BD.C81EE2A9@uiuc.edu>
Bryan Coon wrote:
>
> Try this:
>
> #!/usr/bin/perl -w
>
> use GD;
>
> $im = new GD::Image(400,400);
>
> $im->colorAllocate(255,255,238);
> $brown = $im->colorAllocate(159,30,0);
>
> $textstring = "Hey this thing works!";
> $im->stringTTF($brown,"/usr/share/fonts/default/TrueType/arial.ttf",10,1,200,200,$textstring);
>
> open (IMAGE,"> test.png") || die;
> print IMAGE $im->png;
> close (IMAGE);
>
> Altering paths for your stuff. If you continue to have problems,
> then I maintain that you have GD lib problems, as this works fine
> for me.
Ergf. Tried this, altering only 2 things: (1) path, and (2) adding
a BINOMODE statement after the OPEN command. Still no dice.
If I use a nonexistent path, or a fake fontfile name, I simply get
a 400x400 blank image. Using a real path to a real .TTF file
gets me boxes; said boxes increase and decrease with font size
as one would expect a font to behave.
So I'm guessing the problem lies with libgd. Since the GD lib
(presumably) was installed with the Active Perl binaries,
and that I do not have the capacity to compile/recompile anything,
do I have any options, or do I simply abandon the idea of using
TrueType fonts (which effectively destroys the usefulness of GD
for me)?
*sigh*
-Dan
------------------------------
Date: Mon, 23 Apr 2001 17:35:39 +0100
From: "Stuart Moore" <stumo@bigfoot.com>
Subject: Getting a list of modules currently installed
Message-Id: <2RYE6.3013$Ln6.230693@news2-win.server.ntlworld.com>
Is there a way to get a list of all currently available modules from within a
Perl script? I haven't had any luck searching for one, but it may just be me
being more massive per unit volume.
Stuart
------------------------------
Date: 23 Apr 2001 17:05:19 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Getting a list of modules currently installed
Message-Id: <9c1ncf$q0$6@mamenchi.zrz.TU-Berlin.DE>
According to Stuart Moore <stumo@bigfoot.com>:
> Is there a way to get a list of all currently available modules from within a
> Perl script? I haven't had any luck searching for one, but it may just be me
> being more massive per unit volume.
"perldoc perllocal" shows you the non-standard modules that have
been installed using a MakeMaker-generated makefile. This means
that all modules from CPAN should appear.
Anno
------------------------------
Date: Mon, 23 Apr 2001 19:48:28 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: Getting character codes
Message-Id: <slrn9e8qnc.oi.eins@www42.t-offline.de>
Alan J. Flavell <flavell@mail.cern.ch> wrote:
> On Sat, 21 Apr 2001, echo 'Rudolf Polzer'>/dev/null wrote:
>
> > A variant of this can be used to get ANSI
> > codes of ASCII characters or the other way round,
>
> If I thought there was any point in asking, I'd want to know what this
> is supposed to mean.
>
> Hint: ASCII defines a 7-bit code, with values therefore ranging from
> 0 to 127 decimal. Sometimes found with the high bit used as a parity
> bit. The US-ASCII coding is _an_ ANSI standard, ANSI_X3.4-1986 (as
> well as being an ISO standard, ISO646).
>
> The term "ANSI coding" leads a strange twilight existence. According
> to various documentation from Microsoft, the term "ANSI" is claimed to
> denote a family of 8-bit codings defined by Microsoft. Strange, I
> didn't know that the ANSI had been taken over by one vendor. In fact,
> the ANSI seem to have gracefully retired from defining national
> character codings, in favour of more international efforts in ISO.
Sorry, I meant DOS-437 (or the OEM charset) with ASCII and the Windoze
charset with ANSI.
> US-ASCII is a subset (i.e positions 0 to 127) of _all_ of these
> 8-bit codings.
Perhaps I learnt too much bullsh*t from some word processors that
called 437 'ASCII' and the Windoze charset 'ANSI'. Perhaps I did too
much Win32 coding using oemtoansi functions.
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: Mon, 23 Apr 2001 15:10:31 GMT
From: montep@about.com (Monte)
Subject: Re: Good editor for perl
Message-Id: <3ae445a2.9855821@news.hal-pc.org>
On Mon, 23 Apr 2001 16:08:42 +0200, "Super-Simon"
<simon@super-simon.com> wrote:
>Hi all,
>
>I'm searching for a good, fast editor with syntax highlighting for perl
>(CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
>editing scripts, scripts runs on Linux-server). It has to be free (I'm a
>poor student ;-)
>
>Grtz,
>
>Super-Simon
>
DZ Softs Perl Editor works nicely on Windows machines. Also runs and
displays the code. Highlighting and many other whistles and bells.
g'Luk
if your gonna spam.....
admin@loopback, $LOGIN@localhost, $LOGNAME@localhost, $USER@localhost, $USER@$HOST, -h1024@localhost, root@mailloop.com root@localhost, postmaster@localhost, admin@localhost
------------------------------
Date: Mon, 23 Apr 2001 16:01:12 GMT
From: Lyle Goldman <Lyle_Goldman@ibi.com>
Subject: Re: Good editor for perl
Message-Id: <clYE6.2016$QV4.161745@www.newsranger.com>
On Mon, 23 Apr 2001 16:08:42 +0200, Super-Simon <simon@super-simon.com> wrote:
>
> Hi all,
>
> I'm searching for a good, fast editor with syntax highlighting for perl
> (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> poor student ;-)
>
> Grtz,
>
> Super-Simon
>
I use emacs to edit perl. It does syntax highlighting, and there is a free
download available for practically every platform, including Windows. The
later versions of emacs do syntax highlighting for many different file types,
including perl. My boss uses Visual SlickEdit, which also does syntax
highlighting, but I don't know how to obtain that.
- Lyle Goldman
------------------------------
Date: Mon, 23 Apr 2001 16:06:13 GMT
From: Lyle Goldman <Lyle_Goldman@ibi.com>
Subject: Re: Good editor for perl
Message-Id: <VpYE6.2025$QV4.162345@www.newsranger.com>
On Mon, 23 Apr 2001 16:08:42 +0200, Super-Simon <simon@super-simon.com> wrote:
>
> Hi all,
>
> I'm searching for a good, fast editor with syntax highlighting for perl
> (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> poor student ;-)
>
> Grtz,
>
> Super-Simon
>
I use emacs to edit perl. It does syntax highlighting, and there is a free
download available for practically every platform, including Windows. The
later versions of emacs do syntax highlighting for many different file types,
including perl. My boss uses Visual SlickEdit, which also does syntax
highlighting, but I don't know how to obtain that.
- Lyle Goldman
------------------------------
Date: Mon, 23 Apr 2001 16:11:23 GMT
From: Lyle Goldman <Lyle_Goldman@ibi.com>
Subject: Re: Good editor for perl
Message-Id: <LuYE6.2030$QV4.163235@www.newsranger.com>
Sorry for posting twice. I didn't think the first message made it to this
newsgroup.
- Lyle Goldman
------------------------------
Date: 23 Apr 2001 16:20:04 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Good editor for perl
Message-Id: <9c1knk$q0$3@mamenchi.zrz.TU-Berlin.DE>
[Newsgroups (some of them bogus) trimmed]
According to Super-Simon <simon@super-simon.com>:
Don't top-post.
> Looks nice, but it's shareware and I can't find the syntax highlighting....
>
> Someone who knows something better...
Is this supposed to imply syntax hilighting is a good thing?
Anno
[jeopardectomy]
------------------------------
Date: Mon, 23 Apr 2001 16:26:01 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Good editor for perl
Message-Id: <3tl8et009mh79ku0fgldttje0oujdcggbm@4ax.com>
Anno Siegel wrote:
>Is this supposed to imply syntax hilighting is a good thing?
It's nice if only for one reason: it clearly indicates which parts are
strings, not code, and you can see if you used the correct string
closing delimiter.
$foo = "oops';
--
Bart.
------------------------------
Date: 23 Apr 2001 16:35:21 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Good editor for perl
Message-Id: <9c1lk9$q0$4@mamenchi.zrz.TU-Berlin.DE>
According to Bart Lateur <bart.lateur@skynet.be>:
> Anno Siegel wrote:
>
> >Is this supposed to imply syntax hilighting is a good thing?
>
> It's nice if only for one reason: it clearly indicates which parts are
> strings, not code, and you can see if you used the correct string
> closing delimiter.
>
> $foo = "oops';
...the only reason why I used to switch it on occasionally, though
Perl's "runaway string" message is usually informative enough when
it happens.
I found that I spend more time making my source not look like angry
fruit salad than a syntax highlighter has ever saved me.
Anno
------------------------------
Date: Mon, 23 Apr 2001 16:47:19 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Good editor for perl
Message-Id: <37n8et42reg8q44gk0996mootsgpt9bhp0@4ax.com>
Anno Siegel wrote:
> found that I spend more time making my source not look like angry
>fruit salad than a syntax highlighter has ever saved me.
Then your colors are too bright. They should be non-intrusive.
--
Bart.
------------------------------
Date: Mon, 23 Apr 2001 16:51:32 GMT
From: "Mark" <moverho1@nycap.rr.com>
Subject: Re: Good editor for perl
Message-Id: <o4ZE6.27263$gl.3622229@typhoon.nyroc.rr.com>
I use a demo with a nag screen called multi edit
there are a few things about it I dont like but possably because i dont have
it set up correctly example when editing I'll hightlight some code to delete
it and hit backspace but it only moves the curser back 1 space and doesnt
delete the rest i have to hit space then backspace.
but over all its a exelant editor with color accenting for all types of
language support.
was told emacs is a good editor but never used it after finding this and
from what i have seen of both I like this one better.
It's free but there is a nag screen that comes up every so often and
interupts you but not so bad its not workable.
http://www.multiedit.com/
"Super-Simon" <simon@super-simon.com> wrote in message
news:9c1csm$loh$1@news1.xs4all.nl...
Hi all,
I'm searching for a good, fast editor with syntax highlighting for perl
(CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
editing scripts, scripts runs on Linux-server). It has to be free (I'm a
poor student ;-)
Grtz,
Super-Simon
------------------------------
Date: 23 Apr 2001 17:00:58 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Good editor for perl
Message-Id: <9c1n4a$q0$5@mamenchi.zrz.TU-Berlin.DE>
According to Bart Lateur <bart.lateur@skynet.be>:
> Anno Siegel wrote:
>
> > found that I spend more time making my source not look like angry
> >fruit salad than a syntax highlighter has ever saved me.
>
> Then your colors are too bright. They should be non-intrusive.
Of course. And combined with all manner of bold and (fake) italic.
That's the way these things tend to come out of the box, in my
experience. Some even want to help me indent.
In any case, they do not really highlight syntax. Well, perhaps
in lisp, but not in Perl. A syntax highlighter should be able to tell
whether a particular "{" opens a block of code, a hash subscript, or
an anonymous hash. I don't expect one anytime soon.
Anno
------------------------------
Date: Mon, 23 Apr 2001 19:17:58 +0200
From: "Super-Simon" <simon@super-simon.com>
Subject: Re: Good editor for perl
Message-Id: <9c1nvj$n5t$1@news1.xs4all.nl>
Perl Editor is really great. And I've 30 days to get that $50 registration
fee ;-)
Thanks,
Super-Simon
"Monte" <montep@about.com> wrote in message
news:3ae445a2.9855821@news.hal-pc.org...
> On Mon, 23 Apr 2001 16:08:42 +0200, "Super-Simon"
> <simon@super-simon.com> wrote:
>
> >Hi all,
> >
> >I'm searching for a good, fast editor with syntax highlighting for perl
> >(CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> >editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> >poor student ;-)
> >
> >Grtz,
> >
> >Super-Simon
> >
> DZ Softs Perl Editor works nicely on Windows machines. Also runs and
> displays the code. Highlighting and many other whistles and bells.
>
> g'Luk
> if your gonna spam.....
> admin@loopback, $LOGIN@localhost, $LOGNAME@localhost, $USER@localhost,
$USER@$HOST, -h1024@localhost, root@mailloop.com root@localhost,
postmaster@localhost, admin@localhost
------------------------------
Date: 23 Apr 2001 13:17:12 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Good editor for perl
Message-Id: <m3ae57y1rb.fsf@mumonkan.sunstarsys.com>
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) writes:
> In any case, they do not really highlight syntax. Well, perhaps
> in lisp, but not in Perl. A syntax highlighter should be able to tell
> whether a particular "{" opens a block of code, a hash subscript, or
> an anonymous hash. I don't expect one anytime soon.
>
> Anno
Have you tried cperl-mode lately? IMHO it's pretty good at that, and only
occasionally needs a manual refresh. As for color schemes, a
mostly-grayscale config works fine for me.
--
Joe Schaefer "We are all in the gutter, but some of us are looking at the
stars."
-- Oscar Wilde
------------------------------
Date: Mon, 23 Apr 2001 17:29:20 GMT
From: "smilepak" <smilepak@hotmail.com>
Subject: Re: Good editor for perl
Message-Id: <QDZE6.1878$Ee1.180261@newsread2.prod.itd.earthlink.net>
CUTEHTML v2.0 from the creator of CUTEFTP
works great!
KN
"Super-Simon" <simon@super-simon.com> wrote in message
news:9c1csm$loh$1@news1.xs4all.nl...
> Hi all,
>
> I'm searching for a good, fast editor with syntax highlighting for perl
> (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> poor student ;-)
>
> Grtz,
>
> Super-Simon
>
>
------------------------------
Date: Mon, 23 Apr 2001 19:52:15 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: Good editor for perl
Message-Id: <slrn9e8quf.oi.eins@www42.t-offline.de>
Bart Lateur <bart.lateur@skynet.be> wrote:
> Anno Siegel wrote:
>
> >Is this supposed to imply syntax hilighting is a good thing?
>
> It's nice if only for one reason: it clearly indicates which parts are
> strings, not code, and you can see if you used the correct string
> closing delimiter.
>
> $foo = "oops';
I've never seen an editor that correctly highlights. mc for example
does not correctly work with here documents (just because I use a ' in
a here document everything after it is not highlighted, because of
this I use comments like #' just to stop it after the here document).
But they are great perl builtin spellcheckers.
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: Mon, 23 Apr 2001 19:53:32 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: Good editor for perl
Message-Id: <slrn9e8r0s.oi.eins@www42.t-offline.de>
Anno Siegel <anno4000@lublin.zrz.tu-berlin.de> wrote:
> According to Bart Lateur <bart.lateur@skynet.be>:
> > Anno Siegel wrote:
> >
> > > found that I spend more time making my source not look like angry
> > >fruit salad than a syntax highlighter has ever saved me.
> >
> > Then your colors are too bright. They should be non-intrusive.
>
> Of course. And combined with all manner of bold and (fake) italic.
> That's the way these things tend to come out of the box, in my
> experience. Some even want to help me indent.
>
> In any case, they do not really highlight syntax. Well, perhaps
> in lisp, but not in Perl. A syntax highlighter should be able to tell
> whether a particular "{" opens a block of code, a hash subscript, or
> an anonymous hash. I don't expect one anytime soon.
Isn't it 'only perl can parse Perl'?
--
#!/usr/bin/perl -W -- WARNING: This copies a random file from
use strict;my$s;my$n=0;for # the current directory to your
(<*>){++$n;int rand$n or$s # signature file. Use at your
=$_};`cp $s ~/.signature`; # own risk! (c) 2001 Rudolf Polzer
------------------------------
Date: 23 Apr 2001 18:10:34 +0100
From: nobull@mail.com
Subject: Re: Including another file
Message-Id: <u9wv8bmtit.fsf@wcl-l.bham.ac.uk>
"Robert Metcalf" <r.mMMMetcalf@eXXXx.AAAac.UUUuk> writes:
> In order to keep things tidy I want to keep the common variables together in
> one file.
> This file would have:
> $adminpass = "abc123abc";
> $location = "http://smash/cgi-bin/helpdesk";
Like we said when this question was asked last week (and the week
before and...), consider using just one variable, a hash.
> etc. The problem is that I have no idea what to write in the main prograph
> program to include this file when running the program.
perldoc -f do
perldoc -f require
Warning: do not ignore the bit where is points out lexically scoped
("my") variables cannot be set in this way.
For a more Perl5-ish approach see also:
perldoc Exporter
perldoc -f use
perldoc perlmod
> In BASIC, it's #Include("config.cfg"), but I am trying to find the perl
> alternative but the FAQ dosn't work.
Just because a question isn't in the FAQ yet doesn't mean it's not a FAQ.
Find numerous previous threads on this subject by going to your
favourate Usenet search engine and looking for the word 'include' in
subject lines on comp.lang.perl.*
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Mon, 23 Apr 2001 17:28:26 GMT
From: "smilepak" <smilepak@hotmail.com>
Subject: LWP::UserAgent?
Message-Id: <_CZE6.1875$Ee1.180039@newsread2.prod.itd.earthlink.net>
I have a question.
I have a list of file in which would like to pull using LWP::UserAgent,
however it seem like using $filename doesn't seem to work, but typing in the
actual filename works. Anyway around this?
HERE IS THE SCRIPT THAT DOESN'T WORK:
foreach $line(@list) {
chomp($line);
&sub_https($line);
}
sub sub_https {
$filename = shift;
$ua = new LWP::UserAgent;
my $req = new HTTP:Request 'GET', 'https://mydomain.com/$filename';
$res = $ua -> request($req, "$filename");
this method doesn't seem to work. However, if i replace $filename in
https://mydomain.com/actualfilename it works..see below
my $req = new HTTP:Request 'GET', "https://mydomain.com/actualfilename';
it work..anyway around this so I could specifiy the list of file to
download?
Thanx,
KN
------------------------------
Date: Mon, 23 Apr 2001 19:47:31 +0200
From: "xarbos" <xarbosa@yahoo.com>
Subject: Re: LWP::UserAgent?
Message-Id: <988047738.456958@perla.rotterdam.luna.net>
Quickie...
make an extra string like:
my $url = "'https://mydomain.com/".$filename;
then replace the url in the LWP GET statement with $url like:
my $req = new HTTP:Request 'GET', $url;
Hope this helps,
Xarbosa...
"smilepak" <smilepak@hotmail.com> wrote in message
news:_CZE6.1875$Ee1.180039@newsread2.prod.itd.earthlink.net...
> I have a question.
>
> I have a list of file in which would like to pull using LWP::UserAgent,
> however it seem like using $filename doesn't seem to work, but typing in
the
> actual filename works. Anyway around this?
>
> HERE IS THE SCRIPT THAT DOESN'T WORK:
>
> foreach $line(@list) {
> chomp($line);
> &sub_https($line);
> }
>
> sub sub_https {
> $filename = shift;
> $ua = new LWP::UserAgent;
> my $req = new HTTP:Request 'GET', 'https://mydomain.com/$filename';
> $res = $ua -> request($req, "$filename");
>
> this method doesn't seem to work. However, if i replace $filename in
> https://mydomain.com/actualfilename it works..see below
>
> my $req = new HTTP:Request 'GET', "https://mydomain.com/actualfilename';
>
> it work..anyway around this so I could specifiy the list of file to
> download?
>
> Thanx,
> KN
>
>
>
------------------------------
Date: 23 Apr 2001 15:30:13 GMT
From: Randy Kobes <randy@theoryx5.uwinnipeg.ca>
Subject: Re: Mod perl,Apache,Win 98
Message-Id: <9c1hq5$nd3$1@canopus.cc.umanitoba.ca>
In comp.lang.perl.misc, King Fu <kingfu@blueyonder.co.uk> wrote:
> Is it possible to install mod_perl on a win 98 box running activestates
> latest version of perl and the win32 version of apache?
Yes - see http://perl.apache.org/distributions.html.
best regards,
randy kobes
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 746
**************************************