[16899] in Perl-Users-Digest
Perl-Users Digest, Issue: 4311 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Sep 13 11:05:28 2000
Date: Wed, 13 Sep 2000 08: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: <968857510-v9-i4311@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 13 Sep 2000 Volume: 9 Number: 4311
Today's topics:
Re: Aliasing refs <philipg@atl.mediaone.net>
CGIEMAIL - attachment <ask@titanex.ch>
Re: CGIEMAIL - attachment <flavell@mail.cern.ch>
Re: Change Windows Desktop BG <jluongonospam@draper.com>
Changing the filename for reporting compile errors <thomharp@flash.net>
Character Class in Regex - Despecify What? <e.roselli@volusoft.com>
Re: Character Class in Regex - Despecify What? (Andrew J. Perrin)
Re: Count of items is EXCEPTION not RULE (was Re: Littl (brian d foy)
Re: email form script (Walter Pienciak)
Finding subdirectories on Windows Systems <FX@hasnomail.com>
Re: Finding subdirectories on Windows Systems <thunderbear@bigfoot.com>
getting milliseconds... tohann@my-deja.com
Re: getting milliseconds... <aqumsieh@hyperchip.com>
Help needed on Win32::Pipe.pm <Nagaraj.Ashok@de.bosch.com>
Help with scope and module <pbarone@harris.com>
Re: how to remove unprintable chars with Perl script <red_orc@my-deja.com>
Inserting into arrays tasher1234@my-deja.com
Re: Inserting into arrays (Andrew J. Perrin)
Re: Is there a more elegant way? <aqumsieh@hyperchip.com>
Re: killfiles? scores? I wish I had these luxuries <flavell@mail.cern.ch>
need help on Win32::Pipe <Nagaraj.Ashok@de.bosch.com>
Re: Qualifications for new Perl programmer????? <russ_jones@rac.ray.com>
Re: Qualifications for new Perl programmer????? <godzilla@stomp.stomp.tokyo>
Re: Qualifications for new Perl programmer????? <godzilla@stomp.stomp.tokyo>
Re: returning a tied variable <thomharp@flash.net>
Re: returning a tied variable <thomharp@flash.net>
Re: Simple newbie question <aqumsieh@hyperchip.com>
Strange characters when using forms ^M <tom@hughesmedia.co.uk>
Re: String compression <jeffp@crusoe.net>
Re: String compression <jeffp@crusoe.net>
Re: Unix Info <philipg@atl.mediaone.net>
Re: Unix Info scarey_man@my-deja.com
Re: Unix Info <Cheng3@email.msn.com>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 13 Sep 2000 13:40:34 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: Aliasing refs
Message-Id: <mtLv5.2813$IV1.876264@typhoon.southeast.rr.com>
jason <elephant@squirrelgroup.com> wrote in message
news:MPG.1429a731590bd4869897a5@localhost...
[snip]
> >should just be
> >
> > *hash = $hashref;
>
> hee hee .. too funny .. thanks Jeff
:-). Funny what a good night's sleep will do for ya.
thx,
p
------------------------------
Date: Wed, 13 Sep 2000 15:19:15 +0200
From: "titanex" <ask@titanex.ch>
Subject: CGIEMAIL - attachment
Message-Id: <8pnut5$mfc$1@news1.sunrise.ch>
Hi
I'd like to send an attachment along when using CGIEMAIL. I use
ENCTYPE="multipart/form-data" in the form action.
Naturally I use:
<INPUT TYPE="file" NAME="attachment" SIZE="20">
to include the attachment. When filling in and sending it
I get:
Error
No email was sent due to an error.
403 No variable substitutions in template
/home/www/domain.ch/file.txt
cgiemail 1.6
Any idea what it could be?
Andreas
--
----------------
http://titanex.com - The Fast Source on the Web
http://euroteam.ch - Quality takes time - not centuries
----------------
------------------------------
Date: Wed, 13 Sep 2000 15:58:14 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: CGIEMAIL - attachment
Message-Id: <Pine.GHP.4.21.0009131552540.12665-100000@hpplus03.cern.ch>
On Wed, 13 Sep 2000, titanex wrote:
> I'd like to send an attachment along when using CGIEMAIL.
The CGIemail version 1.6 that's known to me is written in C, not
Perl, so you seem to be in the wrong place.
> Any idea what it could be?
Try reading its documentation, first to find out whether it supports
what you're trying to do, and second for information on where to seek
advice.
good luck
------------------------------
Date: Wed, 13 Sep 2000 10:50:35 -0400
From: "James M. Luongo" <jluongonospam@draper.com>
Subject: Re: Change Windows Desktop BG
Message-Id: <39BF943B.A189E145@draper.com>
> for the standard documentation. I wrote a short script that rotated
> through a collection of Wallpapers (on an NT machine and using the old
> Win32::Registry module) but it only worked on a restart (or a re-login,
> really) because updating the Registry is not the whole battle.
Could I maybe see the script that you wrote so I can customize my own?
Thanks
------------------------------
Date: Wed, 13 Sep 2000 09:53:35 -0400
From: Thom Harp <thomharp@flash.net>
Subject: Changing the filename for reporting compile errors
Message-Id: <39BF86DF.FBDC89FF@flash.net>
Is there a way I can overide the name of the current file as it's
reported during compile time errors?
Specifically, I preprocess my script and write out the processed version
to /tmp and then execute it with
do '/tmp/file.pl';
Is there a way for compile time errors to report the original filename,
and not the /tmp one?
thanks...
------------------------------
Date: Wed, 13 Sep 2000 16:42:48 +0300
From: "Elisa Roselli" <e.roselli@volusoft.com>
Subject: Character Class in Regex - Despecify What?
Message-Id: <8po41a$34k$1@wanadoo.fr>
I've set myself the exercise of creating a simple Perl program that would
extract the lines of any given character in a play, together with the
leading cue. In the input file, the characters' names appear in all caps,
followed by a tab, followed by their lines; two new lines separate the
chunks.
LYSANDER Why should he stay, whom love doth press to go?
HERMIA What love could press Lysander from my side?
LYSANDER Lysander's love, that would not let him bide,
Fair Helena, who more engilds the night
Than all you fiery oes and eyes of light.
Why seek'st thou me? could not this make thee know,
The hate I bear thee made me leave thee so?
Within any character's speech, there can be any kind of alpabetic character,
plus spaces, single new lines and tabs. My problem is that I am trying to
express that with a character class, and I kept getting syntax errors. I am
never sure about what does and does not need to be despecified within a
character class and perlre was not very helpful on this point:
Here's how the character class looks in its current formulation which isn't
working:
[A-Za-z \n\.,;:\!\?\'\(\)-]
That's any capital or small alphabet character, blank space, newline,
period, comma, semicolon, colon, exclamation point, question mark,
apostrophe, opening parenthesis, closing parenthesis and dash, placed at the
end so as not to be taken for a range-marker.
Can anyone clear me up on this or point me to where I should look? Many
thanks,
Elisa Francesca Roselli
------------------------------
Date: 13 Sep 2000 11:00:31 -0400
From: aperrin@demog.berkeley.edu (Andrew J. Perrin)
Subject: Re: Character Class in Regex - Despecify What?
Message-Id: <ulmwwnxps.fsf@demog.berkeley.edu>
"Elisa Roselli" <e.roselli@volusoft.com> writes:
[snip]
> plus spaces, single new lines and tabs. My problem is that I am trying to
> express that with a character class, and I kept getting syntax errors. I am
> never sure about what does and does not need to be despecified within a
> character class and perlre was not very helpful on this point:
>
> Here's how the character class looks in its current formulation which isn't
> working:
> [A-Za-z \n\.,;:\!\?\'\(\)-]
>
> That's any capital or small alphabet character, blank space, newline,
> period, comma, semicolon, colon, exclamation point, question mark,
> apostrophe, opening parenthesis, closing parenthesis and dash, placed at the
> end so as not to be taken for a range-marker.
>
From memory, the only characters that require escaping in classes are
^, - (sometimes), and ]. So I think you should be able to do:
[A-Za-z \n.,;:!?'()-]
However, you might find it much easier to define what characters are
*not* allowed, given the rather large selection above. Can you do
something along the lines of:
[^[\]{}*&]
etc., which looks like almost everything you're looking for?
Also, though, note that you can't specify "single" newlines and tabs
versus multiple of them using a character class, since you have to
allow multiples of your other characters.
To make your life much, much easier, you might consider setting $/
(input_record_separator) to "\n\n" or something along those lines to
break up the file into the chunks on its way in.
In general, Freidl's _Mastering Regular Expressions_ is a very good
reference for the regex stuff, although I confess I didn't find the
answer to what has to be escaped in character classes there.
--
----------------------------------------------------------------------
Andrew Perrin - Solaris-Linux-NT-Samba-Perl-Access-Postgres Consulting
aperrin@igc.apc.org - http://demog.berkeley.edu/~aperrin
----------------------------------------------------------------------
------------------------------
Date: Wed, 13 Sep 2000 09:27:57 -0400
From: brian@smithrenaud.com (brian d foy)
Subject: Re: Count of items is EXCEPTION not RULE (was Re: Little perl annoyance #371: glob)
Message-Id: <brian-ya02408000R1309000927570001@news.panix.com>
In article <968844027.14399@itz.pp.sci.fi>, Ilmari Karonen <usenet11213@itz.pp.sci.fi> posted:
> In article <brian-ya02408000R1209001643400001@news.panix.com>, brian d foy wrote:
> >In article <968784201.19632@itz.pp.sci.fi>, Ilmari Karonen <usenet11212@itz.pp.sci.fi> posted:
> >> something that can give it a scalar. The language has been designed
> >> so that this is always possible; every builtin has a scalar value.
> >even sort()? ;)
> I was sure someone would mention this. Note the conspicuous absence
> of the word "meaningful" in the last sentence you quoted. Undef is a
> perfectly fine scalar value as far as perl is concerned.
i tend to think that undef, at least in this case, is the absence
of value, but now we're arguing philosophy rather than Perl ;)
--
brian d foy
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>
Perl Mongers <URL:http://www.perl.org/>
------------------------------
Date: Wed, 13 Sep 2000 14:41:22 GMT
From: walter@ganymede.frii.com (Walter Pienciak)
Subject: Re: email form script
Message-Id: <mmMv5.125$W3.170897408@news.frii.net>
In article <968824593.825591@Chaos.es.co.nz>,
Nathan Currie <skyhigh@aviation-worldwide.com> wrote:
>I have a need for a cgi/perl script that will take a forms data, then
>generate an email.
>
>Scenario
>
>Customer comes to my site and wants to subscribe to our mailing list.
>Customer enters their email address in the form and submits it.
>
>The script gets the information, strips the customers email address and then
>generates and email to our mailing list with
>
>From: customeremailaddress@wherever.com
>To: mailinglist-request@mycompany.com
>Subject: SUBSCRIBE
>Body: <empty>
>
>I would also like the script to take an additional fields data of 'Subscribe
>or Unsubscribe' and also redirect the customer to a 'thankyou' page when
>completed. But i'll take just the basics if need be.
>
>Thanks in advance for your help.
>Nathan Currie
>www.aviation-worldwide.com
Maybe
http://walter.dsl.frii.net/family/walter/src/fmail.pl
has the basic structure for doing what you want. You can modify it
as you need.
Walter
------------------------------
Date: Wed, 13 Sep 2000 16:27:34 +0200
From: "FX" <FX@hasnomail.com>
Subject: Finding subdirectories on Windows Systems
Message-Id: <8po2op$k9n$1@front1.grolier.fr>
Hi,
How can I find the subdirectories from base directory on a windows machine?
I've tried this but (of course) it's not working...
use Cwd;
$dir = cwd;
print $dir;
print "\nlooking for sub directories";
opendir(DIR,$dir) || die "can't opendir $some_dir: $!";
@dots = grep { /^\./ && -f "$dir\$_" } readdir(DIR);
foreach $subdirectories (@dots){
print $subdirectories;
}
closedir DIR;
THX for your help
Please be verbose
FX
------------------------------
Date: Wed, 13 Sep 2000 16:47:44 +0200
From: =?iso-8859-1?Q?Thorbj=F8rn?= Ravn Andersen <thunderbear@bigfoot.com>
Subject: Re: Finding subdirectories on Windows Systems
Message-Id: <39BF9390.EE9FA023@bigfoot.com>
FX wrote:
>
> Hi,
>
> How can I find the subdirectories from base directory on a windows machine?
Look into File::Find where you test with a "-d".
--
Thorbjørn Ravn Andersen "...plus...Tubular Bells!"
http://bigfoot.com/~thunderbear
------------------------------
Date: Wed, 13 Sep 2000 13:56:08 GMT
From: tohann@my-deja.com
Subject: getting milliseconds...
Message-Id: <8po11d$j25$1@nnrp1.deja.com>
Is there any way to get the millisecond from Perl's localtime function?
Is there another way to get current milliseconds?
Thanks much,
Trent O.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 13 Sep 2000 14:25:24 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: getting milliseconds...
Message-Id: <7avgw0pdwq.fsf@merlin.hyperchip.com>
tohann@my-deja.com writes:
> Is there any way to get the millisecond from Perl's localtime function?
No.
> Is there another way to get current milliseconds?
Yes. And it is described in perlfaq8:
How can I measure time under a second?
--Ala
------------------------------
Date: Wed, 13 Sep 2000 15:34:32 +0200
From: Nagaraj Ashok <Nagaraj.Ashok@de.bosch.com>
Subject: Help needed on Win32::Pipe.pm
Message-Id: <8pnvp8$7ak$1@proxy.fe.internet.bosch.de>
I have a problem associated with Win32::Pipe.pm module.
The description of the scenario
---------------------------------------
I have a perl process creating the server side of the Win32 named Pipe
letz call it server process). The server process runs in an infinite loop
waiting for the clients ( client connections) to connect. The server process
reads from the client and responds back.
Everything works fine when only one client is trying to connect ( is
connected). When more than one client tries to connect (open client
connections) to the server process ( at same time or nearly the same time),
only the first client sucessfully connects other clients wait to connect
till the Timeout is reached and Timeout error reflects --- Error:999 "could
not connect".
Going by the documentation of Win32::Pipe.pm , the server process after
having disconnected with the first client should respond to the second one
and continue this sequence till there are no more clients trying to connect
to it.
I increased the $Timeout value for the client connections ( in new
Win32::Pipe($pipename, $Timeout,..) ) to wait longer, but that does'nt help.
Can anyone help me how to tackle this situation.
ashok
------------------------------
Date: Wed, 13 Sep 2000 09:21:01 -0400
From: Phil Barone <pbarone@harris.com>
Subject: Help with scope and module
Message-Id: <39BF7F3C.3500572C@harris.com>
Hi All,
I have a main program and a module that contains some library
subroutines.
What I would like to know if/how I can create a global variable in the
main program accessable to the subroutines in my library?
and
How/If it is possible for a subroutine in my library can access a
subroutine in my main program?
Any help would be appreciated.
I have included some sample code for the main and library module called
t1.pl and t1.pm.
#!/usr/bin/perl -w
use strict;
use some::t1;
use vars qw($DEBUG $VERBOSE);
$DEBUG = 1;
print "Main: $DEBUG\n";
&s1;
sub main1 {
print "In main\n";
}
1;
#!/usr/bin/perl -w
package some::t1;
use strict;
BEGIN {
use Exporter ();
use vars qw(@ISA @EXPORT);
@ISA = qw(Exporter);
@EXPORT = qw(s1);
}
sub s1 {
print "S1: $DEBUG\n";
&main1;
}
1;
--
Phil Barone (e-mail: pbarone@harris.com)
------------------------------
Date: Wed, 13 Sep 2000 14:05:03 GMT
From: Rodney Engdahl <red_orc@my-deja.com>
Subject: Re: how to remove unprintable chars with Perl script
Message-Id: <8po1hv$jn4$1@nnrp1.deja.com>
In article <MPG.14296035653f238a989798@localhost>,
jason <elephant@squirrelgroup.com> wrote:
> Rodney Engdahl <red_orc@my-deja.com> wrote ..
> >In article <8pm5ii$6k0$1@news.IAEhv.nl>,
> > "Durk Gardenier" <d.gardenier@iae.nl> wrote:
> >> This initially seemed easy , but it has taken
> >> me quite some time and I still have not found
> >> an answer.
> >>
> >> If a file contains unprintable characters, how can I
> >> remove them with a perl script?
> >>
> >
> >you could try a regular expression and specify the characters you
want
> >to remove:
> >
> >$var = "a bunch of characters, and considering the 'c' and 'e' to be
> >unprintable for example.";
> >
> >$var =~ s/(?:c|e)//g;
>
> I think you might have missed the point Rodney .. 'unprintable
> characters' usually refer to control characters like "\b" and "\a" ..
> see the documentation pointers I mentioned elsewhere in this thread if
> you're interested
>
no, i did not miss the point. unprintable characters in the sample
would not have shown up in this post, so I used printable characters to
_illustrate_ the point.
> and just quietly .. your above removal would have been better done
with
> the tr/// operator and the 'd' modifier .. check perlop for more
details
> on that
you are probably right on this . . .
>
> --
> jason -- elephant@squirrelgroup.com --
>
--
Some drink at the fountain of knowledge...others just gargle.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 13 Sep 2000 14:06:18 GMT
From: tasher1234@my-deja.com
Subject: Inserting into arrays
Message-Id: <8po1ka$jp3$1@nnrp1.deja.com>
Okay, I'm a newbie to Perlscript. What I need to do
is to insert an array element into any position in an array.
For example the array @items has this in it:
Bob Ted Alice
Between Bob and Ted I want to insert Uri.
So now the array should look like this:
Bob Uri Ted Alice
So would a splice command do it?
$i is the element counter
splice @items,$i,0
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 13 Sep 2000 10:50:58 -0400
From: aperrin@demog.berkeley.edu (Andrew J. Perrin)
Subject: Re: Inserting into arrays
Message-Id: <uog1sny5p.fsf@demog.berkeley.edu>
tasher1234@my-deja.com writes:
> Okay, I'm a newbie to Perlscript. What I need to do
> is to insert an array element into any position in an array.
> For example the array @items has this in it:
> Bob Ted Alice
> Between Bob and Ted I want to insert Uri.
> So now the array should look like this:
> Bob Uri Ted Alice
> So would a splice command do it?
> $i is the element counter
> splice @items,$i,0
What happened when you tried it?
Check out perldoc -f splice for more.
--
----------------------------------------------------------------------
Andrew Perrin - Solaris-Linux-NT-Samba-Perl-Access-Postgres Consulting
aperrin@igc.apc.org - http://demog.berkeley.edu/~aperrin
----------------------------------------------------------------------
------------------------------
Date: Wed, 13 Sep 2000 14:29:26 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Is there a more elegant way?
Message-Id: <7asnr4pdq0.fsf@merlin.hyperchip.com>
mcafee@waits.facilities.med.umich.edu (Sean McAfee) writes:
> I'll generally know before calling myfunc whether the scalar that will be
> returned will be very large or not. I want to reduce unnecessary copying of
> large blocks of memory,
Why don't you use references?
--Ala
------------------------------
Date: Wed, 13 Sep 2000 14:54:11 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: killfiles? scores? I wish I had these luxuries
Message-Id: <Pine.GHP.4.21.0009131439350.12665-100000@hpplus03.cern.ch>
On Tue, 12 Sep 2000, Jeff Pinyan wrote:
> Sorry if this is off-topic, but I use the meager PINE, and I don't think I
> have the ability to kill-file people or score postings.
[x-posted and fups set]
PINE 4.21 can do scoring just fine, on the basis of header criteria
etc. The score can then be used to colour the index entries.
See the Main->Setup->Rules->Filters and Main->Setup->Rules->Setscores
menus, and the Main->Setup->Rules->Indexcolor menu. You may also need
to make appropriate choices in the Main->Setup->Kolor menu (I use
force-ansi-8color, it gives better results on the term that I use).
4.21 purports also to delete (i.e effectively "kill") on the basis of
header criteria or score. Unfortunately, although this works fine for
email, there are bug(s) in the handling of usenet articles, making the
feature effectively unusable at this release. It's said that these
will be fixed in the upcoming 4.30 release.
I know you've already got several recommendations to change to a
different newsreader. But I'm kind of accustomed to PINE, and I put
up with its foibles as a newsreader, as it's widely supported on the
systems that I use.
------------------------------
Date: Wed, 13 Sep 2000 15:38:25 +0200
From: Nagaraj Ashok <Nagaraj.Ashok@de.bosch.com>
Subject: need help on Win32::Pipe
Message-Id: <8po00h$86b$1@proxy.fe.internet.bosch.de>
I have a problem associated with Win32::Pipe.pm module.
The description of the scenario
---------------------------------------
I have a perl process creating the server side of the Win32 named Pipe
letz call it server process). The server process runs in an infinite loop
waiting for the clients ( client connections) to connect. The server process
reads from the client and responds back.
Everything works fine when only one client is trying to connect ( is
connected). When more than one client tries to connect (open client
connections) to the server process ( at same time or nearly the same time),
only the first client sucessfully connects other clients wait to connect
till the Timeout is reached and Timeout error reflects --- Error:999 "could
not connect".
Going by the documentation of Win32::Pipe.pm , the server process after
having disconnected with the first client should respond to the second one
and continue this sequence till there are no more clients trying to connect
to it.
I increased the $Timeout value for the client connections ( in new
Win32::Pipe($pipename, $Timeout,..) ) to wait longer, but that does'nt help.
Can anyone help me how to tackle this situation.
ashok
------------------------------
Date: Wed, 13 Sep 2000 08:10:57 -0500
From: Russ Jones <russ_jones@rac.ray.com>
Subject: Re: Qualifications for new Perl programmer?????
Message-Id: <39BF7CE1.1F77C71A@rac.ray.com>
"Christopher M. Jones" wrote:
>
> In most states a law
> abiding citizen can fairly easily acquire and legally
> own a machine gun.
Can you get me a Silkworm surface to air missile?
--
Russ Jones - HP OpenView IT/Operatons support
Raytheon Aircraft Company, Wichita KS
russ_jones@rac.ray.com 316-676-0747
Quae narravi, nullo modo negabo. - Catullus
------------------------------
Date: Wed, 13 Sep 2000 07:35:18 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Qualifications for new Perl programmer?????
Message-Id: <39BF90A6.C7A2A51D@stomp.stomp.tokyo>
Richard Lawrence wrote:
> In article <39BF0FD5.3A4A9325@stomp.stomp.tokyo>,
> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> > Ahhh.. these are musings on qualifying for employment, not
> > personal practices in programming. Best test of a prospective
> > employee, for programming, is to have her, or him, write an
> > ingenious program of a type, from scratch. Concept is to test
> > programming skills, not an ability to copy and paste module
> > references and the such. This is no indicator of programming
> > skills but rather an indicator of talent with a mouse.
> Thankfully the IT world does not think like you.
> Modules are good, re-inventing the wheel is bad.
> Doing it your way would quadruple development times, increase code
> complexity and make it horrendiously difficult to maintain (Why debug a
> home-grown version of function when a perfectly good one already exists?
> What about home-grown versions of a function that look the same as their
> "proper" counterparts but actually give slightly different results?).
> Its elementary computer science. However I can appreciate that as an
> English teacher you probably wouldn't have been taught that.
My presumption is you are another of millions of minions who are
proud graduates of the Sears, Roebuck & Co. Academy of Language Arts.
You still don't get it and most likely never will, with your
ego totally in charge of your mind. Mine are musings on possible
employment qualifications, which has been stated several times.
Nevertheless you continue to spew a rant with malice intent about
who knows whatever anal retentive asinine techniques in making
a complete arse of yourself.
Such ignorance is inexcusable. Have you considered seeking
employment with a reputable firm such as K-Mart or Wally World?
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
------------------------------
Date: Wed, 13 Sep 2000 07:46:20 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Qualifications for new Perl programmer?????
Message-Id: <39BF933C.DF75CC8F@stomp.stomp.tokyo>
Russ Jones wrote:
> "Christopher M. Jones" wrote:
> > In most states a law abiding citizen can fairly
> > easily acquire and legally own a machine gun.
> Can you get me a Silkworm surface to air missile?
A collection of grease grenades, booger bombs and
snot rockets, would be of greater use around here.
Godzilla!
--
print "http://3483852801/%7e%63%61ll%67i%72l";
------------------------------
Date: Wed, 13 Sep 2000 09:31:51 -0400
From: Thom Harp <thomharp@flash.net>
Subject: Re: returning a tied variable
Message-Id: <39BF81C7.78F5A44B@flash.net>
Rick Delaney wrote:
> You can't do it like that to my knowledge, since you are returning
> tied($foo)->FETCH;
>
That explains some of the behavior I saw.
> What exactly are you trying to do? Could you be satisfied with
>
> sub tie_variable {
> tie $_[0], 'Someclass';
> }
>
> tie_variable($bar);
That's what I've resorted too already. I'm writing my code to be used by
other people who don't necessarily know much about Perl and I'm trying to
hide as much Perlesque implementation detail as possible. It would be
more intuitive for people just to write: $foo = CreateObject
(@parameter_list) rather than CreateObject ($foo, @parameter_list).
These are mostly C++ programmers using my code, so ideally, I'd make
CreateObject as the "new" method for the class so they could call:
$foo = new Object (@parameter_list);
thanks...
------------------------------
Date: Wed, 13 Sep 2000 09:33:14 -0400
From: Thom Harp <thomharp@flash.net>
Subject: Re: returning a tied variable
Message-Id: <39BF821A.F0CF82BD@flash.net>
Anders Lund wrote:
> return a reference.
>
> sub tie_var {
> tie $foo, "aclass":
> \$foo;
> }
That was my first thought on the subject but it doesn't seem to work. I'd
be happy if someone could explain to me *why* it doesn't work. I'm a
little fuzzy on what tying a variable actually does to it.
thanks...
------------------------------
Date: Wed, 13 Sep 2000 14:51:02 GMT
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Simple newbie question
Message-Id: <7apum8pcq0.fsf@merlin.hyperchip.com>
ranskaboss@my-deja.com writes:
> I would like to know how a good Perlprogrammer (yeah, I'm in a Perl
> forum so, there must be some good programmer ;)
> can do with regular expression to catch in string that :
> ABCxxxxxxxxxxxxxxxxABCiiiiiiiii
> ABCwwwwwwwwwwwww ABCfff
> ABCdddddddddddddddd
>
> I mean to recognize the first ABCxxxxxxxxxxx then the second ABCiiiiiii
> then the third ABCwwwwwwww... ect
I am not sure I understand exactly what you want, but this is what I
came up with:
# assume your string is in $string
@letters = $string =~ /ABC(.*?)(?=\s|ABC|$)/g;
--Ala
------------------------------
Date: Wed, 13 Sep 2000 15:48:43 +0100
From: Tom Fotheringham <tom@hughesmedia.co.uk>
Subject: Strange characters when using forms ^M
Message-Id: <39BF93CB.3F48A1B@hughesmedia.co.uk>
I use:
$data=$q->param("whatever");
,when recieving info from a TEXT AREA, I get a couple of ^M
Can anyone please point me in the right direction as how to get TEXT
AREA information to work as a normal text field?
Please and Thanks
Tom
------------------------------
Date: Wed, 13 Sep 2000 09:17:44 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: String compression
Message-Id: <Pine.GSO.4.21.0009130911540.23599-100000@crusoe.crusoe.net>
[posted & mailed]
On Sep 13, Trinity Park said:
>my $time = $localtime[0] + 60 * $localtime[1] + 3600 * $localtime[2];
>@localtime[0, 1, 2] = (0, 0, 0);
>my $date = timelocal @localtime;
>there a better way to compress the string? Note: I only want
>to use printable characters.
I don't see why you only want printable characters. The following works
quite nicely for me, and makes a 4-byte string, albeit with characters
other than ' ' through '~'.
sub num2chr {
my $n = shift;
my ($v,$c);
while ($n) {
$c .= chr($v = $n % 256);
$n = ($n - $v) >> 8;
}
return $c;
}
sub chr2num {
my $c = shift;
my ($v,$n);
while (defined($v = chop $c)) {
$n = ($n + ord($v)) << 8;
}
return $n;
}
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Wed, 13 Sep 2000 09:25:03 -0400
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: String compression
Message-Id: <Pine.GSO.4.21.0009130924080.23599-100000@crusoe.crusoe.net>
On Sep 13, Jeff Pinyan said:
> sub num2chr {
> my $n = shift;
> my ($v,$c);
> while ($n) {
> $c .= chr($v = $n % 256);
> $n = ($n - $v) >> 8;
> }
> return $c;
> }
Ick, silly.
sub num2chr {
my $n = shift;
my $c;
while ($n) {
$c .= chr($n % 256);
$n >>= 8;
}
return $c;
}
--
Jeff "japhy" Pinyan japhy@pobox.com http://www.pobox.com/~japhy/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
The Perl Archive - Articles, Forums, etc. http://www.perlarchive.com/
CPAN - #1 Perl Resource (my id: PINYAN) http://search.cpan.org/
------------------------------
Date: Wed, 13 Sep 2000 13:43:50 GMT
From: "Philip Garrett" <philipg@atl.mediaone.net>
Subject: Re: Unix Info
Message-Id: <qwLv5.2814$IV1.876324@typhoon.southeast.rr.com>
<scarey_man@my-deja.com> wrote in message
news:8pno3b$8kt$1@nnrp1.deja.com...
> Is there an easy way to extract info on a unix box
> e.g. Number of CPU's, cpu types, installed memory etc?
Unix::Processors (only works on intel-linux and sparc-solaris)
------------------------------
Date: Wed, 13 Sep 2000 13:49:27 GMT
From: scarey_man@my-deja.com
Subject: Re: Unix Info
Message-Id: <8po0l0$icv$1@nnrp1.deja.com>
uname -a gives the Unix OS Type, release and Hardware type.
It gives no into on cpu type, memory etc.
"Liang Cheng" <Cheng3@email.msn.com> wrote:
> yeah
> uname -a
>
> <scarey_man@my-deja.com> wrote in message
> news:8pno3b$8kt$1@nnrp1.deja.com...
> > Is there an easy way to extract info on a unix box
> > e.g. Number of CPU's, cpu types, installed memory etc?
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 13 Sep 2000 11:01:12 -0400
From: "Liang Cheng" <Cheng3@email.msn.com>
Subject: Re: Unix Info
Message-Id: <#SbU1LZHAHA.327@cpmsnbbsa09>
sorry, mis-understood your question.
<scarey_man@my-deja.com> wrote in message
news:8po0l0$icv$1@nnrp1.deja.com...
> uname -a gives the Unix OS Type, release and Hardware type.
> It gives no into on cpu type, memory etc.
>
>
> "Liang Cheng" <Cheng3@email.msn.com> wrote:
> > yeah
> > uname -a
> >
> > <scarey_man@my-deja.com> wrote in message
> > news:8pno3b$8kt$1@nnrp1.deja.com...
> > > Is there an easy way to extract info on a unix box
> > > e.g. Number of CPU's, cpu types, installed memory etc?
> > >
> > >
> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.
> >
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 V9 Issue 4311
**************************************