[19853] in Perl-Users-Digest
Perl-Users Digest, Issue: 2048 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Nov 1 14:11:03 2001
Date: Thu, 1 Nov 2001 11:10:14 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1004641814-v10-i2048@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 1 Nov 2001 Volume: 10 Number: 2048
Today's topics:
Re: Newbie Question (Nick Temple)
newbie: error processing (John Menke)
Re: newbie: error processing <robsjobs@hotmail.com>
Re: newbie: error processing <simon.oliver@umist.ac.uk>
OLEAutomation using PERL? 1443131@usenetplanet.com
Re: OLEAutomation using PERL? <jeff@vpservices.com>
Re: Optomizing Speed for Large Files (Nick Temple)
Perl & OSX -- Warning, may be OT <lmoran@wtsg.com>
Re: Perl & OSX -- Warning, may be OT (Randal L. Schwartz)
Re: Perl/CGI Search Script (Nick Temple)
Re: Real quick: What is the Server Name? (Nick Temple)
Re: Replacing a Character <Graham.T.Wood@oracle.com>
replacing many patterns at the same time without cross- (joe dassin)
Re: replacing many patterns at the same time without cr nobull@mail.com
Re: Sending commands (keyboard inputs) from a Perl-scri (Emil)
Re: Sending commands (keyboard inputs) from a Perl-scri (Tad McClellan)
Re: sorting hash of hash by values nobull@mail.com
Text Database <miele@canada.com>
Re: Text Database <tsee@gmx.net>
variable number of socket descriptors <lhswartw@ichips.intel.com>
Re: Win32 Perl book/software suggestions? <lhswartw@ichips.intel.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 1 Nov 2001 10:52:33 -0800
From: nicktemple2000@yahoo.com (Nick Temple)
Subject: Re: Newbie Question
Message-Id: <a9fe2341.0111011052.461c5fba@posting.google.com>
Look, if you don't do Perl, then don't start!
kawaja@ece.ufl.edu (Jason Kawaja) wrote in message news:<slrn9u0inv.o3v.kawaja@kawaja.ece.ufl.edu>...
> previously, Peter Morris <no_spam.ple@se.com> wrote:
> > Hello, I'm just learning PERL. I don't really understand
> > what these $_ and @_ variables are all about. Can someone
> > explain, please.
>
> $_ is the variable $ARG
>
> holds the scalar that gets passed to a subroutine
>
> @_ is the variable @ARG
>
> holds the array of scalar args passed to a subroutine
>
> $_ is assumed on many of perl's builtin functions requiring or depending
> on passed args
>
> print STDOUT;
> print STDOUT $_;
>
> are the same.
------------------------------
Date: 1 Nov 2001 05:45:04 -0800
From: jmenke@scsnet.csc.com (John Menke)
Subject: newbie: error processing
Message-Id: <3a2d73ac.0111010545.4993ac5c@posting.google.com>
I would like to execute a subroutine when an error occurs in my
script.
I am familiar with die and warn, but they only seem to print to STDERR
and I cannot call subroutines from within the die and warn statements.
Is there any way to first execute a subroutine when an error occurs
and then die or warn?
Specifically, I have statements like these:
or warn "Disconnection failed: $DBI::errstr\n";
I would like to do this:
or warn addLogMessage("this is the log message");
and get the script to continue
or do this:
or die addLogMessage("this is the log message");
and then die...
is this possible?
--john
------------------------------
Date: Thu, 01 Nov 2001 13:56:41 GMT
From: "Robert Petty" <robsjobs@hotmail.com>
Subject: Re: newbie: error processing
Message-Id: <twcE7.59$6G5.101714@typhoon.tampabay.rr.com>
Make a sub called addLogMessage, pass it the message and have it die after
doing it's work:
do_something("with Parameter") or addLogMessage_and_die("Couldn't
do_something \"with Parameter\"\n");
sub addLogMessage_and_die {
open(FH, ">> logfile.txt");
print FH $_."\n";
close (FH);
die($_);
}
Mine may be a poor opinion but at least I try.
Rob
"John Menke" <jmenke@scsnet.csc.com> wrote in message
news:3a2d73ac.0111010545.4993ac5c@posting.google.com...
> I would like to execute a subroutine when an error occurs in my
> script.
>
> I am familiar with die and warn, but they only seem to print to STDERR
> and I cannot call subroutines from within the die and warn statements.
>
> Is there any way to first execute a subroutine when an error occurs
> and then die or warn?
>
> Specifically, I have statements like these:
>
> or warn "Disconnection failed: $DBI::errstr\n";
>
> I would like to do this:
>
> or warn addLogMessage("this is the log message");
>
> and get the script to continue
>
> or do this:
>
> or die addLogMessage("this is the log message");
>
> and then die...
>
> is this possible?
>
> --john
>
------------------------------
Date: Thu, 01 Nov 2001 15:17:41 +0000
From: Simon Oliver <simon.oliver@umist.ac.uk>
To: John Menke <jmenke@scsnet.csc.com>
Subject: Re: newbie: error processing
Message-Id: <3BE16795.6A709E14@umist.ac.uk>
eval {
# trap this code
};
if ($@) {
print "the error was: $@";
}
John Menke wrote:
>
> I would like to execute a subroutine when an error occurs in my
> script.
>
> I am familiar with die and warn, but they only seem to print to STDERR
> and I cannot call subroutines from within the die and warn statements.
>
> Is there any way to first execute a subroutine when an error occurs
> and then die or warn?
>
> Specifically, I have statements like these:
>
> or warn "Disconnection failed: $DBI::errstr\n";
>
> I would like to do this:
>
> or warn addLogMessage("this is the log message");
>
> and get the script to continue
>
> or do this:
>
> or die addLogMessage("this is the log message");
>
> and then die...
>
> is this possible?
>
> --john
------------------------------
Date: Thu, 01 Nov 2001 15:01:15 GMT
From: 1443131@usenetplanet.com
Subject: OLEAutomation using PERL?
Message-Id: <3be16380.320016509@tornado.usenetplanet.com>
It is my understanding that Internet Explorer (or any other Windows
applications for that matter) exposes API through OLEAutomation so
that one can write code to control it. What I want to do is to write
PERL script code to open up Internet Explorer, go to certain web site,
fill out forms, and save changed values all automatically. Is this
doable? I believe it is because PERL can call Windows API. Can
someone point me some references? Thank you in advance.
------------------------------
Date: Thu, 01 Nov 2001 07:19:50 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: OLEAutomation using PERL?
Message-Id: <3BE16816.5FDAFDFC@vpservices.com>
1443131@usenetplanet.com wrote:
>
> What I want to do is to write
> PERL script code to open up Internet Explorer, go to certain web site,
> fill out forms, and save changed values all automatically. Is this
> doable?
Why does Internet Explorer have to be involved? The Perl LWP module can
fill out and submit forms at a remote site without using a browser. It
probably came with your perl, if not you can get it from ActiveState.
> I believe it is because PERL can call Windows API.
That's true. There are a number of modules to do this (and
documentation for them) in the Win32::* hierarchy. But unless there is
some part of your problem you aren't telling us about, using them to
accomplish this particular task would be a bit like asking us how to
build a train because you want to go to your neighborhood train station
to buy a cheese sandwich -- forget the train, just walk to the train
station and buy the sandwich.
--
Jeff
------------------------------
Date: 1 Nov 2001 10:59:15 -0800
From: nicktemple2000@yahoo.com (Nick Temple)
Subject: Re: Optomizing Speed for Large Files
Message-Id: <a9fe2341.0111011059.41b5b3b8@posting.google.com>
Jesus, my pet gerbil writes better code than you!
Uri Guttman <uri@stemsystems.com> wrote in message news:<x71yjjxuix.fsf@home.sysarch.com>...
> >>>>> "DR" == Doyle Rivers <dwrivers@micron.com> writes:
>
> DR> sub report
> DR> {
> DR> print "sub report: @_\n" if $debug;
>
> DR> my ($reportfile) = $path."report.tmp";
>
> no need for () when assigning a scalar in a my line.
>
> DR> my ( $field,
> DR> $tree,
> DR> $data,
> DR> $delta,
> DR> $rp,
> DR> @delta);
>
> DR> &print_header;
>
> DR> foreach $field (keys %data)
> DR> {
> DR> foreach $tree ( sort numerically keys %{ $data{$field} })
> DR> {
>
> first trick, when you scan a HoH tree, get a reference to each level as
> you go down. then you don't need to do those long hash lookups over and
> over in the tight loops. that is slow.
>
>
> my $field_ref = $data{ $tree } ;
>
> DR> my ($begin) = 0;
> DR> @branch = ();
> DR> foreach $rp (@rp)
> DR> {
> DR> if ($begin == 0)
> DR> {
> DR> $begin = 1;
> DR> print OUT $field;
> DR> print OUT $seperator,$tree;
> DR> }
>
> that flag test is slow as it will execute every loop. where does the @rp
> list come from? you could write 2 loops to factor out that code. or you
> could build up the reports as strings first and then print them out all
> at one time. just try to remove the invariant code from the loop.
>
>
> DR> if (defined($data{$field}{$tree}{$branch}))
>
> if ( exists( $field_ref->{$branch} ) ) {
>
> BTW, i don't see $branch assigned anywhere. i know this is not real code
> but it helps if you post working code.
>
> DR> {
> DR> push @leaves, $data{$field}{$tree}{$branch};
> DR> print OUT sprintf "%0.1f", $data{$field}{$tree}{$branch};
>
> same as above. skip the invariant levels of the hash by using a ref to
> this level.
>
> DR> }
>
> DR> else
> DR> {
> DR> push @leaves, "UD";
> DR> }
>
> style point:
>
> when the last code of a loop is if/else, have the if code do a next and
> then you can lose the else{} and save indents and {} which are in short
> supply. it also makes the code less cluttered and easier to read IMNSHO.
>
>
> DR> }
>
> DR> @delta = &calc_delta(@branch) if ($#branch > 0);
>
> as before, you never populate @branch so that is meaningless.
>
> the main point is to factor out invariant stuff from lower level
> loops. useless multiple hash lookups can be a big time pig.
>
> uri
------------------------------
Date: Thu, 01 Nov 2001 11:50:26 -0500
From: Lou Moran <lmoran@wtsg.com>
Subject: Perl & OSX -- Warning, may be OT
Message-Id: <qqu2utcnvi432p9mt00urakaabn9168vn6@4ax.com>
--I have a G4 with OSX and OSX has Perl 5.6.0 and it works (mostly) as
expected.
--I tried to use: perl -MCPAN -e 'install Some:Module' like I do on my
RH boxes. I did some very cursory reading on the topic via the man
pages but didn't see anything unusual. Anyway, it doesn't work. It
tells me essentially that I have broken Perl and I should really
consider making a new Perl. OK. I went to CPAN/Ports and looked up
OSX which said you have 5.6.0. No link to any .tar, or .src. And
Bundle::CPAN wouldn't load with the same errors.
--So the question is:
Does Perl think OSX is some unix and I should/can download any old
*nixy source and go to it from there or should I be looking for, doing
something else.
(personal note: I just like OSX, I haven't seriously used a Mac since
the early 90s (I still have my SE/30) and I don't mind reloading OSX
or whatever b/c I'm not running anything particularly important on the
machine.)
--
TMTOWTDI: My way tends to be wrong...
lmoran@wtsg.com
------------------------------
Date: 01 Nov 2001 09:37:31 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Perl & OSX -- Warning, may be OT
Message-Id: <m1pu728k9w.fsf@halfdome.holdit.com>
>>>>> "Lou" == Lou Moran <lmoran@wtsg.com> writes:
Lou> --I have a G4 with OSX and OSX has Perl 5.6.0 and it works (mostly) as
Lou> expected.
Lou> --I tried to use: perl -MCPAN -e 'install Some:Module' like I do on my
Lou> RH boxes. I did some very cursory reading on the topic via the man
Lou> pages but didn't see anything unusual. Anyway, it doesn't work. It
Lou> tells me essentially that I have broken Perl and I should really
Lou> consider making a new Perl. OK. I went to CPAN/Ports and looked up
Lou> OSX which said you have 5.6.0. No link to any .tar, or .src. And
Lou> Bundle::CPAN wouldn't load with the same errors.
Lou> --So the question is:
Lou> Does Perl think OSX is some unix and I should/can download any old
Lou> *nixy source and go to it from there or should I be looking for, doing
Lou> something else.
You should ask this question on the perl-macosx mailing list: see
lists.perl.org. Building Perl on OSX is a bit fragile, due to the
folded-case filesystem and the 10.1 monkeywrench of needing
-flat_namespace during compilation.
I've done it a few different ways, and I'm posting my results to the
perl-macosx list and answering questions there.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: 1 Nov 2001 10:57:44 -0800
From: nicktemple2000@yahoo.com (Nick Temple)
Subject: Re: Perl/CGI Search Script
Message-Id: <a9fe2341.0111011057.30e854e6@posting.google.com>
Leave that script alone, do want to end up looking like me?
"Matt" <pneumatus@NOSPAMhotmail.com> wrote in message news:<9rq15c$t19$1@neptunium.btinternet.com>...
> hi,
>
> that's the script that I have tried to modify most to perform what i want,
> but it replaces &'s with &
>
> i managed to cure that for the page it generates so it comes up as a link,
> but in the data file it produces, it still some up with & and all the
> keywords etc are the same as the initial cgi?whatever, not
> cgi?whatever&anotherwhatever .... if yoy know what i mean
>
> any ideas how to get around this problem?
>
> Matt
>
> "Gregory Toomey" <nobody@nowhere.com> wrote in message
> news:QJRD7.404$lh4.4678@newsfeeds.bigpond.com...
> > "Matt" <pneumatus@NOSPAMhotmail.com> wrote in message
> > news:9rnblg$458$1@plutonium.btinternet.com...
> > > Hi,
> > >
> > > I'm looking for a free search script written in perl/cgi. The thing is,
> I
> > > want one that can handle ? and &'s in urls as the site i need it for is
> > > totally CGI driven.
> > >
> > > I hope someone can point me in the right direction.
> > >
> > > Pneumatus®
> > >
> >
> > This is the one I use. Crawling can be run from the web or from a *nix
> > script.
> > http://www.xav.com/scripts/search/
> >
> > gtoomey
> >
> >
------------------------------
Date: 1 Nov 2001 10:54:11 -0800
From: nicktemple2000@yahoo.com (Nick Temple)
Subject: Re: Real quick: What is the Server Name?
Message-Id: <a9fe2341.0111011054.9fe312c@posting.google.com>
God, this is way to stupid a question to even answer.
jkindahouse@aol.com (jkindahouse) wrote in message news:<20011031185224.14892.00000557@mb-ff.aol.com>...
> I am training to configure Outlook to display the newsgroup and I need the
> Server Name. I've tried comp.lang.perl.misc and nmtp.comp.lang.perl.misc.
>
> Thanks.
------------------------------
Date: Thu, 01 Nov 2001 15:37:21 +0000
From: Graham Wood <Graham.T.Wood@oracle.com>
Subject: Re: Replacing a Character
Message-Id: <3BE16C31.EC023F78@oracle.com>
This is a multi-part message in MIME format.
--------------AA72B3513CE27B2F2A3EC9A2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Chris Intervolve wrote:
> $mystring = "12345671123421313455"
>
> How would I replace the "1" to something like "a"????
Depends on whether you want to replace all the "1"s with "a"s or all of
them or some subset of them.
Look up perldoc perlop and read the sections about the substitution
operator s/// and the transliteration operator tr///.
$mystring =~ s/1/a/g; # all of them
$mystring =~ tr/1/a/; # again all of them
$mystring =~ s/1/a/; # the first one
Graham Wood
--------------AA72B3513CE27B2F2A3EC9A2
Content-Type: text/x-vcard; charset=UTF-8;
name="Graham.T.Wood.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Graham Wood
Content-Disposition: attachment;
filename="Graham.T.Wood.vcf"
begin:vcard
n:;Graham
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:Graham.T.Wood@oracle.com
fn:Graham Wood
end:vcard
--------------AA72B3513CE27B2F2A3EC9A2--
------------------------------
Date: 1 Nov 2001 04:42:17 -0800
From: lasilasi@hotmail.com (joe dassin)
Subject: replacing many patterns at the same time without cross-interference
Message-Id: <c94426d.0111010442.2ea25ffe@posting.google.com>
Hello!
I'm working on a function highlighting specific words of a html
document in pretty colors, exactly as in a Google groups search.
I first had something like:
for ($n=0; $searched[$n]; $n++) {
$line =~ s/($searched[$n])/
<b style="background-color:#$color[$n]">\1<\/b>/ig;
}
which seemed to work fine, until I saw this problem:
If the words in @searched are, say, 'pretty' and 'background',
the second s/// will also replace the 'background' in
'style="background-color' of the tags highlighting 'pretty',
so I get something like:
<b style="<bstyle="background-color:#ffff00">background</b>
-color:#00ffff">pretty</b>
which isn't quite what I wanted. I also don't want to limit
the search to entire words by asking for a space before or after
the searched text.
The only solution I found (and that I'm currently using) is
to first bracket in the text all searched words by improbable
characters, which won't be modified by future s///,
and THEN replace the improbable characters by what I want. ie:
$endchar = chr(166);
for ($n=0; $searched[$n]; $n++) {
$line =~ s/($searched[$n])/chr(167+$n).$1.$endchar/eig;
}
for ($n=0; $searched[$n]; $n++) {
$beginchar = chr(167+$n);
$line =~ s/$beginchar(.*?)$endchar/
<b style="background-color:#$color[$n]">\1<\/b>/ig;
}
The first loop searches for usual characters and only adds
improbable ones, and the second searches for the improbable ones,
and replaces them by usual ones. So neither loop can interfer
with itself.
This works fine, and will probably do so until somebody tries
to search for chinese. I'm not worried. But I was wondering if
there was a simpler, quicker, cleaner way.
So. Any ideas? :-)
------------------------------
Date: 01 Nov 2001 17:51:23 +0000
From: nobull@mail.com
Subject: Re: replacing many patterns at the same time without cross-interference
Message-Id: <u91yji8jms.fsf@wcl-l.bham.ac.uk>
lasilasi@hotmail.com (joe dassin) writes:
> I'm working on a function highlighting specific words of a html
You need to be using the HTML parsing modules available from CPAN.
> which seemed to work fine, until I saw this problem:
Yep, processing HTML with plain 'ol regex will seem to work fine for a
while but it doesn't really.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: 1 Nov 2001 06:26:43 -0800
From: spiff_swipnet@hotmail.com (Emil)
Subject: Re: Sending commands (keyboard inputs) from a Perl-script to another process in linux?
Message-Id: <7c7e06b6.0111010626.2655765e@posting.google.com>
Ok, but I don't want to use any external module, except the ones
included in the system. I want the script to run on every system that
has perl, and everyone don't have root access.
Is there any other way? I'm scripting a web frontend for a program, so
the script will only be run for a short amount of time. The first time
it's executed it'll start the program (saving the pid), and the rest
of the time it'll parse commands from the user to the program process
(which thinks they are keyboard inputs).
Benjamin Goldberg <goldbb2@earthlink.net> wrote in message news:<3BD3C630.A093C2B@earthlink.net>...
> Emil wrote:
> >
> > Hi!
> > I was wondering if it's possible for a perl-script to send commands to
> > another process in linux? Like starting the process, then remote
> > controll it with keyboard inputs and then get the result?
>
> If it really and truly wants a keyboard, then you need a pty of some
> sort... one of IPC::Run, Expect, or IO::Pty might do what you want.
>
> If all you need to do is send to it's standard input and read from it's
> standard output, then IPC::Open2 is probably your thing.
------------------------------
Date: Thu, 01 Nov 2001 15:43:58 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Sending commands (keyboard inputs) from a Perl-script to another process in linux?
Message-Id: <slrn9u2olh.8bs.tadmc@tadmc26.august.net>
Emil <spiff_swipnet@hotmail.com> wrote:
>Ok, but I don't want to use any external module, except the ones
>included in the system.
Why not?
>I want the script to run on every system that
>has perl, and everyone don't have root access.
You do not require root access to install modules.
So the question above remains unanswered :-)
perldoc -q module
"How do I keep my own module/library directory?"
Of course you may have a really good reason for the "no modules"
rule, but you haven't shared a good one with us yet.
>Is there any other way?
Why insist on reinventing wheels?
If worst comes to worst, snatch the module source code and
embed it in your program.
If you "do it yourself" then you are the only one analysing the
code and using/testing it. If you use a module you have hundreds
(or thousands) of other people banging on it for you.
Lonesome you may miss something. Lots of people banging on it
is likely to uncover problems (so they can be fixed outside
of a "production" environment).
Rewriting existing functionality is the last resort, because you
are signing up for greatly increased development and testing
time (labor). Don't do that unless you truly have to.
[ snip upside-down quoted text ]
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 01 Nov 2001 12:42:39 +0000
From: nobull@mail.com
Subject: Re: sorting hash of hash by values
Message-Id: <u93d3yzmps.fsf@wcl-l.bham.ac.uk>
tvn007@hotmail.com (Tim) writes:
> Subject: sorting hash of hash by values
See FAQ: "How do I sort a hash (optionally by value instead of key)?"
> Here is my script:
Try to get into the "use strict", "use warnings" habit sooner rather
than later.
Oh, and you may want to take a look at IO::Tee.
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Thu, 1 Nov 2001 11:22:12 -0500
From: "Gonzago" <miele@canada.com>
Subject: Text Database
Message-Id: <PDeE7.3379$Bs2.131236@weber.videotron.net>
I wrote a script to store information in a text file, with
each variable delimited by ###. Now, the code is
supposed to write a line to the file, /n, and then write
a new line. Another code then takes that data and
creates a web page out of it.
The thing is, it works perfectly, but when I take a look
at the text file with all of the data, it's totally messed up!
The new data is added onto the end of SOME lines, but
not others. For others there are entirely new lines (how it's
supposed to be).
What I can't figure out is why it's writing the data like that,
and on top of that, how is my other code still capable of
deciphering all of the craziness? lol
Does it have something to do with the way UNIX handles
text files vs. Windows? (I'm viewing them with notepad, but
my website is on a UNIX server).
Gonz
------------------------------
Date: Thu, 1 Nov 2001 17:33:08 +0100
From: "Steffen Müller" <tsee@gmx.net>
Subject: Re: Text Database
Message-Id: <9rrtce$6gh$00$1@news.t-online.com>
"Gonzago" <miele@canada.com> schrieb im Newsbeitrag
news:PDeE7.3379$Bs2.131236@weber.videotron.net...
| I wrote a script to store information in a text file, with
| each variable delimited by ###. Now, the code is
| supposed to write a line to the file, /n, and then write
| a new line. Another code then takes that data and
| creates a web page out of it.
|
| The thing is, it works perfectly, but when I take a look
| at the text file with all of the data, it's totally messed up!
| The new data is added onto the end of SOME lines, but
| not others. For others there are entirely new lines (how it's
| supposed to be).
[...]
| Does it have something to do with the way UNIX handles
| text files vs. Windows? (I'm viewing them with notepad, but
| my website is on a UNIX server).
Could be. Depends on the way you download the text. If so, it's not a Pelr
question and doesn't belong here. If not, you'll have to post some example
code for us to have a look at.
Steffen
--
$_=q;0cb212c210b0bb010c0113bb0c410c0b516c0bb3d212c2b0b0b016b6cb2b2c21010c0
b41110b3bba0e0c0d2c4b2b6bc013d2c0d0b01012b0b0;;s/\n//g;s/(\d)/$1<2?$1:'0'x
$1/ge;s/([a-f])/'1'x(ord($1)-97)/ge;print"\n";$o=$_;push@o,substr($o,$_*8,
8)for(0..24);for(@o){print"\0"x(26-$i).chr(oct('0b'.($_)))."\n";$i++}#st_m
------------------------------
Date: Tue, 30 Oct 2001 16:45:09 -0800
From: "Swanthog" <lhswartw@ichips.intel.com>
Subject: variable number of socket descriptors
Message-Id: <9rnhim$9m5@news.or.intel.com>
I need to be able to use a variable number of socket descriptors in a module
I wrote that creates a socket connection. For example(doesn't work):
%socks;
$sock_n = 0;
...
socket( $socks{ $sock_n}->{ sock}, AF_INET, SOCK_STREAM, $proto) or die;
Know a way to do this?
Larry S.
------------------------------
Date: Wed, 31 Oct 2001 10:01:40 -0800
From: "Swanthog" <lhswartw@ichips.intel.com>
Subject: Re: Win32 Perl book/software suggestions?
Message-Id: <9rpea4$ntq@news.or.intel.com>
Frank,
If you want to write perl gui code look into perl/tk
http://w4.lns.cornell.edu/~pvhp/ptk/doc/. Documentation is online. Use the
news group comp.lang.perl.tk for help.
Larry S.
"Frank McKenney" <frank_mckenney@mindspring.com> wrote in message
news:9r97sq$a2o$1@slb6.atl.mindspring.net...
>
> A friend provided me with a lot of free assistance on a recent
> customer project. Using the principle that "no good deed goes
> unpunished" (;-), I'd like to put together a package to impress him
> with, and help him learn, Perl.
>
> He's fairly experienced in mainframe and desktop computer
> programming, all the way from APL and FORTRAN through various ASMs
> to his current "favorite" Clipper/FiveWin in the Win32 environment.
>
> I've been learning/using Perl under Linux (SuSE), but I know that
> ports are available for Win32. O'Reilly's "Learning Perl" is a good
> start, but (IMNSHO) it isn't enough in itself to really impress
> someone who is already doing GUI-based programming in another
> environment. Is there a "Perl/GUI for Win9x Programmers" out there
> that might offer this?
>
> He has occasionally mentioned a desire to move from Clipper to
> something else, but he's good enough with what he already knows that
> he'll be slow to learn something new unless the replacement offers
> clear advantages over what he's doing now. This is probably true of
> most of us (;-), but in this case I'm willing to invest some extra
> effort to make sure he gives Perl a good look.
>
> Any suggestions?
>
> How do you all go about impressing/educating co-workers and IT
> people of the advantages of Perl?
>
>
> Frank McKenney, McKenney Associates
> Richmond, Virginia / (804) 320-4887
> Munged E-mail: frank uscore mckenney aatt mindspring ddoott com
>
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 2048
***************************************