[9518] in Perl-Users-Digest
Perl-Users Digest, Issue: 3112 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jul 10 05:07:24 1998
Date: Thu, 9 Jul 98 20:00:18 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 9 Jul 1998 Volume: 8 Number: 3112
Today's topics:
Re: -w on production code (was Re: better way of gettin <mike.schleif@aquila.com>
Re: -w on production code (was Re: better way of gettin <ljz@asfast.com>
Re: -w on production code (was Re: better way of gettin <mike.schleif@aquila.com>
Re: -w on production code (was Re: better way of gettin <ljz@asfast.com>
Re: -w on production code (was Re: better way of gettin (Martien Verbruggen)
Re: -w on production code (was Re: better way of gettin (Abigail)
Re: -w on production code (was Re: better way of gettin <ljz@asfast.com>
Creating files problems. (CGI-Unix) <ggarces@arrakis.es>
Re: Directory Names with Perl for NT <ashtar@cranny.schnet.edu.au>
Re: Do I understand this? (Clinton Pierce)
environment-vars <Antje.Rau@erlm.siemens.de>
Re: Get IP Address for Server Name <"postmaster"@[127.0.0.1]>
Re: Get IP Address for Server Name <*@qz.to>
Re: good research methods WAS Re: on the fly subs with (Martien Verbruggen)
Re: How much space left on disk? (Martien Verbruggen)
Re: new charter and moderator for comp.lang.perl.announ <ismkoehlerism@nmism-us.campus.mci.net>
pattern matching results into an array Juli@my-dejanews.com
Re: perl 5.004.04 on AIX 4.2.1 <mdunn@ibm.net>
Question I can't find an answer for. jevon@my-dejanews.com
Re: Script to get all IP addesses in Router-Network <"postmaster"@[127.0.0.1]>
Re: using a variable only once chrishabs@my-dejanews.com
Win32 Perlscript registering as an ActiveX language <j_moyle@hia.net>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 10 Jul 1998 01:03:46 GMT
From: "Michael D. Schleif" <mike.schleif@aquila.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <35A567B5.B0FFD90A@aquila.com>
Clearly a boost to my confidence in -w . . .
Abigail wrote:
>
> $ chmod +x test.pl
> $ perl -wc test.pl
> test.pl syntax OK
> $ ./test.pl -a 1
> $opt_a NOT defined
> $
>
> Indeed. No warning. But the program isn't working properly.
--
Best Regards,
mds
mds resource
888.250.3987
"Dare to fix things before they break . . . "
"Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . . "
------------------------------
Date: 09 Jul 1998 21:03:54 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <ltlnq25xfp.fsf@asfast.com>
On NPGE - IV, abigail@fnx.com (Abigail) writes:
> Tina Marie Holmboe (tina@scandinaviaonline.se) wrote on MDCCLXXIII
> September MCMXCIII in <URL: news:6o257f$7dg$1@news1.sol.no>:
> ++
> ++ The company I work for have a set of programming guidelines. These
> ++ guidelines are for the most part ignored (another discussion), but what
> ++ is often *not* ignored is adding -w to production code.
> ++
> ++ *Lots* of our new programmers do that. But they don't add -w to their
> ++ *development* code.
>
> You need better guidelines, and a QA system.
There are some companies whose management has chosen not to pay for
such things, and although many of them suffer for this decision, there
are actually a few others who are quite successful doing this.
> ++ The process is something like this:
> ++
> ++ a) Develop something nifty. Don't bother with -w, 'cause they prolly
> ++ don't know about it anyway.
> ++
> ++ b) Put it in production - ohyes, the guidelines said to add -w, sure,
> ++ I can do that.
> ++
> ++ c) Walk away.
>
> I'm sorry, but I can't consider that a serious production environment.
> Just because you have incompetent coders working in your company isn't
> a reason to advocate not using -w.
But I actually know of companies where it was a conscious business
decision to hire one or two highly skilled programmers and to use
inexperienced, inexpensive people for the remainder of the programming
staff. Some of these companies actually are succeeding with this
strategy. The experienced people design the code and then farm most
of it out to the less-experienced people, who do a passable, but not
excellent, job of getting things working. When the really
hard-to-solve problems occur, one of the experienced people fixes it,
usually at the last minute under an oppressive deadline.
The experienced coders in these environments often *do* advocate
things like using `-w', but management doesn't always listen,
occasionally because they are making too much money *not* doing things
like that. One could validly argue that this is not a "serious
production environment", but I have actually seen cases the management
would totally agree and still not care because they are making plenty
of money following the status quo.
This kind of software-development environment is clearly not a good
idea from a doing-software-right point of view, but from the long-term
dollars-and-cents perspective of the company owners, it sometimes
actually works, believe it or not.
So ... the end result of this is that in a minority of cases (but
still a number of cases greater than zero), it turns out to be cheaper
to do things like leaving `-w' turned off in some of the Perl scripts,
at least during production runs. Sad, but true.
> ++ And yes, it scares me. More interesting a scenario is the following:
> ++
> ++ a) System programmer or system admin installs a new module.
> ++ b) The module sprouts warnings.
> ++ c) I used -w
> ++ d) I can't bloody debug my own script due to screefuls of warnings
> ++ from the *module*
> ++ e) I ask them to do something about the module
> ++ f) I am told to go fuck myself
>
> g) Don't use the module.
A high percentage of the time, suggestion `g' is a by far the best one
after `a' through `f' have taken place. But occasionally, it turns
out to actually be more cost effective, even in the long run, to use
the module with `-w' turned off than to try to find (and pay for!) the
available person-hours to design and write an alternative.
Once in a while, "second-best coding practices" are a viable solution,
especially when "best coding practices" end up costing a lot more time
and money.
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: Fri, 10 Jul 1998 01:23:52 GMT
From: "Michael D. Schleif" <mike.schleif@aquila.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <35A56C68.5CB0C134@aquila.com>
. . . and many people might first realize that it is THEIR CODE that
doesn't work, NOT Perl . . .
I see issues on both sides of this; but, the overwhelming volume of
noise on clpm is from newbies who really ought to see these messages!
I agree, the high and mighty need not be bothered with these hurdles;
but, they need not be bothered with the noise found herein so
objectionable. How long can you escape from reality by sidling over to
a moderated group, if you don't have the balls (sorry, Abigail) to set
newbies straight? Yelling at them, calling them names, insulting them
-- whence come tomorrow's (Perl) programmers, I ask you?
And, who knows, maybe -w, diagnostics and strict would actually be
fixed, and the kinks worked out, if more of you illuminati were bothered
by their oftimes ill behavior!
As it stands, they are only training wheels. The grand derby winners
don't have time to add -W (can somebody count those extra characters for
me?) or somesuch, to their code to turn it OFF, much less fix the few
erroneous warnings in Perl source.
I, for one, fear for the future . . .
Craig Berry wrote:
>
> Just possibly, some questions would not get asked, as people would be
> forced to see the warnings explaining why their programs aren't behaving
> as they expect. Conversely, depending on your ambient cluefulness
> estimate, the questions might instead simply transogrify into "Why am I
> getting this warning?".
--
Best Regards,
mds
mds resource
888.250.3987
"Dare to fix things before they break . . . "
"Our capacity for understanding is inversely proportional to how much we
think we know. The more I know, the more I know I don't know . . . "
------------------------------
Date: 09 Jul 1998 21:29:37 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <ltg1ga5w8u.fsf@asfast.com>
gorilla@elaine.drink.com (Alan Barclay) writes:
> In article <ltk95n7u24.fsf@asfast.com>, Lloyd Zusman <ljz@asfast.com> wrote:
> >On NPGE - V, Randal Schwartz <merlyn@stonehenge.com> writes:
> >> Just think of it as "two perls in one". :-)
> >
> >In an earlier message, I wondered if perhaps one of the reasons for
> >the non-manditoriness and non-defaultness of `-w' might be because of
> >a possible difference of opinion about it among the Perl developers.
> >I guess that this is indeed the case.
> >
>
> Why not keep everyone happy, and make a -W option, for no-warnings,
> and make it a compile time option if -w or -W is the default.
>
> [ ... ]
>
> Any problems with this approach?
I, for one, think that it's a postively wonderful idea!
This indeed could answer the objections and satisfy the requirements of
people on each side of this issue. It looks like it would be one of
those proverbial "win-win situations", and those always appeal to me.
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: 10 Jul 1998 01:25:26 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <6o3qi6$8r5$3@comdyn.comdyn.com.au>
In article <lt67h77krj.fsf@asfast.com>,
Lloyd Zusman <ljz@asfast.com> writes:
> Entering a `local $opt_a;' also eliminates the warning, and it takes
> care of the case you're referring to.
So does a second use of $opt_a somewhere in your program. But the
point is that the vars pragma has been specifically created for this
task. my and local are designed to do something else. There are many
ways one can get rid of that warning. Many of those ways will result
in the correct program behaviour. But the best way in this case is
probably by using the things that were intended for this.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: 10 Jul 1998 01:47:19 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <6o3rr7$n04$1@client3.news.psi.net>
Michael D. Schleif (mike.schleif@aquila.com) wrote on MDCCLXXIV September
MCMXCIII in <URL: news:35A56C68.5CB0C134@aquila.com>:
++
++ I agree, the high and mighty need not be bothered with these hurdles;
++ but, they need not be bothered with the noise found herein so
++ objectionable. How long can you escape from reality by sidling over to
++ a moderated group, if you don't have the balls (sorry, Abigail) to set
++ newbies straight? Yelling at them, calling them names, insulting them
++ -- whence come tomorrow's (Perl) programmers, I ask you?
Yelling, calling names and insulting might work to train animals,
children and soldiers, but not humans.
If someone needs those methods to become a programmer, don't bother.
Abigail
--
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=>0=>0
=>I=>$r=-2449231+gm_julian_day+time);do{until($r<$#r){$_.=$r[$#r];$r-=$#r}for(;
!$r[--$#r];){}}while$r;$,="\x20";print+$_=>September=>MCMXCIII=>()'
------------------------------
Date: 09 Jul 1998 22:19:13 -0400
From: Lloyd Zusman <ljz@asfast.com>
Subject: Re: -w on production code (was Re: better way of getting the last modified file?)
Message-Id: <lt4swq5ty6.fsf@asfast.com>
mgjv@comdyn.com.au (Martien Verbruggen) writes:
> In article <lt67h77krj.fsf@asfast.com>,
> Lloyd Zusman <ljz@asfast.com> writes:
> > Entering a `local $opt_a;' also eliminates the warning, and it takes
> > care of the case you're referring to.
>
> So does a second use of $opt_a somewhere in your program. But the
> point is that the vars pragma has been specifically created for this
> task. my and local are designed to do something else. There are many
> ways one can get rid of that warning. Many of those ways will result
> in the correct program behaviour. But the best way in this case is
> probably by using the things that were intended for this.
I'm glad you said "probably", because I believe it's the strongest
statement that can be made about this. As we all know, many Perl-ish
things can be written in a number of ways and still work properly.
Another way that works in the original script I posted was to simply
leave out the `-w' switch, and that was my original point. Whether or
not this is "correct" is a matter of debate, and in the case I posted,
it actually did no harm. There is a minority of cases where leaving
`-w' out is perfectly fine.
For those who want to take advantage of the benefits of using things
like `-w' and `use strict;', by all means use them. But I'm glad that
they're options (or if they were to ever become defaults, that they
could be turned off), since once in a while, some of us actually want
to exercise the option of not using them.
--
Lloyd Zusman ljz@asfast.com
perl -e '$n=170;for($d=2;($d*$d)<=$n;$d+=(1+($d%2))){for($t=0;($n%$d)==0;
$t++){$n=int($n/$d);}while($t-->0){push(@r,$d);}}if($n>1){push(@r,$n);}
$x=0;map{$x+=(($_>0)?(1<<log($_-0.5)/log(2.0)+1):1)}@r;print"$x\n"'
------------------------------
Date: Thu, 9 Jul 1998 17:53:52 +0200
From: "Guillermo Garcis" <ggarces@arrakis.es>
Subject: Creating files problems. (CGI-Unix)
Message-Id: <35a4ed99.0@news.arrakis.es>
I have been trying to create files with this command: open(NEW,">$file") or
open(NEW,"+>$PAGE"), but it doesn4t work. I don4t know if i have to give
some permissions to can to create files.
Thanks.
------------------------------
Date: 10 Jul 1998 02:33:51 GMT
From: MindSync Labs <ashtar@cranny.schnet.edu.au>
Subject: Re: Directory Names with Perl for NT
Message-Id: <6o3uif$vcc$1@towncrier.cc.monash.edu.au>
Try putting quotes around the file names.
eg. $filename = '"file name"';
eg. $filename = "\"file name\"";
"Pete Keefe" <pkeefe@ix.netcom.com> writes:
> XCOPY32 instead of XCOPY.
> Jeff Lockard wrote in message <35A2AF16.6F93D0CE@rwd.com>...
> >Hi -
> >
> >I am trying to write some simple scripts that will recursively move
> >files and subdirectories from one server to another. I am not a Perl
> >expert and have been using the SYSTEM command to shell out to use the
> >DOS copy, xcopy, and move commands.
> >
> >The problem that I keep running into is that the folders and files may
> >have spaces in the names which tend to mess up the DOS commands (even on
> >
> >NT!). Long names are fine, but a space causes the DOS commands to fail.
> >
> >Does anyone know of a Perl module/extension that will allow me to do
> >this?
> >
> >Thanks for any help...
> >Jeff Lockard
> >RWD Technologies, Inc
> >
>
>
------------------------------
Date: Fri, 10 Jul 1998 01:58:04 GMT
From: fubar@ameritech.deleteme.net (Clinton Pierce)
Subject: Re: Do I understand this?
Message-Id: <35a6bb5d.767573133@wingate>
On 8 Jul 1998 21:48:35 GMT, Scratchie <upsetter@ziplink.net> wrote:
>Tom Christiansen <tchrist@mox.perl.com> wrote:
>: In comp.lang.perl.misc,
>: geiger@cs.ucdavis.edu (Phillip George Geiger) writes:
>: :I want to put some advertising banners on my web site.
>
>: Gosh, that'll sure win you a lot of friends.
>
>What planet do you live on?
Earth. Not perl related, so the followups have been reset.
ObHack:
To eliminate those pesky ads, which often cause web-pages to
take ENTIRELY too long to load:
1. On machine you wish to cleanse, put in a host
entry for your favorite advertising site:
127.0.0.1 ad.doubleclick.net
2. On localhost (or wherever you redirected the ad to)
simply run a web server which either a. denies the
request or b. fufills it with some extremely low-bandwidth
substitute. Nutrasweet advertizing!
Remove something from the address to reply in E-Mail.
Damned spammers...
------------------------------
Date: Thu, 09 Jul 1998 11:48:30 +0200
From: Antje Rau <Antje.Rau@erlm.siemens.de>
Subject: environment-vars
Message-Id: <35A491EE.30F5F6CE@erlm.siemens.de>
hi,
how can i get the following result:
shell#: echo $TEST
TEST: Undefined variable
shell#: <perl-script>.pl
shell#: echo $TEST
testvar
shell#:
regards,
antje
------------------------------
Date: Thu, 09 Jul 1998 20:57:03 -0500
From: postmaster <"postmaster"@[127.0.0.1]>
Subject: Re: Get IP Address for Server Name
Message-Id: <6o3sfk$9b4$1@farstar.frb.gov>
#!/usr/local/bin/perl -w
use diagnostics;
$ip_addr = `nslookup $ARGV[0]`;
print "`nslookup $ip_addr\n";
# works on Solaris 2.5.1, perl 5.00403; s/b OK on NT too.
(if replying via email, use "bobn at interaccess dot com")
Matthew Feinberg wrote:
> Hi,
>
> Does anyone have a script that will get the IP address for a servername
> given.
>
> i.e.
>
> ./findip server.somedomain.com
>
> returns ip address i.e. 209.191.4.200
>
> Thanks
------------------------------
Date: 10 Jul 1998 02:39:04 GMT
From: Eli the Bearded <*@qz.to>
Subject: Re: Get IP Address for Server Name
Message-Id: <eli$9807092238@qz.little-neck.ny.us>
In comp.lang.perl.misc, "bobn at interaccess dot com" wrote:
> #!/usr/local/bin/perl -w
>
> use diagnostics;
>
> $ip_addr = `nslookup $ARGV[0]`;
> print "`nslookup $ip_addr\n";
>
> # works on Solaris 2.5.1, perl 5.00403; s/b OK on NT too.
If you think that works, you did not test it enough under enough
situations. nslookup must be on the PATH, must be executable, and
then will only give names found via DNS, ignoring those from /etc/hosts
or NIS.
:r! perl -e '@a=unpack"C4",gethostbyname(shift);$\="\n";$,=".";print@a' qz.to
204.141.4.65
Elijah
------
just created an alias doing roughly this task this morning
------------------------------
Date: 10 Jul 1998 01:20:11 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: good research methods WAS Re: on the fly subs with special tag markers
Message-Id: <6o3q8b$8r5$2@comdyn.comdyn.com.au>
In article <6o2ku4$p46$1@usenet1.interramp.com>,
"Mark Stang" <mark$$$stang@ncgroup.com> writes:
> I fully expect to be flamed for this, but is there a cross referenced,
> indexed, searchable, hyperlinked version of the perl docs? I don't mean the
> html docs that cone with the distribution. As a newbie I find it very
> difficult to use these docs. What I am looking for (and this is what expect
> to be flamed for) is a winhelp file with th documentation, or even better, a
> prog to create a winhelp file from the existing docs.
There was a discussion about the format of the documentation not too
long ago, a few weeks or so. You should be able to easily track down
that long thread on www.dejanews.com. It contains many opinions and
many pointers to these things.
http://www.perl.com/ has a set of documentation as HTML, although it
is slightly out of date. I have heard from one of the MS users here
that they downloaded some Windows help file with the perl man pages,
but I don't know from where. You migth want to check out ActiveState's
pages.
pod was created to have a light weight platform independent means of
documentation for perl. The fact that there is no pod2winhelp
translator just means that no one has taken the trouble of writing
one.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Very funny Scotty, now beam down my
Commercial Dynamics Pty. Ltd. | clothes.
NSW, Australia |
------------------------------
Date: 10 Jul 1998 01:16:47 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How much space left on disk?
Message-Id: <6o3q1v$8r5$1@comdyn.comdyn.com.au>
In article <6o2m6c$beh$2@nz12.rz.uni-karlsruhe.de>,
Marc.Haber-usenet@gmx.de (Marc Haber) writes:
> mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>>You can use www.dejanews.com.au to read some of them.
> ^^^^ really?*grin*
Whooops :) sorry. www.dejanews.com of course.
>>Maybe a call to quota and df might be easier to implement. Just as
>>unportable of course.
>
> Doesn't look satisfying. *shrug*. Simply, too bad :-(
I know. It's something that many people are always disappointed about,
but there's simply not much one can do about it. This like statfs()
and readdir() are not part of standard C for nothing.
They're just too different on different architectures, and cannot
always be turned into something meaningful by an abstracted interface
call. So they end up being system specific calls, or are wrapped in
things like the POSIX standard.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | I took an IQ test and the results were
Commercial Dynamics Pty. Ltd. | negative.
NSW, Australia |
------------------------------
Date: Thu, 9 Jul 1998 19:49:24 -0600
From: "Rick K" <ismkoehlerism@nmism-us.campus.mci.net>
Subject: Re: new charter and moderator for comp.lang.perl.announce
Message-Id: <6o3t16$ohh$1@news.campus.mci.net>
John D Groenveld wrote in message <6o3b93$c7l$1@tholian.cse.psu.edu>...
>I like the current charter and Randal has done a fine job moderating
>the group. Let the commercial interests advertise in the Perl Journal
>or some other median.
I guess I sorta kinda agree with Mr. Groenveld.
It seems there's an incredible can of worms opened when c.l.p.a. is opened
to commercial announcements. Will it take the wisdom of Solomon, or an army
of attorneys to fully plumb the intricacies of so doing?
You sure hate to stifle some innovative person's quest for developing and
providing a great tool for perl folk, but then again, I see enough
unsolicited
email and postings as it is. if one could say "Okay, you're some one person
shop slaving lovingly over your code, let's provide some exposure" ... but
Then, how do you decide to make the cut between cute little struggling
coder and big nasty mega-conglomerate? We may intuitively know the
difference, but if legality becomes an issue, it must be done in a logical,
formal manner, open to no subjectivity IMHO.
This is probably going to be one of those things that has good points
aplenty
on both sides, and compromise rears its' head. For me, if I want to *buy*
a perl product, I'll seek out commercial sources in the usual places.
Wait a minute, did I just say "Buy a perl product"? .... Hmmmmmmm.
------------------------------
Date: Fri, 10 Jul 1998 01:00:10 GMT
From: Juli@my-dejanews.com
Subject: pattern matching results into an array
Message-Id: <6o3p2p$4ti$1@nnrp1.dejanews.com>
unless (open (BOOK, "book.pl")){
die ("can't open the file $!");
}
$this = bob;
$that = jane;
while ($line = <BOOK>) {
if ( ($line =~ $that) ||
($line =~ $this) )
{
## $line = @theory; ##
}
}
What I am trying to do is read a file, line by line.
If either pattern is matched anywhere on that line,
I want to keep that line.
I would like to put the line in an array, but I'm not sure if this
is possible and/or the best solution.
All the scripts I see just print out " pattern found ", if there was a match.
Either way, I want to keep the entire line for processing later.
I would also like to try avoiding writing the lines to a new file.
Thanks,
Juli
Juli@my-dejanews.com
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 9 Jul 1998 21:47:09 -0400
From: <mdunn@ibm.net>
Subject: Re: perl 5.004.04 on AIX 4.2.1
Message-Id: <35a572e8.0@news1.ibm.net>
I had the same problem and never got it to work with gcc 2.8.1 and had to
use AIX's C compiler, running on 4.2.1.
Does anyone know if dynamic loading of Perl modules works at all with AIX.
When I tell it to "use IO::Sockets" (or any module, for that matter), it
says it can't find the module??
Thanks,
Mike D.
Hervi CHIBOIS wrote in message <35A3DD20.49D69F41@capway.com>...
>Hi Darren
>
>Darren Henderson a icrit:
>
>> I'm having some trouble getting perl 5.004.04 to compile under AIX 4.2.1.
>>
>
>AIX has a serious pb w/ dynamic loading. If you use GCC with AIX LD, don't
think
>ofusing dynamic loading w/ Perl.
>If you managed to get GCC compile with its own ld, you should be on the
right way.
>
>Personnaly, i did not manage to.
>
>Herve
>
------------------------------
Date: Fri, 10 Jul 1998 00:33:04 GMT
From: jevon@my-dejanews.com
Subject: Question I can't find an answer for.
Message-Id: <6o3ng0$3t9$1@nnrp1.dejanews.com>
I have just begun to script in perl. I am trying to make a CGI application
(This is a perl question) that will replace all instances of $name with $value
{$name} in a template HTML file.
I beleive this should be able to be done in two foreach loops
I have read the template file into the @lines variable
eg.
foreach $lines (@lines) {
foreach $name (@name) {
($line) = $lines =~ s/$name/$value{$name}/ig;
}
}
Can anyone help me.
I short I just want to read in a form and replace any occurances of a form
feild's name with it's value..
Thanks.
Jevon.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 09 Jul 1998 21:09:19 -0500
From: postmaster <"postmaster"@[127.0.0.1]>
Subject: Re: Script to get all IP addesses in Router-Network
Message-Id: <6o3t6k$9b4$2@farstar.frb.gov>
In general, Martin is right, but a good approximation can be gotten, over time,
by going to the routers and downloading their arp tables. I use scripts (I
wasn't proficient in per at the time) to go to each router in the network, ping
the broadcast address (255.255.255.255), then retrieve the arp tables. The
broadcast ping seems to help, even tho my router's set not to timeout the arp
cache for 4 hours.
Acumulate this over a period of a couple weeks (plus 1 business day, to flush
out vacationers), aggregate it and throw out the duplicates and you're home
free. (Unless you use DHCP with a short lease, in which case you go crazy. We
use 30 days.)
- Bob N. (newly converted perl lover)
(if replying via email, please use "bobn at interaccess dot com")
Martien Verbruggen wrote:
> And of course, this script only tells you which machines respond to a
> ping at the moment that your script runs. Not really which IP
> addresses have or have not been allocated.
>
> The only way to reliably do that is to keep a database of allocated IP
> addresses.
>
> Martien
> --
> Martien Verbruggen |
> Webmaster www.tradingpost.com.au | Hi, Dave here, what's the root
> Commercial Dynamics Pty. Ltd. | password?
> NSW, Australia |
------------------------------
Date: Fri, 10 Jul 1998 01:25:53 GMT
From: chrishabs@my-dejanews.com
Subject: Re: using a variable only once
Message-Id: <6o3qj2$638$1@nnrp1.dejanews.com>
In article <01bdab73$dae87ca0$915c5093@lfalkenhagen.dhs.state.tx.us>,
"Lee Falkenhagen" <falkenl@hotmail.com> wrote:
> In my main program, I declare several global variables such as
> $::CURDAY = "4/1/98";
>
> If I do not use that variable anywhere else in the main program, but, do
> use it in a function I call, I get the following error:
>
> Name "main::CURDAY" used only once: possible typo at ./irsbatch.pl line 35.
>
> Is there a way to get rid of this error?
> --
> Lee Falkenhagen
> Certified Sybase DBA
>
Check out the docs on "use vars"
Chris H.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Thu, 9 Jul 1998 20:09:44 -0500
From: "Joe Moyle" <j_moyle@hia.net>
Subject: Win32 Perlscript registering as an ActiveX language
Message-Id: <35a569a8.0@news.hia.net>
I have an MS application that allows some scripting. It has VBScript and
JavaScript built in but also has an <other> option where the docs say you
can choose a registered Active Scripting language such as PerlScript or
Python. I installed Perl v3.16 from the ActiveState site. I have installed
PerlScript v3.16 from the ActiveState site. I notice in the release notes
it says they added additional registry entries for Active Scripting. Now
when I type PerlScript into the <other> dialog box so that I can use it as
my Active Scripting language of choice I wind up getting the message that it
is not a registered Active Scripting language. Have any of you had this
problem and do you know what registry entries I might need to change in
order to properly register it. The machine I am working on has NT 4.0 as
the operating system.
--
Joe Moyle
j_moyle@hia.net
------------------------------
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 3112
**************************************