[8491] in Perl-Users-Digest
Perl-Users Digest, Issue: 2108 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 16 10:17:03 1998
Date: Mon, 16 Mar 98 07:00:45 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 16 Mar 1998 Volume: 8 Number: 2108
Today's topics:
Re: Contents of a file into checkbox's [CGI.pm] <quentin@jihad.amd.com>
Re: Cross product <jdporter@min.net>
Delete Files via Unlink on NT?? Help! <mark@imp.net>
Dictionary? <doug@ccinet.com>
Dynamic updating links (Christopher McNeill)
Re: file age (Greg Bacon)
Re: File::Find and -w (Mike Stok)
Re: globbing vs. opendir / readdir (Kevin B Cohen)
Re: How to double sort a hash of hashes???? <quentin@jihad.amd.com>
Re: Is there a "Newsgroup" for Newbies to Perl? <stackhou@elk.cray.com>
Re: Is there a "Newsgroup" for Newbies to Perl? (I R A Aggie)
Re: Is there a "Newsgroup" for Newbies to Perl? <gwynne@utkux.utk.edu>
Re: Is there a "Newsgroup" for Newbies to Perl? <uri@sysarch.com>
Re: Large programs: is Perl up to it? <jll@skynet.be>
Re: lowercase $lower = lc("aBcDe"); Blows UP!! <barnett@houston.Geco-Prakla.slb.com>
Re: mirror 2.8 on NT <jdf@pobox.com>
Re: Multiple substitues <qdtcall@esb.ericsson.se>
Re: Newbie: stuck in endless loop! <jefpin@bergen.org>
Re: Perl and Windows NT question (Michael Rubenstein)
Perl for Cygwin32 <syring@pollux.edv.agrar.tu-muenchen.de>
perl library <abcdm@wanadoo.fr>
Perl not updating %INC after unsuccessful load. <zamboni@cs.purdue.edu>
Re: Querying number of entries from multiple lines <wkolln@cia.com.au>
redirect stderr and stdout to same file ()
Re: Reference to a part of a hash? <quentin@jihad.amd.com>
Re: Splitting Arrays (Mike Stok)
Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
Re: Tied and blessed? <jll@skynet.be>
Re: Unloading subs? <qdtcall@esb.ericsson.se>
Re: What is PERL? Learn JAVA instead? <techsoft@abcpages.com>
Re: Writing to a socket <qdtcall@esb.ericsson.se>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Mar 1998 08:50:46 -0600
From: Quentin Fennessy <quentin@jihad.amd.com>
Subject: Re: Contents of a file into checkbox's [CGI.pm]
Message-Id: <xim90qad709.fsf@jihad.amd.com>
>>>>> "DIM" == D Ian MacLennan <dimaclen@novice.uwaterloo.ca> writes:
DIM> open (INPUT, $input); # $input is a file name
DIM> $items = <INPUT>;
DIM> @items = split($items, ' ');
split uses its first argument as the pattern on which
to split fields. Try:
@items = split(' ', $items);
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: Mon, 16 Mar 1998 08:44:25 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Cross product
Message-Id: <350D2CB9.464B@min.net>
Jack Applin wrote:
>
> I've written a routine to calculate the cross product of two arrays
> (that is, (a,b) x (c,d) is (ac,ad,bc,bd)).
> I don't like how I've done it.
> Can anybody suggest a snazzier implementation?
> Perhaps something using nested maps could be done.
The nested maps version would look something like this:
sub cross($$) {
map { my $a = $_; map { $a.$_ } @{$_[1]} } @{$_[0]};
}
hth,
John Porter
------------------------------
Date: Mon, 16 Mar 1998 08:48:25 -0500
From: "Mark Polakow" <mark@imp.net>
Subject: Delete Files via Unlink on NT?? Help!
Message-Id: <6ejasr$4a4$1@viper.america.net>
This is a multi-part message in MIME format.
------=_NextPart_000_0064_01BD50B8.48A1A6C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Ok, Im really not a programmer but a low grade haker of other people's =
code... I REALLY need to find out how to delete files and directories =
with Perl. I am using latest perl build on NT IIS4. I have a good file =
upload script running that uses the cgi.pm and cgi.pl but I need to be =
able to delete files and directories too.=20
I have been informed about UNLINK and RMDIR but I have no idea how to =
use them and what it needs. COuld someone PLEASE, PLEASE, send me some =
code and how to use it that will delete a file/directory, I would be so =
appreciative! I have ignorantly tried to use this code and failed:
BEGIN {=20
$overwrite =3D 1;=20
$exclusive_lock =3D 2;=20
$unlock_lock =3D 8;=20
}
$| =3D 1;
&GetInput;
sub GetInput {
use CGI qw(:standard);
$CGI::OS =3D 'WINDOWS';
$query =3D new CGI;
}
{
unlink("c:\inetpub\wwwroot\upload\deleteme.txt");
}
------=_NextPart_000_0064_01BD50B8.48A1A6C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT color=3D#000000 size=3D2>Ok, Im really not a programmer but a =
low grade=20
haker of other people's code... I REALLY need to find out how to =
delete=20
files and directories with Perl. I am using latest perl build on NT =
IIS4. I have=20
a good file upload script running that uses the cgi.pm and cgi.pl but I =
need to=20
be able to delete files and directories too. </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I have been informed about UNLINK =
and RMDIR but=20
I have no idea how to use them and what it needs. COuld someone PLEASE, =
PLEASE,=20
send me some code and how to use it that will delete a file/directory, I =
would=20
be so appreciative! I have ignorantly tried to use this code and=20
failed:</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 =
face=3D"Courier New" size=3D2>
<P>BEGIN { <BR>$overwrite =3D 1; <BR>$exclusive_lock =3D 2; =
<BR>$unlock_lock =3D 8;=20
<BR>}</P>
<P>$| =3D 1;<BR>&GetInput;</P>
<P>sub GetInput {<BR>use CGI qw(:standard);<BR>$CGI::OS =3D =
'WINDOWS';<BR>$query =3D=20
new CGI;<BR>}</P>
<P>{<BR>unlink("c:\inetpub\wwwroot\upload\deleteme.txt");<BR>}<=
/P></FONT></FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_0064_01BD50B8.48A1A6C0--
------------------------------
Date: Mon, 16 Mar 1998 05:07:32 -0800
From: "Doug Evans" <doug@ccinet.com>
Subject: Dictionary?
Message-Id: <350d241d.0@katana.randori.com>
Is there a perl dictionary, somewhwre?
Thanks, Doug
------------------------------
Date: Mon, 16 Mar 1998 13:09:55 GMT
From: cjxm@dcs.ed.ac.uk (Christopher McNeill)
Subject: Dynamic updating links
Message-Id: <Epwxwp.136.0.staffin.dcs.ed.ac.uk@dcs.ed.ac.uk>
I've set up a database on SQL Server with a web interface and I am currently
developing a tool for maintaining the database. Is it possible to use Perl to
automatically insert a new link into the HTML code of the index of tables when a new
table is created. Any help or pointers in the right direction would be greatly
appreciated.
Please e-mail replies.
Thanks a lot,
Chris.
------------------------------
Date: 16 Mar 1998 14:37:40 GMT
From: gbacon@cs.uah.edu (Greg Bacon)
Subject: Re: file age
Message-Id: <6ejdfk$q7k$1@info.uah.edu>
[Posted and mailed]
In article <350CEBA0.D3D74C@fys.ruu.nl>,
Haaino Beljaars <Beljaars@fys.ruu.nl> writes:
: I have a simple problem. I am currently running a system with multiple
: users, the user 'guest' has a disk quota of 10 MB. All files of 'guest'
: must be deleted after 10 days but the files of the other persons must be
: left alone. How do I do that?
As Randal would say, find2perl is your friend. Use find2perl! :-)
% find2perl -user guest -mtime +10 -eval unlink | perl
Hope this helps,
Greg
--
open(G,"|gzip -dc");$_=<<EOF;s/[0-9a-f]+/print G pack("h*",$&)/eg
f1b88000b620f22320303fa2d2e21584ccbcf29c84d2258084
d2ac158c84c4ece4d22d1000118a8d5491000000
EOF
------------------------------
Date: 16 Mar 1998 13:06:55 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: File::Find and -w
Message-Id: <6ej85f$prq@news-central.tiac.net>
In article <87ogz7ah99.fsf@darwin.eeb.uconn.edu>,
Kent E. Holsinger <kent@darwin.eeb.uconn.edu> wrote:
>Uri Guttman's approach, i.e.,
>
> while ( defined($line = <FILE>) ) {
> print "$name:$line" if $line =~ /$pattern/oi;
> }
>
>which doesn't change $_ seems even cleaner to me. Are there any
>disadvantages?
It depends... perl uses $_ as a default in many places. You might
consider:
while (<FILE>) {
print "$name: $_" if /$pattern/oi;
}
to be clean if you understand the implicit use of $_
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 16 Mar 1998 09:54:04 -0500
From: kcohen@julius.ling.ohio-state.edu (Kevin B Cohen)
Subject: Re: globbing vs. opendir / readdir
Message-Id: <6ejeec$q8a@julius.ling.ohio-state.edu>
In article <6eh7m7$jmt@dfw-ixnews10.ix.netcom.com>,
Jeff Yoak <jeff@yoak.com> wrote:
>
>When should one use globbing as against readdir and vice versa?
if you call perl from a visual basic wrap-around, you may have trouble
with glob(), but you won't have trouble with opendir/readdir.
every once in a while i run into trouble with glob() for reasons that
i just can't fathom, but i've never had trouble with opendir/readdir.
glob() is easier to use in that it lets you be more specific about
what sorts of files you want, but i've drifted towards using
opendir/readdir all the time... i guess on the theory that it takes
less time to write some extra code than it does to debug a problem.
kevin
___
if we suppose for the moment that a pizza is a syntactical
structure....
---Nigel Chapman, Perl: The Programmer's Companion
------------------------------
Date: 16 Mar 1998 08:54:48 -0600
From: Quentin Fennessy <quentin@jihad.amd.com>
Subject: Re: How to double sort a hash of hashes????
Message-Id: <xim7m5ud6tj.fsf@jihad.amd.com>
>>>>> "AH" == Aaron Hanson <aahanson@students.uiuc.edu> writes:
Check out perlfaq4 in the section titled:
How do I sort an array by (anything)?
perldoc perlfaq4
This is well answered there.
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: Mon, 16 Mar 1998 08:08:47 -0600
From: Mark P Stackhouse <stackhou@elk.cray.com>
To: Birgitt Funk <birgitt@order.booktraders.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <350D326F.2781@elk.cray.com>
Well said, Birgitt!
Mark
------------------------------
Date: Mon, 16 Mar 1998 09:21:44 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <fl_aggie-1603980921450001@aggie.coaps.fsu.edu>
In article <6ehqlk$o90@newsops.execpc.com>, Mark Stackhouse
<stackhou@execpc.com> wrote:
+ <HTML>
That's it. I've had it. You've posted in html twice that I've seen.
Stop wasting our time. Usenet is a text/plain media...
In the mean time, *plonk*.
James
--
Consulting Minister for Consultants, DNRC
The Bill of Rights is paid in Responsibilities - Jean McGuire
To cure your perl CGI problems, please look at:
<url:http://www.perl.com/CPAN-local/doc/FAQs/cgi/idiots-guide.html>
------------------------------
Date: Mon, 16 Mar 1998 09:28:10 -0500
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <6ejcv5$ak4$1@gaia.ns.utk.edu>
This is a multi-part message in MIME format.
------=_NextPart_000_0088_01BD50BD.D5CC02C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Mark Stackhouse wrote in message=20
And if the newbies won't read the damn FAQ, what makes you think =
they'll=20
read this cookbook of yours?
Because maybe the Cookbook will actually provide links to what one =
is looking for! Today I needed a reference to a rounding function. =
OK... go to the FAQ! Right?=20
FAQ has a question - Does Perl have a round function? All right... =
here we go. Click on the hypertext.=20
Now I'm in Perl Docs... do a text search on the word =
"round"..."Search string not found" OK... search on "function".=20
Mark reinforces my point. At the very least, the FAQ should have a =
more useful search capability. Even the Camel book needs improvement. =
"Round" and "rounding" do not appear in the index. Oh ho, try "integer" =
instead. The Camel book sends the reader to int(), which is of some =
help. I can't comment on the Llama book's treatment of rounding at this =
time, but I suspect it may also suffer from a weak index. Jon Orwont's =
book also suffers from a weak index; however, he provides the answer in =
Chapter 1: $nearest_integer =3D ($number > 0) ? int($number + 0.5) : =
int($number - 0.5). Larry Wall must have decided to leave round(), =
ceil(), and floor() out of Perl as some sort of feature. Those functions =
should be added to the next version of Perl. All of the Perl books that =
I've seen need better indexes.=20
=20
Bob Gwynne
------=_NextPart_000_0088_01BD50BD.D5CC02C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
<DIV>Mark Stackhouse<STACKHOU@EXECPC.COM> wrote in message </DIV>
<BLOCKQUOTE TYPE =3D CITE>
<P>And if the newbies won't read the damn FAQ, what makes you =
think=20
they'll <BR>read this cookbook of yours?</P></BLOCKQUOTE>Because =
maybe the=20
Cookbook will actually provide links to what one is looking =
for! Today=20
I needed a reference to a rounding function. OK... go to the=20
FAQ! Right?=20
<P>FAQ has a question - Does Perl have a round function? All =
right...=20
here we go. Click on the hypertext.=20
<P>Now I'm in Perl Docs... do a text search on the word=20
"round"..."Search string not found" OK... =
search=20
on "function".=20
<P><FONT size=3D2>Mark reinforces my point. At the very least, =
the FAQ=20
should have a more useful search capability. Even the Camel book =
needs=20
improvement. "Round" and "rounding" do not =
appear in the=20
index. Oh ho, try "integer" instead. The Camel book sends =
the=20
reader to int(), which is of some help. I can't comment on the Llama =
book's=20
treatment of rounding at this time, but I suspect it may also suffer =
from a=20
weak index. Jon Orwont's book also suffers from a weak index; =
however, he=20
provides the answer in Chapter 1: $nearest_integer =3D =
($number=20
> 0) ? int($number + 0.5) : int($number - 0.5). Larry Wall =
must=20
have decided to leave round(), ceil(), and floor() out of Perl as =
some sort=20
of feature. Those functions should be added to the next version of=20
Perl. All of the Perl books that I've seen need better =
indexes.=20
</FONT>
<P><FONT size=3D2></FONT> </P>
<P><FONT size=3D2>Bob Gwynne</FONT></P></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0088_01BD50BD.D5CC02C0--
------------------------------
Date: 16 Mar 1998 09:49:29 -0500
From: Uri Guttman <uri@sysarch.com>
To: Birgitt Funk <birgitt@order.booktraders.com>
Subject: Re: Is there a "Newsgroup" for Newbies to Perl?
Message-Id: <x74t0ylmh2.fsf@sysarch.com>
Birgitt Funk <birgitt@order.booktraders.com> writes:
<snip> a long and cogent response.
brigitt,
i like what you wrote. the problem is just what you stated, TOO many
newbies feeding at the expert trough. that is why the gurus long for the
old days when the signal to noise ratio was much higher. and that is why
they (and i want) the moderated group, so they/we can decide whether to
help newbies by reading the misc group or not. some will, some won't but
they have very little choice now. either read hundreds of FAQs for the
couple they want to answer or read a moderated group they know will
interest and chalenge them. i read this group and only when a question
(newbie or not) intrigues me (and i can't say what does) do i
reply. some of the gurus behave this way too. i see some FAQs or dumb
Q's and my eyes roll so bad, i would never answer it. i am sorry and
glad so many are using linux and perl as you have said. i like the
popularity but as i have said many times,
"programming is easier than it seems and harder than it seems"
if only the newbies really understood what that means!
i like helping sometimes and other times i don't. but it is hard wading
through the noise to find those Q i want to answer. the moderated group
would help me with that. i don't know how the filtering would go, but
most of the obvious FAQs would be out, as would the off-topics. and
there would be much more discussion of the language itself and of its
future and such than just
"how do i do it? i am a new webmaster and up to my neck in i don't know
what. it seemed so easy when i got this job so how did i get it anyway?"
again, if the not so newbies helped the newbies, we experts can help
them. i can't and won't answer graduate school questions from grade
school minds. they need basic education (and not just in perl, computer
science, programming, logic, algorithms, etc). you don't just wake up
and become an expert overnight.
i vote for moderated!
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: Mon, 16 Mar 1998 15:20:27 +0100
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: Large programs: is Perl up to it?
Message-Id: <VA.00000079.15e6885e@jll>
In article <350C40FB.916C8204@usa.net>, Sneex wrote:
> But, my point is, now that I am one Perl year older I realize now
> I could have done it in less than 100 lines and much less documentation.
I'm porting a C++ persistence layer I've written to Opal, and indeed I do
much more with lesser typing :) But it's partly due to the fact that I had
to equip C++ with introspection capabilities that are native in Perl.
> So, you see, most of use newbies here cannot imagine what you are
> doing when it gets beyond 2,000 lines; much less 10,000...
<G> I should have said 10,000s lines of equivalent C++ code...
Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy
------------------------------
Date: Mon, 16 Mar 1998 08:12:20 -0600
From: Dave Barnett <barnett@houston.Geco-Prakla.slb.com>
Subject: Re: lowercase $lower = lc("aBcDe"); Blows UP!!
Message-Id: <350D3344.E3031AB0@houston.Geco-Prakla.slb.com>
[posted, with cc to cited author]
Christian@Sur-Tech.com wrote:
>
> Hi All,
> Lost here.. i'm new to perl.. so far most all in the SAMS book on perl-5 has
> worked well.. i have version 5 running on freebsd.. 3.0 122597.. just before
> the vm changes.. well i have built a little cgi that puts together a web page,
> and it seems to work well, i had a line in there like so:
> $sub = substr ($string,0,3);
>
Okay.
> but i also wanted to make sure a string was lower case
> before i ran some comparisons,
Check out the '/i' option of the match/search&replace operator(s). That
'i'gnores case.
>so i tried $sub = lc (substr ($string,0,3));
> then the page did a crash/burn..
Anything useful in your system error logs for your web server
software???
> tried several different ways of putting
> in "" marks etc.. finally tried a basic line like
> $lower = lc("aBcDe");
$lower = lc("aBcDe");
print $lower;
spits out "abcde" for me.
> this line is directly out of the book!! and if i put it anyplace in my prog,
> it blows up!?.. error output just trying to run the prog looks like below..
>
> "lc" may clash with future reserved word at ././item line 35syntax error in
> file ././item at line 35
> , next 2 tokens "lc("
>
Sounds like there is something else wrong with your code.
Try this:
#!/usr/local/bin/perl -w
#
$lower = lc("aBcDe");
print $lower;
__END__
That should generate 'abcde' followed immediately by your normal prompt.
> this will happen anyplace!! i can put this line in after i setup variable some
> variable defaults at top of prog, before i really get into anything, and it will
> do the crash/burn.. my guess is that there is some typo in the book?? or that
> the syntax has changed??
>
> Can anybody send me the "Right" way to set a string to lower case??
>
perldoc -f lc states:
=item lc EXPR
=item lc
Returns an lowercased version of EXPR. This is the internal function
implementing the \L escape in double-quoted strings.
Respects current LC_CTYPE locale if C<use locale> in force. See
L<perllocale>.
If EXPR is omitted, uses $_.
> Thanks, Christian Christian@Sur-Tech.com 1925 Grant St #4
> Sur-Tech / Ami-Tech (408) 496-6348 Xt 247 Santa Clara CA 95050
> www.Sur-Tech.com
If none of the above (especially the above program) helps, how about a
code snippet that displays the symptoms you describe. Infintely easier
to help troubleshoot when we have the surrounding code, also. :-)
HTH.
Dave
--
"Security through obscurity is no security at all."
-comp.lang.perl.misc newsgroup posting
------------------------------------------------------------------------
* Dave Barnett U.S.: barnett@houston.Geco-Prakla.slb.com *
* DAPD Software Support Eng U.K.: barnett@gatwick.Geco-Prakla.slb.com *
------------------------------------------------------------------------
------------------------------
Date: 16 Mar 1998 09:48:08 -0500
From: Jonathan Feinberg <jdf@pobox.com>
Subject: Re: mirror 2.8 on NT
Message-Id: <3egielp3.fsf@news.concentric.net>
"Martin Vorlaender" <mv@pdv-systeme.de> writes:
> Unfortunately, mirror relies heavily on alarm()s, which aren't
> implemented in my version of perl. Do I have to reinvent the
> mirroring wheel, or is there a simple (or even not so simple)
> solution?
I compiled Perl5.004 myself using the Cygwin tools, and the following
code works perfectly for me.
#!/usr/bin/perl -w
$SIG{ALRM} = sub { die "hooray\n" };
alarm 3;
while (1) {}
The Cygwin perl is also significantly faster than the GSAR port
(though when I need Tk or other modules that need a lot of tweaking to
work on Win32 , I very happily use the GSAR port).
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: 16 Mar 1998 15:55:02 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Multiple substitues
Message-Id: <isogz67kjd.fsf@godzilla.kiere.ericsson.se>
dfrench@aig.vialink.com writes:
> I would like to perform multiple substitues on a single line. For instance
> using "sed" the I can do the following:
>
> sed -e "s/A/a/g;s/B/b/g;s/C/c/g" filename
Using perl, you can do this:
perl -pe "s/A/a/g;s/B/b/g;s/C/c/g" filename
> The content of the substitutes above were just an example, but I
> would like to do the same kind of thing in perl. I would like to do
> multiple substitues in a single command, somthing like:
>
> $result = s/A/a/ && s/B/b/ && s/C/c/;
That doesn't do what I think you think it does. $result will end up
containing the (boolean) result from the &&-operators. If you want to
do three substitutions, do three substitutions:
$result =~ s/A/a/g;
$result =~ s/B/b/g;
$result =~ s/C/c/g;
...unless you really are substituting one-letter strings, in which
case tr/// does the job better.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Fri, 13 Mar 1998 22:50:42 -0500
From: "I have a life, and I can prove it!" <jefpin@bergen.org>
To: Mark P Stackhouse <stackhou@elk.cray.com>
Subject: Re: Newbie: stuck in endless loop!
Message-Id: <Pine.SGI.3.95.980313224913.8998B-100000@vangogh.bergen.org>
>if ($which_end ne /source/ || $which_end ne /destination/)
This appears to be a mix between a regex and an equality check... and you
use an OR check instead of an AND check...:
if ($which_end ne "source" && $which_end ne "destination")
or even:
if ($which_end !~ /^(source|destination)$/i)
:)
--
| No wombats were involved.
| - Monty Python
Jeff Pinyan | http://users.bergen.org/~jefpin | jefpin@bergen.org
techmaster@bergen.org | techmaster@mindless.com
qw[jeff] on #perl,#javascript,#cgi on IRC
&jp('"($``','','$)EDF8```','$*52J4```','$+E1G4```','#J``@','#2__`');sub
jp{for$w(@_){$c=unpack('B48',unpack('u',$w));$c=~tr/10/# /;print "$c\n"}}
------------------------------
Date: Mon, 16 Mar 1998 14:13:20 GMT
From: miker3@ix.netcom.com (Michael Rubenstein)
Subject: Re: Perl and Windows NT question
Message-Id: <350e301d.35248214@nntp.ix.netcom.com>
On Sun, 15 Mar 1998 16:47:14 -0500, "Eric Smith" <ecs@talstar.com>
wrote:
>A week ago I installed the lastest version of ActiveStates Perl on my NT
>machine. I set up up the registry and all that good stuff. I placed my perl
>scripts in the scripts directory. Called them from the browser and they
>worked beutifully. A couple days ago my boss gave me the latest tech-net cd
>with the NT Option Pack 4 on it. I installed it and now I'm geting an error
>when I run my scripts from the browser. They still work perfectly from the
>DOS prompt but I get the following error in the browser window:
>
>
>
>Cgi Error
>
>The specified CGI application misbehaved by not returning a complete set of
>HTTP headers. The headers it did return are:
>
>Can't open perl script
>"??????????????????????????????1??????????????E??????????????????????E??????
>?????????????c??c"; Invalid argument.
>
>
>I have messed around with the Server config in the Management Console, but
>nothing major. I know I've got all the newline characters correct and all
>that. In fact I went to a site that had a test script on it and got the same
>error. I'm not an Internet Information Server guru so I really don't know
>what to do. When I first installed NT it put a version of IIS on the machine
>called Peer Web Services. When I put the NT Option Pack 4 on it changed that
>to Personal Web Server and put a cheesy homepage builder on my machine.
>
>Any help is appreciated. Thanks in advance.
This is a "feature" of the Option Pack installation. In the IIS
manager, right click on the directory that contains your scripts
(usually scripts or cgi-bin). Select properites. About half way down
you'll see a button "Configuration". It may be grayed out; if so,
just click on the "Create" button above it first. You don't need to
put anything in the "Name" box.
You'll probably see an entry for perl (usually with extension .pl).
Select it and click on "Edit". It'll probably contain something like
C:\PERL\BIN\PERL.EXE "%S" "%S"
Change the capital S's to lower case.
If you don't have an entry for perl, click on "Add" and put one in.
However, I believe you must have one or you'd get a different error.
The problem is that the installation carries over your configuration
for running CGI scripts, but converts to upper case even though the
entry is case sensitive.
--
Michael M Rubenstein
------------------------------
Date: Mon, 16 Mar 1998 14:03:22 +0100
From: Karl Martin Syring <syring@pollux.edv.agrar.tu-muenchen.de>
Subject: Perl for Cygwin32
Message-Id: <350D231A.2E61@pollux.edv.agrar.tu-muenchen.de>
The Perl for Win32 FAQ, for example at
http://www.perl.com/CPAN-local/doc/FAQs/nt/Perl_for_Win32_FAQ_1.html
lists my site for a Cygwin32 (aka gnu-win32)version of the Perl
binaries. This site is not longer active, but it seems to be very
difficult to remove it from the FAQ as, numerous copies are floating
through the net.
For a replacement site look at
http://www.qub.com/group/
where you will find a recent version of a cygwin Perl with dynamic
loading.
Regards
Karl
Munich University of Technology
------------------------------
Date: 16 Mar 1998 14:18:59 GMT
From: "Vos nom et prinom" <abcdm@wanadoo.fr>
Subject: perl library
Message-Id: <01bd50e6$e8c0ede0$8894fcc1@abcdm>
HELLO
We are interested in Perl software which works on PC/Windows95? Where could
we load it via Net?We have not seen it in uunet or osu-cis.
Thank you very much
DUTOIT
In French:
Bonjour,
Je me permets encore de vous solliciter car nous cherchons ` tilicharger un
script Perl (version 4 ou 5) fonctionnant sous Windows 95. Nous ne trouvons
pas ce logiciel chez uunet ou osu-cis.Pourriez-vous nous indiquer oy l'on
pourrait le trouver?
Merci
Cordialement
DUTOIT
------------------------------
Date: 16 Mar 1998 09:34:50 -0500
From: Diego Zamboni <zamboni@cs.purdue.edu>
Subject: Perl not updating %INC after unsuccessful load.
Message-Id: <fw67lewvp1.fsf@narnia.cs.purdue.edu>
Hi,
I'm using perl 5.004_03, and I have run across the following problem:
In one of my programs, I'm doing something like this:
eval "require $classpath; import $class";
Which works ok most of the time. Context for my problem is: under some
circumstances, the $classpath file will be present, but a file loaded
by it will not be. I am handling the case adequately, then fetching
the missing file, and executing the above again.
The problem is that when the initial require for $classpath fails, Perl
updates %INC nonetheless. Then, after I get the missing file, when I
do the require for $classpath again, Perl consults %INC and decides not
to read the file again.
I am currently dealing with the problem by manually deleting the
corresponding %INC entry when the load fails. However, I think that
Perl should do that automatically.
Is this a known problem?
Thank you for any comments.
--Diego
------------------------------
Date: Tue, 17 Mar 1998 00:58:54 +1100
From: William Kolln <wkolln@cia.com.au>
Subject: Re: Querying number of entries from multiple lines
Message-Id: <350D301E.F21C8BA6@cia.com.au>
This is a multi-part message in MIME format.
--------------B0DD50F8D17278635A0E0B18
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
Hi can anyone assist....and before anyone of you goes off the deep end
about asking a question like this, i have been to FAQs and most of the
CPAN is being re-constructed..... I also have CGI/Perl Cookbook by Matt
Wright, Instant Web Scripts by
Selena Sol, and Perl CGI programming by Erik Strom and am unable to find
a reference on how to do this in any of these books. So I have looked
before coming here.
I am re-writing a webstore script by Barry Robinson all of which works
perfectly well on my site and am now seeking to enhance it. (for UNIX)
The code below produces results in a shopping cart on the scalars listed
and performs various calculations for other scalars.
Where you see
###############Packaging Row ......
I am trying to get the program to read each of the $group values that
are listed and then determine that if 'cd' is the only value from the
list, then the packaging will be a value of .07.
On the other hand if there is any other $group value such as
'lp','blp','12' etc the packaging output must be .3
However, as this script stands, it will only read the last value in the
list, so that if 'cd' is the last value then it produces an outcome of
'.07' even though there might be an lp included above it in the list.
Does the list of $group values have to be declared as an array@ then
broken apart etc. or is there another way of reading
these values that I am missing. My references don't assist in this
matter.
Hope someone can assist....and please forgive the coding....it works
well but does not copy from text editor into html-based
editor well.
Thanks in advance
> for ($i=1;$i<$SIZE;$i++) {
> $_=$LINES[$i];
> ($itemname, $itemprice, $itemquant, $weight, $itemid, $itemdescrip, $group) = split(/\|/,$_);
> $tmpprice = ($itemprice*$itemquant);
> $tmpprice = int($tmpprice * (10 ** 2) + .5) / (10 ** 2);
>
> $totalprice += $tmpprice;
> $totalquant += $itemquant;
> $totalweight = ($weight*$itemquant) + $totalweight;
> print ""; ####End of header row
>
> ##############################
> ###### List items begins here
> ##############################
>
> if ($useid eq '1') {
> print "$itemid ";
> }
>
> print "$group $itemname$itemdescrip\$ $itemprice\$ $tmpprice\n";
> }
>
> ################# Packaging Row:
> if ($useid eq '1') {
> print "Packaging:";
> }
> $cdmailer = '.07';
> $lpmailer = '0.3';
> if ($group eq 'cd') {
> print "Mailer:$cdmailer";
> }
> else {
> print "Mailer:$lpmailer";
> }
>
--------------B0DD50F8D17278635A0E0B18
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for William L Kolln
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: William L Kolln
n: Kolln;William L
org: UNsound Records www.unsound.com.au
adr: 273 Mowbray Road;;Chatswood;Sydney;NSW;2067;Australia
email;internet: wkolln@cia.com.au
tel;work: 02 9413 3730
tel;fax: 02 9413 3730
tel;home: 02 0413 3730
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
end: vcard
--------------B0DD50F8D17278635A0E0B18--
------------------------------
Date: 16 Mar 1998 12:52:16 GMT
From: ruth@utdallas.edu ()
Subject: redirect stderr and stdout to same file
Message-Id: <6ej7a0$nug$1@news.utdallas.edu>
Hi,
I'm running a perl script which calls several other perl scripts and other programs
(written in C COBOL or whatnot).(this is for NT 4.0 machine).
I want to redirect all STDOUT and STDERR to the same log file, to appear in the "right"
order.
I've tried
#! .../perl
$| = 1 ; # for flushing the buffers
open (STDOUT , ">> $filename");
open (STDERR, ">> $filename");
.
.
.
and it does not work - the stderr output of C programs come always before all the other
output (stderr and stdout of the perl and stdout of C).
Any ideas?
TIA , Doron Veeder (doronve@amdocs.com)
------------------------------
Date: 16 Mar 1998 08:46:25 -0600
From: Quentin Fennessy <quentin@jihad.amd.com>
Subject: Re: Reference to a part of a hash?
Message-Id: <ximafaqd77i.fsf@jihad.amd.com>
>>>>> "JG" == John Goerzen <jgoerzen@southwind.net> writes:
JG> Hi, I am wanting to create a reference to an entity in a
JG> hash... For instance...
JG> %hash = ('asdf' => 'qwerty');
JG> $ref = \{$hash{asdf}};
So close! How about
$ref = \$hash{asdf};
And in the debugger (perl -d is your friend):
DB<9> %hash = ('asdf' => 'qwerty');
DB<10> $rh = \$hash{asdf}
DB<11> X rh
$rh = SCALAR(0xb2394)
-> 'qwerty'
DB<12> print ref $rh
SCALAR
Here is how not to, and how to dereference:
DB<13> print $rh
SCALAR(0xb2394)
DB<14> print $$rh
qwerty
--
Quentin Fennessy AMD, Austin Texas
------------------------------
Date: 16 Mar 1998 14:01:21 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: Splitting Arrays
Message-Id: <6ejbbh$sb4@news-central.tiac.net>
These questions are covered in the better introductory books about perl.
In article <6ei4lk$6uo@bgtnsc03.worldnet.att.net>,
Jesse Rosenberger <jesse@savalas.com> wrote:
>Question #1: I have a array named @arr, that has 4 numbers in
>it...numbers differ every time with a number 1-4...but they look like "4
>3 2 1", how can I split this array into 4 seperate variables......i.e. I
>have an array: @arr = "3 4 2 1", I want $anum to equal 3, $bnum to equal
>4, $cnum to equal 2, and $dnum to equal 1. I know it's pretty easy and
>I used to know how to do it but I seem to have forgotten after not doing
>it for a while.
If you mean
@arr = (4, 3, 2, 1);
then you might say
($anum, $bnum, $cnum, $dnum) = @arr;
to assign the first 4 elements to $anum etc.
>Question #2: How can you take a variable that contains a word....that
>may contain spaces...and break each letter into a seperate
>variable...the word may be any length, but will probably not contain any
>characters besides letters, and spaces (let's assume it won't) how could
>I go about doing this?
You can split the variable into a list of characters like this:
@char = split //, $var;
which will leave $char[0] as the first character of the string, $char[1]
as the second etc.
Please consider reading the list of frequently asked questions which can
be found at http://www.perl.com and maybe refreshing your memory by
scanning some introductory book - it'll save you time in the long run.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: 16 Mar 1998 14:42:52 GMT
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <6ejdpc$q7k$2@info.uah.edu>
Following is a summary of articles spanning a 7 day period,
beginning at 09 Mar 1998 14:27:57 GMT and ending at
16 Mar 1998 09:37:11 GMT.
Notes
=====
- A line in the body of a post is considered to be original if it
does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
- All text after the last cut line (/^-- $/) in the body is
considered to be the author's signature.
- The scanner prefers the Reply-To: header over the From: header
in determining the "real" e-mail address and name.
- Original Content Rating (OCR) is the ratio of the original content
volume to the total body volume.
- Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
Excluded Posters
================
perlfaq-suggestions\@mox\.perl\.com
Totals
======
Posters: 572
Articles: 1376 (487 with cutlined signatures)
Threads: 461
Volume generated: 2296.6 kb
- headers: 935.5 kb (18,979 lines)
- bodies: 1258.7 kb (38,801 lines)
- original: 856.2 kb (28,341 lines)
- signatures: 101.1 kb (1,942 lines)
Original Content Rating: 0.680
Averages
========
Posts per poster: 2.4
median: 1.0 post
mode: 1 post - 373 posters
s: 4.4 posts
Posts per thread: 3.0
median: 2 posts
mode: 1 post - 155 threads
s: 4.0 posts
Message size: 1709.1 bytes
- header: 696.2 bytes (13.8 lines)
- body: 936.7 bytes (28.2 lines)
- original: 637.1 bytes (20.6 lines)
- signature: 75.2 bytes (1.4 lines)
Top 10 Posters by Number of Posts
=================================
(kb) (kb) (kb) (kb)
Posts Volume ( hdr/ body/ orig) Address
----- -------------------------- -------
58 105.7 ( 46.9/ 58.8/ 30.7) sneaker@earthling.net
29 37.7 ( 19.2/ 18.5/ 9.9) jdporter@min.net
28 36.4 ( 17.2/ 17.6/ 12.3) Jonathan Feinberg <jdf@pobox.com>
26 55.2 ( 17.3/ 29.9/ 15.3) Uri Guttman <uri@sysarch.com>
24 53.9 ( 20.2/ 30.8/ 13.6) abigail@fnx.com
23 39.7 ( 18.1/ 15.4/ 7.5) rjk@coos.dartmouth.edu
22 40.6 ( 14.2/ 26.4/ 17.5) cberry@cinenet.net (Craig Berry)
21 33.0 ( 13.9/ 14.6/ 14.3) fl_aggie@thepentagon.com (I R A Aggie)
21 31.6 ( 11.8/ 19.4/ 14.4) aml@world.std.com (Andrew M. Langmead)
20 40.7 ( 11.6/ 22.9/ 15.6) mike@stok.co.uk (Mike Stok)
These posters accounted for 19.8% of all articles.
Top 10 Posters by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Address
-------------------------- ----- -------
105.7 ( 46.9/ 58.8/ 30.7) 58 sneaker@earthling.net
55.2 ( 17.3/ 29.9/ 15.3) 26 Uri Guttman <uri@sysarch.com>
53.9 ( 20.2/ 30.8/ 13.6) 24 abigail@fnx.com
40.7 ( 11.6/ 22.9/ 15.6) 20 mike@stok.co.uk (Mike Stok)
40.6 ( 14.2/ 26.4/ 17.5) 22 cberry@cinenet.net (Craig Berry)
39.7 ( 18.1/ 15.4/ 7.5) 23 rjk@coos.dartmouth.edu
37.7 ( 19.2/ 18.5/ 9.9) 29 jdporter@min.net
36.4 ( 17.2/ 17.6/ 12.3) 28 Jonathan Feinberg <jdf@pobox.com>
33.9 ( 10.2/ 18.8/ 11.5) 13 Randal Schwartz <merlyn@stonehenge.com>
33.0 ( 13.9/ 14.6/ 14.3) 21 fl_aggie@thepentagon.com (I R A Aggie)
These posters accounted for 20.8% of the total volume.
Top 10 Posters by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.977 ( 14.3 / 14.6) 21 fl_aggie@thepentagon.com (I R A Aggie)
0.959 ( 7.8 / 8.2) 6 "Eric D. Friedman" <friedman@uci.edu>
0.957 ( 3.0 / 3.1) 6 jll@skynet.be
0.917 ( 6.0 / 6.5) 9 Quentin Fennessy <quentin@jihad.amd.com>
0.883 ( 4.5 / 5.1) 6 Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
0.880 ( 11.9 / 13.6) 8 Greg Bacon <gbacon@cs.uah.edu>
0.818 ( 5.6 / 6.9) 8 news@NOSPAMgb-design.com (Bjorn Malmberg)
0.818 ( 10.6 / 13.0) 12 tchrist@mox.perl.com (Tom Christiansen)
0.798 ( 8.7 / 10.9) 9 linberg@literacy.upenn.edu (Steve Linberg)
0.789 ( 3.8 / 4.8) 6 scott@softbase.com
Bottom 10 Posters by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Address
----- -------------- ----- -------
0.506 ( 2.9 / 5.6) 6 Nick Halloway <snowe@rain.org>
0.496 ( 3.1 / 6.2) 6 harrison@pixi.com
0.494 ( 4.1 / 8.3) 17 Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
0.487 ( 3.9 / 8.0) 9 chip@pobox.com
0.485 ( 7.5 / 15.4) 23 rjk@coos.dartmouth.edu
0.440 ( 13.6 / 30.8) 24 abigail@fnx.com
0.408 ( 4.2 / 10.4) 7 mikeh@minivend.com (Mike Heins)
0.388 ( 2.8 / 7.2) 5 Grahame S Cooper <G.S.Cooper@iti.salford.ac.uk>
0.271 ( 1.6 / 5.8) 5 edwardj@webpromote.com
0.199 ( 0.7 / 3.5) 5 spinboll@hotmail.com
Top 10 Threads by Number of Posts
=================================
Posts Subject
----- -------
51 Is there a "Newsgroup" for Newbies to Perl?
30 Speed of sort routine vs. one-by-one compare (123)
29 c.l.p.mod and TPI
29 Problem with "goto" in Perl
19 Are There Any Snazzy Perl Editors for Windows?
19 Perl4 vs Perl 5
17 User-interface Quandary
16 Help sought with web programming security problem
16 splice -- useful uses?
12 You have 1 message(s) - how to print plurals?
These threads accounted for 17.3% of all articles.
Top 10 Threads by Volume
========================
(kb) (kb) (kb) (kb)
Volume ( hdr/ body/ orig) Posts Subject
-------------------------- ----- -------
134.3 ( 37.4/ 91.6/ 55.8) 51 Is there a "Newsgroup" for Newbies to Perl?
77.3 ( 26.7/ 46.5/ 23.8) 30 Speed of sort routine vs. one-by-one compare (123)
56.9 ( 22.1/ 32.4/ 21.6) 29 Problem with "goto" in Perl
56.8 ( 23.1/ 30.6/ 18.0) 29 c.l.p.mod and TPI
34.3 ( 13.7/ 19.7/ 13.5) 19 Perl4 vs Perl 5
31.5 ( 10.8/ 18.3/ 9.3) 16 splice -- useful uses?
31.2 ( 8.9/ 21.7/ 14.3) 12 You have 1 message(s) - how to print plurals?
30.0 ( 13.0/ 15.8/ 8.4) 19 Are There Any Snazzy Perl Editors for Windows?
29.0 ( 14.4/ 14.1/ 6.4) 16 Help sought with web programming security problem
27.3 ( 12.8/ 13.0/ 9.7) 17 User-interface Quandary
These threads accounted for 22.1% of the total volume.
Top 10 Threads by OCR (minimum of five posts)
==============================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.880 ( 2.1/ 2.4) 5 Does anybody know how to do ftp in perl?
0.878 ( 7.3/ 8.4) 5 Printing Hash of Hashes Problem
0.870 ( 3.7/ 4.3) 6 Contents of a file into checkbox's [CGI.pm]
0.855 ( 9.9/ 11.5) 7 mkdir() and umask
0.849 ( 5.2/ 6.1) 5 NT option pack 4
0.840 ( 4.5/ 5.3) 5 ? on http://www.perl.com/CPAN-local/doc/FMTEYEWTK/sort.html --- Sorting ?
0.835 ( 6.2/ 7.4) 9 How do I rename a file using perl
0.831 ( 9.2/ 11.1) 10 Tom, grow up [Re: The -w switch (was Re: better way to do this?)]
0.813 ( 4.6/ 5.6) 6 Perl Hash question
0.806 ( 2.6/ 3.2) 6 Where can I get the PERL for Windows NT and 95?
Bottom 10 Threads by OCR (minimum of five posts)
=================================================
(kb) (kb)
OCR orig / body Posts Subject
----- -------------- ----- -------
0.524 ( 2.2 / 4.2) 6 Can't find "from" and "subject"
0.524 ( 3.2 / 6.0) 8 array question
0.511 ( 23.8 / 46.5) 30 Speed of sort routine vs. one-by-one compare (123)
0.507 ( 9.3 / 18.3) 16 splice -- useful uses?
0.492 ( 2.0 / 4.0) 6 ls -l to an array and pull 3 columns on data
0.470 ( 2.2 / 4.7) 5 Weak references?
0.453 ( 6.4 / 14.1) 16 Help sought with web programming security problem
0.449 ( 2.2 / 5.0) 6 "newbie" problem with "reverse"
0.363 ( 2.0 / 5.5) 5 The -w switch (was Re: better way to do this?)
0.346 ( 3.7 / 10.6) 8 Redirecting to a script on another server.
Top 10 Targets for Crossposts
=============================
Articles Newsgroup
-------- ---------
21 news.groups
20 comp.lang.perl.modules
17 comp.lang.java.programmer
17 rec.games.trading-cards.magic.misc
16 comp.lang.javascript
12 comp.programming
7 comp.lang.perl
5 comp.lang.perl.tk
4 comp.infosystems.www.servers.ms-windows
3 comp.infosystems.www.authoring.html
Top 10 Crossposters
===================
Articles Address
-------- -------
17 wdl@isporg.com
12 "Manfred Schneider" <manfred.schneider@rhein-neckar.de>
9 sneaker@earthling.net
7 Zenin <zenin@archive.rhps.org>
6 jkent@sympatico.ca
5 Fabrizio Pivari <pivari@geocities.com>
5 dank@alumnae.caltech.edu (Daniel R. Kegel)
4 ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
3 pudge@pobox.com (Chris Nandor)
3 ken@elsop.com
------------------------------
Date: Mon, 16 Mar 1998 15:20:06 +0100
From: Jean-Louis Leroy <jll@skynet.be>
Subject: Re: Tied and blessed?
Message-Id: <VA.00000078.15e6367d@jll>
In article <6egfoi$a1c$1@aginor.webplanets.com>, Andy Tompkins wrote:
> Well, try JUST letting it go out of scope?
That's what my example does.
Jean-Louis Leroy
http://ourworld.compuserve.com/homepages/jl_leroy
------------------------------
Date: 16 Mar 1998 15:44:00 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Unloading subs?
Message-Id: <ispvjm7l1r.fsf@godzilla.kiere.ericsson.se>
Jean-Louis Leroy <jll@skynet.be> writes:
> Ok, Perl allows me to AUTOLOAD code on demand. Is there a way to unload
> the code (and reclaim memory) when it's not needed any longer?
No.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
Date: Mon, 16 Mar 1998 09:54:13 -0800
From: "Alex K" <techsoft@abcpages.com>
Subject: Re: What is PERL? Learn JAVA instead?
Message-Id: <350d3da5.0@lightning.ica.net>
in Russian it would be "YAVA" ;)
John Porter wrote in message <3509423E.BE@min.net>...
>The word is Spanish. "Java" in Spanish is pronounced
>"Hava", and is a reference to the famous Jewish dance.
>It is rumored that the name is a secret reference to
>a cabal of Sephardic scholars in Spain, contemporaries
>of Blaise Pascal. Apparently these scholars had
>developed a rudimentary algorithmic symbolic language.
>(Wasn't Lord Byron a closet Jew?)
>
>John Porter
------------------------------
Date: 16 Mar 1998 15:41:53 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Writing to a socket
Message-Id: <isra427l5a.fsf@godzilla.kiere.ericsson.se>
Mike McMillan <mmcm@swbell.net> writes:
> How can I implement something like the writeBytes method in Perl?
1) Figure out what the writeBytes method does.
2) Implement the same functionality in Perl.
> I've tried syswrite, write, print and none of them work.
Tell the magic pixie to turn your computer back into plastic, metals
and silicon. Neither syswrite, write nor print is supported on
all-cheese platforms.
Free hint: It's easier to answer if you say what goes wrong.
--
Calle Dybedahl, UNIX Sysadmin
qdtcall@esavionics.se http://www.lysator.liu.se/~calle/
------------------------------
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 2108
**************************************