[10969] in Perl-Users-Digest
Perl-Users Digest, Issue: 4569 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 7 03:07:10 1999
Date: Thu, 7 Jan 99 00:00:21 -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 Thu, 7 Jan 1999 Volume: 8 Number: 4569
Today's topics:
automatic ftp <rob.slattery@amaonline.com>
BMP -> GIF conversion with Perl Magick example please <kin@symmetrycomm.com>
Re: BMP -> GIF conversion with Perl Magick example plea (Martien Verbruggen)
CFV: what's with all the job posts? <uri@home.sysarch.com>
Delete Directory Paradox?? <design@raincloud-studios.com>
Re: Delete Directory Paradox?? <design@raincloud-studios.com>
Re: Deleting a line in a HTML File <ebohlman@netcom.com>
Re: Dynamic gifs on the fly <timk@mrbig.home.com>
Re: filename from a filehandle (Martien Verbruggen)
Re: filename from a filehandle (John Stanley)
Re: filename from a filehandle (Larry Rosler)
Re: filename from a filehandle <uri@home.sysarch.com>
hardcoding an additional, nonstandard element for @INC <mpersico@erols.com>
Re: Help reading/rewriting file <eugene@snailgem.org>
How to access Oracle database on Compaq Unix <seanl@tat.com.tw>
How to NOT use GOTO <jjarrett@ecpi.com>
Re: How to NOT use GOTO <uri@home.sysarch.com>
Re: i can't understand a program <no_amaring@jps.net>
inlclude html in mail thru perl jasjeetv@pugmarks.com
Re: line continuation; the switch statement (Michael Rubenstein)
line noise <andrew@geac.co.nz>
Re: Making an include using CGI.pm module <jjarrett@ecpi.com>
Not bad page for newbies.... <design@raincloud-studios.com>
Re: PERL and permissions <eugene@snailgem.org>
Re: Perl Criticism (Heath Holcomb)
Re: Please Help!! Craske_David_J@cat.com
Rename Files Button (SGhalay68)
Re: Shame: Deleting List Elements <ebohlman@netcom.com>
Re: what's with all the job posts? (John Stanley)
Re: what's with all the job posts? <uri@home.sysarch.com>
Re: what's with all the job posts? (John Stanley)
Re: Why _cannot_ dmake libwin32 ??? <metcher@spider.herston.uq.edu.au>
Re: Writing Perl with Notepad <shameluss plug> <nawkboy@flash.net>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 7 Jan 1999 00:52:57 -0600
From: "Rob S" <rob.slattery@amaonline.com>
Subject: automatic ftp
Message-Id: <nSYk2.999$cT4.8453@newsfeed.slurp.net>
I need my script to get a simple
ascii file located on another server.
How should I go about this?
ftp I suppose, but how?
system(ftp) ?
I'm perplexed about this.
It should be easy to string
the commands together.
I consider myself an accomplished
novice. All help welcome!
--
rob.slattery@amaonline.com
robert.slattery@noaa.gov
http://members.amaonline.com/chicago/
http://www.srh.noaa.gov/ama/
------------------------------
Date: 06 Jan 1999 19:41:07 -0800
From: Kin Cho <kin@symmetrycomm.com>
Subject: BMP -> GIF conversion with Perl Magick example please
Message-Id: <ug19nbvho.fsf@symmetrycomm.com>
The online help for this module is quite daunting.
I'm no graphic artist, so could someone please provide
a simple example of how to do this with Perl Magic?
I'm using NT 4.0.
Thanks!
-kin
------------------------------
Date: Thu, 07 Jan 1999 04:50:29 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: BMP -> GIF conversion with Perl Magick example please
Message-Id: <p2Xk2.183$5P1.8639@nsw.nnrp.telstra.net>
In article <ug19nbvho.fsf@symmetrycomm.com>,
Kin Cho <kin@symmetrycomm.com> writes:
> a simple example of how to do this with Perl Magic?
# perldoc Image::Magick
[snip]
A Web page has been set up for this extension. See:
http://www.wizards.dupont.com/cristy/www/perl.html
[snip]
And the source distribution has a demo directory in it, which has
stuff. get it from CPAN: http://www.perl.com/CPAN/
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Can't say that it is, 'cause it ain't.
NSW, Australia |
------------------------------
Date: 07 Jan 1999 00:02:14 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: CFV: what's with all the job posts?
Message-Id: <x7vhijllpl.fsf@home.sysarch.com>
c.l.p.misc seems to have had a recent bombardment of perl job
postings. they are generally considered OT and semi-spam. what are your
thoughts on c.l.p.jobs?
that group would be about jobs offered and wanted, discussions about
perl at work (not technical, but finding jobs or promoting perl at
work), and other related issues. i don't know if the volume is there for
a split but we seem to be getting a few a day now which matches the
moderated group volume. it also might encourage more job related posts
and would make for a better place to do that. the only perl jobs/resume
registry i know is at the perl journal (www.tpj.com) and it is weak
(sorry jon).
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 7 Jan 1999 06:17:49 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Delete Directory Paradox??
Message-Id: <771jid$30o@bgtnsc03.worldnet.att.net>
Perl allows me to create directory on my server, but I cannot delete one
that Perl creates. That doesn't make sense.
rmdir($fullpath) || &CgiDie("Cannot remove directory in delete
directory subroutine. Reason: $!");
Gives me the error....
Cannot remove directory in delete directory subroutine. Reason: Is a
directory
umm..duh?
The *script created* the directory with these permissions so doesn't
that mean it owns it?
drwxrwxr-x 2 www www 512 Jan 6 21:26 16-1992123395624
www is the 'group' the server runs on.
Apparantly my ISP does not allow me to run a chown. (ludicrous) So I
cannot delete these directories via telnet or FTP, they are not 'mine'
in that sense. They are just 'stuck there'. I am able to delete files
with the same settings, but not directories.
perldoc rmdir does nothing. My paper docs tell nothing more than I
already know. The -p switch is disabled (I'm assuming a security
'feature') by the hosts.
This one is a real kick in the seat. Script is delivered tomorrow. :(
CT
------------------------------
Date: 7 Jan 1999 06:26:05 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Re: Delete Directory Paradox??
Message-Id: <771k1t$54n@bgtnsc03.worldnet.att.net>
Out of curiosity, I moved the area where the files are written within my
cgi-bin.. same situation... I can easily delete the files perl created
in a directory perl created but cannot delete the directory itself.
This is nutz 8|
CT
------------------------------
Date: Thu, 7 Jan 1999 07:53:22 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Deleting a line in a HTML File
Message-Id: <ebohlmanF56J8y.AIC@netcom.com>
Yoann Le Corvic <keithd@moss.co.uk> wrote:
: I created a small system that generate an index of file dynamically
: using perl. When a user from the Internet send a request, it's stored,
: and a new line is added in the index. But now, I have another problem. I
: need to remove this line dyna,ically when someone from support reply to
: it.
: I can I remove dynamically a table line from a HTML Document ???
The HTML::Filter module will be very helpful here.
------------------------------
Date: Thu, 07 Jan 1999 04:59:58 GMT
From: Tim Keating <timk@mrbig.home.com>
Subject: Re: Dynamic gifs on the fly
Message-Id: <87lnjf4qzv.fsf@mrbig.home.com>
http://www.dejanews.com
------------------------------
Date: Thu, 07 Jan 1999 04:39:36 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: filename from a filehandle
Message-Id: <cUWk2.178$5P1.8639@nsw.nnrp.telstra.net>
In article <369415E4.9F02B8CF@cardinal.co.nz>,
Kelvin Price <kprice@cardinal.co.nz> writes:
> Martien Verbruggen wrote:
>> anymore. It is perfectly legal to open a file
>> for writing, unlink the file name, and then use the open file handle.
[snip]
> As a system administrator I would consider that a VERY BAD practice. If
> your code goes nuts and fills the unlinked file with garbage, it is
> really difficult to work out what's eating up all the disk space.
>
> To paraphrase a well know footwear manufacturer ... "Don't do it !"
Indeed, but the point wasn't whether or not you should do it, but
whether it was possible. Just as an illustration to why it would be
impossible to get a filename, given an inode.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd. | clothes.
NSW, Australia |
------------------------------
Date: 7 Jan 1999 05:05:18 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: filename from a filehandle
Message-Id: <771fae$qdo$1@news.NERO.NET>
In article <369415E4.9F02B8CF@cardinal.co.nz>,
Kelvin Price <kprice@cardinal.co.nz> wrote:
>As a system administrator I would consider that a VERY BAD practice. If
>your code goes nuts and fills the unlinked file with garbage, it is
>really difficult to work out what's eating up all the disk space.
As a system administrator, I find that it solves certain problems very
well. For example, when processing images I need to create a temporary
file in a certain format if the original input is not already in the
right format. I don't want to have to keep track of whether this file
has been created, and I don't want to have to worry about cleaning it
up later. That's a hole which can result in a temp directory filled
with temporary files.
So,
if( need to convert )
convert original to temp file
open temp file
unlink temp file
else
open original file
read data
process
exit
All code that works with the temp file is located in one place. I don't
worry about accidentally deleting the original file if I mess up a flag
that tells me I shouldn't delete the input file. Clean, simple.
The file goes away when the program exits. There is no disk space to
worry about dissappearing.
------------------------------
Date: Wed, 6 Jan 1999 21:32:50 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: filename from a filehandle
Message-Id: <MPG.10fde6ddd97664b498997e@nntp.hpl.hp.com>
In article <369415E4.9F02B8CF@cardinal.co.nz> on Thu, 07 Jan 1999
15:03:16 +1300, Kelvin Price <kprice@cardinal.co.nz> says...
> Martien Verbruggen wrote:
> > In article <3693E3FD.5771FE15@inez.gsfc.nasa.gov>,
> > Jeff Cieslak <jcieslak@inez.gsfc.nasa.gov> writes:
> > > Is there an easy way to get the filename that is associated with
> > > some (currently open) filehandle? I can get the device and inode
> > > numbers from the 'stat'
Only if the file-system model supports device and inode numbers.
> > No. There is no way at all. In fact, an open file does not have to
> > have a file name at all anymore. It is perfectly legal to open a file
> > for writing, unlink the file name, and then use the open file handle.
Only if the file system allows you to do this. Unix-like systems do;
some others (such as Windows/DOS) don't.
> > Of course, when your program exits, or you close the file, the OS
> > will have no reference to that file's inode anymore, and will
> > clean it up.
>
> As a system administrator I would consider that a VERY BAD practice. If
> your code goes nuts and fills the unlinked file with garbage, it is
> really difficult to work out what's eating up all the disk space.
>
> To paraphrase a well know footwear manufacturer ... "Don't do it !"
Assuming you can do it at all. This is an insufficiently documented
cross-platform portability issue.
--
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: 07 Jan 1999 01:01:18 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: filename from a filehandle
Message-Id: <x7k8yzliz5.fsf@home.sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> In article <369415E4.9F02B8CF@cardinal.co.nz> on Thu, 07 Jan 1999
LR> 15:03:16 +1300, Kelvin Price <kprice@cardinal.co.nz> says...
>> Martien Verbruggen wrote:
>> > In article <3693E3FD.5771FE15@inez.gsfc.nasa.gov>,
>> > Jeff Cieslak <jcieslak@inez.gsfc.nasa.gov> writes:
>> > > Is there an easy way to get the filename that is associated with
>> > > some (currently open) filehandle? I can get the device and inode
>> > > numbers from the 'stat'
LR> Only if the file-system model supports device and inode numbers.
on unix you can use the very powerful program lsof (open source). it
stands for "ls Open Files". it can list ALL open files of all types in
your system and it has flexible filtering rules. unfortunately it can be
slow since it practically slurps in /dev/kmem and its cousins.
i used to to find out the socket name/address of a peer. i had to get
the info from a low level unix socket number with no perl handle. lsof
found out the info based on the process id. very cool.
but i finally worked around that by doing a dup open of the fd and
thereby getting a true perl handle which i can pass to getpeername and
getsockname.
# reopen fd 1 (the accepted socket) as a new perl file handle, so we
# can get the socket name
open( SOCK, ">&1" ) || print "can't dup 1\n" ;
# get the names of this socket and its peer in the server
$sock_name = getsockname( SOCK ) ;
$peer_name = getpeername( SOCK ) ;
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 06 Jan 1999 22:40:15 -0500
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: hardcoding an additional, nonstandard element for @INC at build time
Message-Id: <36942C9F.833FAB3B@erols.com>
Sorry to re-post, but the thread 'Re: Adding a path to the @INC
variable' steered away from my request.
In short, I do not want any programatic, env-based solution to the
problem. I do not want to have to put use lib statements in evcery
script, nor do I want to use PERL5LIB.
I want to know if there is a way to MODIFY THE PERL CODE via a
configuration option when building the perl distribution to add a dir to
@INC.
I mangaged to patch perl.c to do this. I'd like to know if there is a
configurable way, i.e., by messing around with the answers to configure
or one of the config.sh scripts.
--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2
------------------------------
Date: Thu, 07 Jan 1999 00:34:07 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
Subject: Re: Help reading/rewriting file
Message-Id: <3694474F.FD249989@snailgem.org>
Well, what did you try and what problems do you have with it?
jdennis@alldata.net wrote:
> Sorry for the newbie nature of this post, but I am a relative newbie when it
> comes to perl.
>
> I have a file that consists of multiple line HTML records, for lack of a
> better term. Each "record" starts with an <H3> tag on the first line. I
> need to take this file, read it in, remove the html tags, and write it out to
> a flat file, where each field is separated by a pipe sign and each record is
> now on one line.
>
> I can read the file fine, and rewrite it to another file. Where I am having
> trouble is the syntax to strip out the html, and then how to write the multi
> line record to a single line record.
>
> Any help appreciated.
>
> Jamie
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 7 Jan 1999 15:49:08 +0800
From: "Sean Lo" <seanl@tat.com.tw>
Subject: How to access Oracle database on Compaq Unix
Message-Id: <771okg$drh$1@news.seed.net.tw>
Can anyone tell me what is the best way to access Oracle database on Unix
both from Windows 95 and Unix platform? I have used Win32::ODBC provided
by Dave Roth to access Oracle from Windows 95. Is this the best way? How
about to access Oracle from an Unix platform? Any example will be
appreciated. Please send the answer to my email address seanl@tat.com.tw.
Thanks!
Sean
------------------------------
Date: Thu, 07 Jan 1999 01:11:10 -0500
From: "John T. Jarrett" <jjarrett@ecpi.com>
Subject: How to NOT use GOTO
Message-Id: <36944FFE.B29DD828@ecpi.com>
Alright, my eyes are crossed and I can't read no more doc's. Could you
tell me how to get out of this without using goto? Without the goto, it
comes back! (And the problem I am trying to solve is check if a
directory exists and if so exit with a message but if not do all the
real work at &makeit)
############################
sub repsite {
$UserDir =
"\/nfs\/www\/com\/webs\/www.wondertek.com\/htdocs\/$fields{'Username'}\/";
opendir(DIR, $UserDir) || goto &makeit;
print "Content-type: text/html\n\n";
print <<__W2__;
<H1>User Name / Directory Name Taken</H1>
Please press Back on your browser and try a
different User Name.
__W2__
exit;
}
#############################
It works; it is just ugly, no?
Thanks,
John T. Jarrett
jjarrett@ecpi.com
------------------------------
Date: 07 Jan 1999 02:24:54 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: How to NOT use GOTO
Message-Id: <x7hfu3lf3t.fsf@home.sysarch.com>
>>>>> "JTJ" == John T Jarrett <jjarrett@ecpi.com> writes:
JTJ> opendir(DIR, $UserDir) || goto &makeit;
JTJ> print "Content-type: text/html\n\n";
JTJ> print <<__W2__;
JTJ> <H1>User Name / Directory Name Taken</H1>
JTJ> Please press Back on your browser and try a
JTJ> different User Name.
JTJ> __W2__
JTJ> exit;
JTJ> }
i am not sure exactly what you are trying to do but why not a simple if
block on the opendir. you always exit when opendir works, right?
if ( opendir(...) ) {
print html blah
exit;
}
&makeit
this would seem to do the same (assuming your goto doesn't return)
without a goto.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Wed, 6 Jan 1999 17:51:02 -0800
From: "amaring" <no_amaring@jps.net>
Subject: Re: i can't understand a program
Message-Id: <36948887.0@news1.jps.net>
While this is not exactly how I would do this (it never is). Hmm, now that
I look at it, Im not sure I know what it does. But since there are no other
replys, l will give this a try. As Im sure someone will correct my
mistakes.
# $_ equals 112
>$_ = "112"
# This tells it that while "$_" contains "12" then "$_" equals "12".
# I think someone else should answer because I have no clue what
# Im saying here and this pile of code just confuses me. (Which is # very
easy to do) :)
>$_ = $1 while (/(12)/);
# Print the string
>print;
--Can someone else please clear this up.
--Sorry IM wasting your time with my useless message...
Sorry,
Amaring
----------------------------------------
-Remove "No_" from my email -
-when replying----------------------
-------------------
------------------------------
Date: Thu, 07 Jan 1999 05:13:01 GMT
From: jasjeetv@pugmarks.com
Subject: inlclude html in mail thru perl
Message-Id: <771fos$30$1@nnrp1.dejanews.com>
Can we include html part in mails thru perl. Similar to the send page option
used in netscape, where your entire page comes in the mail. Can this be done
in perl or if you could suggest me some other way.
jasjeet
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Thu, 07 Jan 1999 04:36:34 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: line continuation; the switch statement
Message-Id: <36993883.271401104@nntp.ix.netcom.com>
On Thu, 7 Jan 1999 16:40:20 +1300, "Andrew Mayo" <andrew@geac.co.nz>
wrote:
>Also Programming Perl lists the /x flag as 'use extended regular
>expressions' and then doesn't appear to document it further. I assume it
>does something quite different, by the sound of things....
>
It's there. The last paragraph on page 57 of the second edition:
The /x modifier itself needs a little more explanation. It
tells the regular expression parser to ignore whitespace that
is not backslashed or within a character class. You can use
this modifier to break up your regular expression into
(slightly) more readable parts. The # character is also
treated as a metacharacter introducing a comment, just as in
ordinary Perl code. Taken together, these features go a long
way toward making Perl a readable language.
--
Michael M Rubenstein
------------------------------
Date: Thu, 7 Jan 1999 17:05:08 +1300
From: "Andrew Mayo" <andrew@geac.co.nz>
Subject: line noise
Message-Id: <771ca4$e6m$1@news.akl.netlink.net.nz>
May I say, at the risk of adding noise to this group (and for this my
profound apologies) that compared to comp.lang.basic.visual.misc, the
quality and timeliness of the replies I have received as a Perl newbie
posting to this group have been incomparably better than the answers to
questions placed by other newbies on clbv (where I am in the reverse
position, as a grizzled VB veteran - and yes, I do try to help, when I have
time)
Now, given that there are at least as many VB programmers as Perl
programmers, what does this tell us about Open Source?. To me, the message
I'm getting is that I am going to get far better support for Open Source
products than I will for proprietary products. Furthermore, the feedback I
got to a somewhat provocative post on the pros and cons of Perl, as I saw it
in comparison with other languages I've used, was both informed and
restrained.
I infer from this that planning future strategic initiatives around Open
Source products is both feasible and possibly even preferable. My experience
with Microsoft products has been mixed; VB is, in many ways, an excellent
product but the infuriating arrogance of the Microsoft support people has
often sent me home at days end both dispirited and furious. Programming
ceases to be much fun when you are riding on the coattails of a gigantic
monolith that is answerable to no-one; where each release has a set of
arbitrary changes, some of which are improvements and some of which break
your code, but all of which were decided, not by peer review, or a standards
body, but by a group of teenagers.
I further infer that the model of peer group review and support, while it
may in theory provoke religious wars, seems in practice to result in
carefully-reasoned, optimal choices. I say this because the replies I
received contained excellent justifications for the points of view therein.
Certainly, when Perl 6 (or whatever the next release is deemed to be)
emerges, I can be confident that the features therein were debated carefully
by expert developers. Whereas Microsoft don't really use VB much internally,
so they don't have anything like the same pool of resource.
Thanks therefore to all of you who have helped me over the last few days. I
will be advocating Open Source even more enthusiastically as a result of
this.
------------------------------
Date: Thu, 07 Jan 1999 00:09:43 -0500
From: "John T. Jarrett" <jjarrett@ecpi.com>
To: Webmaster <shadow01@shaw.wave.ca>
Subject: Re: Making an include using CGI.pm module
Message-Id: <36944197.B450D2F0@ecpi.com>
I handled this by putting a forward slash in front of everything that might
be a special character:
print FILE "\<\!--\#set var=\"RepName\" value=\"$fields{'Name'}\" --\>\n";
and that handled it for me. That's nothing to do with CGI.pm, either.
John
<!--#echo var="IQ" value="a bloody idiot at Perl but made XSSI
self-replicating pages!" -->
Webmaster wrote:
> I'm trying to have my HTML on the fly generation script to insert the
> following line into the code <!--#include virtual="main.htm" -->. I have
> tried adding an additional line such as
>
> print "<!--#include virtual=\"main.htm\" -->\n";
> however i recieved an error.
>
> I have aslo tried inserting this line as a variable,
> my $main = <!--#include virtual="main.htm" -->;
> Unfortunately that was wrong too.
>
> I have looked on the CGI.pm webpage however was unbale to find the proper
> syntax for this line, could some one please suggest a solution.
>
> Thank you
------------------------------
Date: 7 Jan 1999 07:14:01 GMT
From: "Charles R. Thompson" <design@raincloud-studios.com>
Subject: Not bad page for newbies....
Message-Id: <771mrp$go9@bgtnsc03.worldnet.att.net>
Was just surfing round and found a page that ain't too shabby for
newbie-newbies.
All the basics for Perl5 in reference format on one webpage. This guy
summed up on one page what I spent 50 bucks on a book to learn last
year. :(
http://medoc.informatik.tu-muenchen.de/Perl/tut3/index.html
CT
------------------------------
Date: Thu, 07 Jan 1999 00:22:03 -0500
From: Eugene Sotirescu <eugene@snailgem.org>
To: "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject: Re: PERL and permissions
Message-Id: <3694447B.3CF0B5FB@snailgem.org>
Randal L. Schwartz wrote:
> >>>>> "Eugene" == Eugene Sotirescu <eugene@verticalnet.com> writes:
>
> Eugene> Not all UNICES support suid.
>
> OK, I'll bite. Name one that doesn't support setuid programming.
>
> Unless you meant "setuid scripts". Then I can agree.
Unbite.
You're right.
Ambiguous terseness on my part.
------------------------------
Date: Thu, 07 Jan 1999 06:14:45 GMT
From: holcojh5@REMOVEMEwfu.edu (Heath Holcomb)
Subject: Re: Perl Criticism
Message-Id: <36942d32.181535394@enews.newsguy.com>
On Wed, 06 Jan 1999 18:46:26 GMT, topmind@technologist.com wrote:
>Subject: Perl Criticism
>
>Perl gets a lot of credit for its powerful features. However, there are also
>some major annoyances about it that prevent more widespread and formal
>acceptance. Some say that "fixing" these would dilute its power, but I do not
>fully agree with this. I have put together an evaluation of different language
>features that I think could be used to build a "safer Perl":
>
>http://www.geocities.com/SiliconValley/Lab/6888/langopts.htm
>
I'm not going to bother to pick apart the above document because I'm
sure others will do it for me.
Your understanding of UNIX is flawed, to say the least.
For the record, let me point out that annoyances and lack of formal
acceptance do not equal unsafe. Also, even though this subject has
already been beaten into the ground, the distinction between scripting
and non-scripting languages is meaningless marketing hype. There is no
difference.
>A summary of Perl's bigger problem areas are:
>
>- Unnecessary deviations from the "function rule".
>
This seems like an effort to codify something that is more a matter of
taste than anything else.
>- Parameter and variable scope handling
>
What's your criticism here?
Perl's parameter passing takes a little getting used to, but I see no
real problem with it. As for scoping, Perl has local and my, both of
which are well documented. I also object to your use of the word
"inheritance" in this context.
>- "Leaky" assignment statements
>
Again, a matter of taste. I think most of us would consider this to be
a good thing. What's your problem with UNIX, anyway? Phrase in point:
"notorious UNIX-influenced spaghetti-one-liner assignment statements"
What does the operating system have to do with this? If you're going
to blame something, at least blame something that makes sense, like C.
>- Inter- and intra- statement communication problems (including excessive use
>of "command piping")
>
Using default arguments (which I think is what you mean by "command
piping") is optional. If you think it makes your code hard to read,
then don't do it. The example that you give here makes absolutely no
sense. This leads me to believe, even more than before, that you don't
understand the language well enough to offer an intelligent critique
of it.
>I invite you to look at my criticisms and comment on them, or even pound them
>into the ground if you are having a bad hair day :-)
>
>-tmind-
>
Let me first say that I think informed criticism and debate about
language design is a very good thing. Note the qualifier there. If
you're going to post something like this here, you *really* need to
make sure you've done your homework first.
Heath
--
Heath Holcomb * They don't know what to call it
holcojh5@REMOVEMEwfu.edu * but they all say it's wrong
http://www.wfu.edu/~holcojh5/ * Well, I don't see no greener pastures
delete REMOVEME to email * This must be where I belong
------------------------------
Date: Thu, 07 Jan 1999 05:16:10 GMT
From: Craske_David_J@cat.com
Subject: Re: Please Help!!
Message-Id: <771fup$6j$1@nnrp1.dejanews.com>
>
> Before you can program a CGI application, you really should be at
> least reasonably comfortable with the language you are going to use,
> in this case Perl. Buy a good book on Perl (Programming Perl,
> O'Reilly, some others suggested at http://www.perl.com)
May I suggest a second book? "Teach Yourself CGI Programming with Perl 5" by
Eric Herrmann. When I worked on my Masters Degree, I was required to learn a
new language and construct a web application using it and the proper
techniques. I bought this book and it was a lifesaver. It's written for
novices, but it can be beneficial for the intermediate and advanced
programmers.
December 1997 - received Masters of Arts in Computer Science from the
University of Illinois at Springfield. Concentrations: Software Engineering
Methodologies and Web Page Design / Development. Trust me ... it's a good
book to have in your personal library.
David Craske
-----------------------------------------------------------------------------
-- "Your patronage is my food and drink. Thank you for the bread and water."
- Benny Hill
-----------------------------------------------------------------------------
--
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 7 Jan 1999 07:19:02 GMT
From: sghalay68@aol.com (SGhalay68)
Subject: Rename Files Button
Message-Id: <19990107021902.05849.00009249@ng-fr1.aol.com>
I am looking for a Rename Files Button to post in a form. This button should
allow the users to rename the file names in their hard drives.
I would appreciate it if you can help me.
Please send me an e-mail at sghalay68@aol.com
------------------------------
Date: Thu, 7 Jan 1999 07:51:47 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: Shame: Deleting List Elements
Message-Id: <ebohlmanF56J6B.AGE@netcom.com>
Michael Mongeau <michael_mongeau@stratus.com> wrote:
: Richard Jelinek <rj@suse.de> wrote in message
: news:36938070.534CBB6@suse.de...
: >
: >@list = (1,2,3,4,5);
: >
: >How do I delete element 3? I mean not to clear it, I mean delete. I know
: >shift,pop et al. but I need to delete elements inside a list.
: >
: ><do_some_magic_thing>
: >
: >print join ':',@list;
: >
: >=> 1:2:4:5
: You could use an array slice:
: @list = (1,2,3,4,5);
: @list2 = @list[0..1,3..4]; # list2 now contains 1,2,4,5
We've seen both splice and slice proposed, so let's see how they stack up
on some more realistically-sized lists:
use Benchmark;
my @list = (1..100);
my @list2;
timethese(1000, {
slice=>sub {@list2=@list; @list2 = @list2[0..49,51..99]},
splice=>sub {@list2=@list; splice(@list,50,1)}
});
@list= (1..200);
timethese(1000, {
slice2=>sub {@list2=@list; @list2 = @list2[0..49,51..199]},
splice2=>sub {@list2=@list; splice(@list,50,1)}
});
Benchmark: timing 1000 iterations of slice, splice...
slice: 2 secs ( 1.78 usr 0.02 sys = 1.80 cpu)
splice: 0 secs ( 0.32 usr 0.00 sys = 0.32 cpu)
(warning: too few iterations for a reliable count)
Benchmark: timing 1000 iterations of slice2, splice2...
slice2: 5 secs ( 3.58 usr 0.00 sys = 3.58 cpu)
splice2: 0 secs ( 0.37 usr 0.00 sys = 0.37 cpu)
(warning: too few iterations for a reliable count)
------------------------------
Date: 7 Jan 1999 05:08:45 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: what's with all the job posts?
Message-Id: <771fgt$qim$1@news.NERO.NET>
In article <x7vhijllpl.fsf@home.sysarch.com>,
Uri Guttman <uri@home.sysarch.com> wrote:
Please don't use the acronym CFV in a subject unless you really are
writing and posting a CFV.
------------------------------
Date: 07 Jan 1999 00:14:23 -0500
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: what's with all the job posts?
Message-Id: <x7ogobll5c.fsf@home.sysarch.com>
>>>>> "JS" == John Stanley <stanley@skyking.OCE.ORST.EDU> writes:
JS> In article <x7vhijllpl.fsf@home.sysarch.com>,
JS> Uri Guttman <uri@home.sysarch.com> wrote:
JS> Please don't use the acronym CFV in a subject unless you really are
JS> writing and posting a CFV.
i didn't know that was a rule. i was just trying to get attention to the
idea of a new subgroup.
what would you have used for a subject?
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
Perl Hacker for Hire ---------------------- Perl, Internet, UNIX Consulting
uri@sysarch.com ------------------------------------ http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: 7 Jan 1999 05:25:21 GMT
From: stanley@skyking.OCE.ORST.EDU (John Stanley)
Subject: Re: what's with all the job posts?
Message-Id: <771gg1$qq6$1@news.NERO.NET>
In article <x7ogobll5c.fsf@home.sysarch.com>,
Uri Guttman <uri@home.sysarch.com> wrote:
>i didn't know that was a rule.
It's not, it's just a courtesy to those who want to identify real CFV
and RFD amongst all the other articles.
>what would you have used for a subject?
Subject: Re: what's with all the job posts?
And what IS with all the job posts?
------------------------------
Date: Thu, 07 Jan 1999 16:23:08 +1000
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: Why _cannot_ dmake libwin32 ???
Message-Id: <369452CC.8B3F4D33@spider.herston.uq.edu.au>
Here's an excerpt from a post of mine to the dbi-users mailing list:
3. I had to add
$opts{DEFINE} = "-DWin32_Winsock";
to the Win32 section of Makefile.PL. The SOCKET typedef is needed in
socket.h, which is included from
U:\perl5\lib\MSWin32-x86\CORE/win32.h:290,
from U:\perl5\lib\MSWin32-x86\CORE/config.h:2100,
from U:\perl5\lib\MSWin32-x86\CORE/perl.h:137,
from u:\perl5\site\lib\MSWin32-x86/auto/DBI/DBIXS.h:13,
from ODBC.h:13,
from ODBC.xs:1:
It's defined in the Mingw32 include/Win32/Sockets.h (which is included
from
mysql.h,windows.h) only if Win32_Winsock is defined. It actually is
defined again (and too late) by perl5\lib\MSWin32-x86\CORE/win32.h:26.
This was in the context of building DBI, but it may address your problem
as well. You've got to define Win32_Winsock somehow - putting it in
Makefile.PL is only one way. BTW, it's great that you give so much info
- it was those last few lines of output that rang bells for me.
--
Jaime Metcher
Michael D. Schleif wrote:
>
> I know that there will be some things that I cannot do with Perl
> v5.00502 built under EGCS on NT v4.0.
>
> But, is this a deadend? And, why is `Win32' _not_ part of the
> `stable.zip' source?
>
> Please, what am I doing wrong?
>
<snip>
------------------------------
Date: Thu, 07 Jan 1999 05:45:53 GMT
From: "James Carpenter" <nawkboy@flash.net>
Subject: Re: Writing Perl with Notepad <shameluss plug>
Message-Id: <lSXk2.829$Xb6.1056@news.flash.net>
jamesht wrote in message <3692DE59.D5C052A7@idt.net>...
>Hello,
>
>UltraEdit is fine, but it's got a couple terrible bugs. Ever notice that
the
>scrolling goes haywire when you open a very large file? Also, when you
paste a lot
>of text into it.
>
>And the text-coloring is a nice feature, but it goes nuts with large
javascripts.
>
>I've also seen it crash due to unexplained non-ascii chars.
>
>These are not really big problems, but they're there.
>
>I've tried emacs, but holy christmas, yes, there's a learning curve! -- one
of
>these days...
>
>James
>
The MikTeX (an excellent Windows port of LaTeX) web pages suggest using the
WinEdt editor with MikTeX. I have installed MikTeX and WinEdt on my laptop
and found WinEdt to be the best thing I have ever seen for composing LaTeX
documents. (I wish that a Unix Port existed).
Q: So what's this have to do with Perl?
A: The documention that comes with WinEdt explains that it is customizable
for almost any such application. Once customized for perl and distributed
this way, tremendous goodwill could be spread throughout the earth.
The web page for WinEdt is http://home.istar.ca/~winedt
and the author (Aleksander Simonic) can be reached at winedt@istar.ca or
alex@cs.dal.ca
WinEdt is shareware, but some of the best I have seen.
Additonally, the documentation implies that there would be a precentage of
the sales given to significant contributors.
(The TeX and LaTeX pages can be found at http://www.tug.org)
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4569
**************************************