[8416] in Perl-Users-Digest
Perl-Users Digest, Issue: 2033 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 5 13:08:32 1998
Date: Thu, 5 Mar 98 10:00:23 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 5 Mar 1998 Volume: 8 Number: 2033
Today's topics:
Re: Are perl $SIG{} handlers inherently unsafe? <jdporter@min.net>
automated updates (Lalit Jairath)
BIG integers <jrhay@lanl.gov>
commandline arguments win32? <syrnyk@cadvision.com>
Re: Displaying subdirectories and not filenames <tchrist@mox.perl.com>
enviornment vars, need help Please (Ryan McGuigan)
Re: Example for use Win32::NetResource::AddConnection (Nick Tonkin)
Re: Formatting telephone numbers - How to? <dballing@speedchoice.com>
How to use Perl Hashes? sspiegle@crcg.edu
Re: Java & Perl which run faster on Unix? (Elf Sternberg)
Re: managing databases in perl schwern@starmedia.net
Re: perl Net:DNS module (Michael Fuhr)
Re: perl Net:DNS module <GGapinski@riser.eds.com>
Re: Perl win 32 absolute path probs <camerond@mail.uca.edu>
RegEXP HELP NEEDED <george.sko@athena2000.it>
RegEXP HELP NEEDED <george.sko@athena2000.it>
Socket/inet_aton.pm not found in AIX 4.1.3 build (IO::S (Mike Ellwood)
Variable interpolation in a file (123) (Nick Halloway)
Re: Variable interpolation in a file (123) (Nick Halloway)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 05 Mar 1998 11:52:43 -0500
From: John Porter <jdporter@min.net>
Subject: Re: Are perl $SIG{} handlers inherently unsafe?
Message-Id: <34FED85B.12E5@min.net>
Gabor wrote:
>
> In comp.lang.perl.misc, Randal Schwartz <merlyn@stonehenge.com> wrote :
> #
> # Of course, even if it *was* safe, it's dangerous code.
> #
> # Two SIGCHLDs could come in before it's your turn for CPU (like when
> # two kids croaked while you were out of the run queue). So the
> # "SIGCHLD pending" bit gets set. Yes. A bit. So when your CPU slice
> # comes up, you take *one* trip through the handler. You've waited for
> # *one* child, but two were actually waiting. Now you've got a zombie.
> #
> # Dangerous Code. Don't do this.
>
> Is this only true for Perl? In C I can use sigaction and block
> signals, the kernel queues them, while I am in the handler.
The danger is not in when you're in the handler, it's when you're
blocked (not in the run queue).
John Porter
------------------------------
Date: 5 Mar 1998 15:55:27 GMT
From: ljairath@wright.aps.uoguelph.ca (Lalit Jairath)
Subject: automated updates
Message-Id: <6dmhtf$jm3@ccshst05.uoguelph.ca>
Hallo Everybody,
how can i automate the updates in the file e.g, if the current month is
April, the text in a file with month as March gets updated to
April everywhere in the file on the 1st day of current month.
Also, how can i automatically send the updated info 1st day of each month
for example using anonymous ftp.
your help is greatly apprciated.
Thanks.
Lalit
~~~~~
PS: you may please e-mail me at ljairath@wright.aps.uoguelph.ca
------------------------------
Date: Thu, 05 Mar 1998 10:29:19 -0700
From: Jeff Hay <jrhay@lanl.gov>
Subject: BIG integers
Message-Id: <34FEE0EF.5A5203E9@lanl.gov>
I'm working on a reporting system based in Perl, for which I need to add
really big integers - the results of these additions overflow the
integer range of my version of Perl (running on SunOS). Does anybody
know of a module, etc, for handling BIG integer numbers with Perl?
Would be good...
Thanks,
-Jeff Hay
------------
Jeff Hay, jrhay@lanl.gov
Los Alamos National Laboratory
------------------------------
Date: Thu, 05 Mar 1998 10:00:11 -0700
From: syrnyk <syrnyk@cadvision.com>
Subject: commandline arguments win32?
Message-Id: <34FEDA1B.542C58C3@rocketmail.com>
I'm just learning perl and have tried to find a answer to this problem
in the faq's, nevertheless, I am still wondering what the best way to
provide command line arguments to a perl script called on a win32 system
is.
What are the options?
thanx in advance.
------------------------------
Date: 5 Mar 1998 17:30:09 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Displaying subdirectories and not filenames
Message-Id: <6dmnf1$5dg$1@csnews.cs.colorado.edu>
I don't appreciate the stealth CC. You sent me a mail copy and
didn't admin it.
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Koos Pol <koos_pol@bigfoot.com> writes:
:Communciator is what I have been given by our admins.
:Nothing much I can do about it.
Then you're screwed. As I said, get a real newsreader. Without one,
you cannot participate in a forum where word wrapping *BREAKS CODE*.
Don't do it.
Don't just accept whatever crapware somebody else is shoving down your
throat. Take charge of your own life. Don't whine that your
admin made you do it. Get a real newsreader. Or find a BBS.
:Besides, why is so costly about pressing DEL 20 times at the end of
:the line for joining with the next?
What a crazy idea! You cannot know where things need joining.
:BTW, Do I need to forward your "sick and perverse" remark to our
:sysadmins, or can I leave it with this?
Feel free.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
X-Windows: Form follows malfunction.
--Jamie Zawinski
------------------------------
Date: 5 Mar 1998 17:13:11 GMT
From: ryan@mail.ramresearch.com (Ryan McGuigan)
Subject: enviornment vars, need help Please
Message-Id: <6dmmf7$qh4$1@news.fred.net>
Hi, I have a question that I hope is pretty simple, I did check the FAQs,
so don't yell at me if it is in one somewhere... I need to be able to set
an enviornment var, and execute another program so it can see it. I've
tried a few things already...
I've tried using
use Env qw(MYVAR);
$MYVAR = "test";
system('program');
program will return the MYVAR env variable, but it's always empty. I've
tried setting, $ENV{'MYVAR'} = "test", but that doesn't work either.
Something like this has got to be simple! I'm pulling my hair out, please
help me before I'm bald ;-) A CC to ryan@ramresearch.com would really
help to... if it's not too much to ask.
thanks,
Ryan McGuigan
------------------------------
Date: Thu, 05 Mar 1998 17:14:21 GMT
From: nick@ciof.sbcc.net (Nick Tonkin)
Subject: Re: Example for use Win32::NetResource::AddConnection
Message-Id: <34fedd55.431013825@news.silcom.com>
Many thanks for sharing your example. I can connect to a shared drive
now. Now I need to connect to a network printer -- I can connect it to
LPT1 or whatever with no problem, but there should be a way to simply
connect and have the printer installed (drivers and all) -- I say this
because I currently use a KiXtart script that does this. The printer
is a LaserJet 5M and I am running JetAdmin on the server; in teh
KiXtart script the command is simply AddPrinterConnection or something
like that and the printer is connected and installed on the
workstations. But KiXtart is a binary so I can't see the guts of what
it is doing, and have found no documentation from HP on command line
connection instructions. Any ideas?
Nick
On Wed, 04 Mar 1998 20:44:06 GMT, drummj@mail.mmc.org (Jeffrey R.
Drumm) wrote:
>On Wed, 4 Mar 1998 16:49:30 +0100, "Burkhard Kiesel"
><burkhard.kiesel@med.siemens.de> wrote:
>This works on my system (with the password and username suitably changed), but
>don't ask me why:
------------------------------
Date: Thu, 05 Mar 1998 11:38:48 -0600
From: Derek Balling <dballing@speedchoice.com>
Subject: Re: Formatting telephone numbers - How to?
Message-Id: <A8B810739219C42D.BD484A50D9628E11.9C5067ACAF1F80D9@library-proxy.airnews.net>
Joanne James wrote:
>
> Hi. I'm helping out on a project using Perl and am learning as I go. I've
> been trying to show telephone numbers (numbers only are stored on database
> -no
> dashes) on an html page with dashes inserted. The database contains both
> US and international phone numbers. I want to put in dashes as in the
> following:
> 999-999-9999 in all cases.
Just curious, but why would you want to force NANPA "looks"
to numbers which AREN'T part of NANPA? That doesn't seem to
make much sense. I mean, I'm a `Merkin and all, but isn't it
awful ethnocentric to say "this is the only way to write a
phone number"?
------------------------------
Date: Thu, 05 Mar 1998 11:19:21 -0600
From: sspiegle@crcg.edu
Subject: How to use Perl Hashes?
Message-Id: <6dmmpb$2ct$1@nnrp1.dejanews.com>
Hi,
I'm a newbie perl programmer tyring to learn about what hashes are and how to
use them. I couldn't open a link to a PERLFAQ7 link on the web that I located
via a search. Can someone point me to a good link for that? Also, has any one
seen a good tutorial that deals with this? I'm trying to created a data store
in a Perl program and wanted to either make structures or class-like objects
that I could instantiate to hold data values coming in from html forms
Thanks, Scott
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 5 Mar 1998 16:34:54 GMT
From: elf@halcyon.com (Elf Sternberg)
Subject: Re: Java & Perl which run faster on Unix?
Message-Id: <6dmk7e$u6u$1@brokaw.wa.com>
In article <01bd47ff$4de185e0$735d0da3@collier.tku.edu.tw>
"Collier Cheng" <blueshel@ms2.seeder.net> writes:
>Java and Perl ...........Which run faster on Unix?
Well, that depends on what you mean by "faster." Doing
what? I did a string-search once using a variety of tools and
languages just out of my own curiosity (it was 'find all the
instances of this GET command in a 200 megabyte webserver log').
The results were enlightening. In C, using gets() and strstr(),
about 9 seconds; C++ using iostreams and the libg++ strings,
about 11 seconds; GNU grep, 14 seconds; perl regex's, about 19 seconds;
python regex's, about 21 seconds. TCL, 33 seconds. Objective-C
using GnuStep, 35 seconds (but it has all the debugging on 'cause
it's beta code). Java, 9 MINUTES.
Sparc 5, 77 Mhz, 64M, Solaris 2.5.1.
But that's just string searches. There must be SOMETHING
out there Java does better than other languages, SOMETHING that
can be written quicker and cleaner ('clean is a management issue!')
than in other languages. But I don't know what. Truth to tell,
I'm learning Java but only 'cause it'll look good on a resume'.
Elf
--
It is forbidden to laugh again Elf M. Sternberg
We maim our joys or hide them www.halcyon.com/elf
Horses are made of chromium steel
And little fat men shall ride them. - T.S. Eliot
------------------------------
Date: Thu, 05 Mar 1998 11:15:45 -0600
From: schwern@starmedia.net
To: ajm@antopia.com
Subject: Re: managing databases in perl
Message-Id: <6dmmii$248$1@nnrp1.dejanews.com>
There are three (well, four) approaches, in order of complexity and
efficiency.
To start with the 1st... ignore it and hope it keeps working, while popular
with ostraches, most webmasters and many politians, isn't very good.
2nd: Use the Sprite module to provide you with a more organized (SQL)
interface to your current deliminated text database. While this will not
improve performance (much) it will improve your general sanity when trying to
make modifications to your program. Sprite will work find for hundreds to
thousands of records.
3rd: Restructure your data into a DBM or DB file. Essentially, a hash on
disk (although Berkley DB is a bit more complicated than this.) Look at the
AnyDBM_File module, any of the other *DBM_File modules and at DB_File. Also,
look into the MLDBM module available from CPAN which works something like...
use MLDBM;
tie %classifieds, ...DBM stuff...;
# Print the name of the person who posted classified #1039
print $classifieds{1039}{'firstName'}, " ",$classifieds{1039}{'lastName'},
"\n";
# Add a middle initial.
$classifieds{1039}{'middleInitial'} = 'G';
That's an over simplification, but you get the idea. MLDBM is a nice, sane,
relatively efficient step up from flat files. MLDBM will work find for
thousands to tens of thousands of records.
4th: This is the pen-ultimate step. The Big Leagues....
Use a -REAL- database! Invoke the names of Oracle, Sybase, Solid! Perl
provides a simple interface to just about any database you might care to use.
use DBI;
# Connect to your database and insert a new classified for Ed Feldman.
my $dbh = DBI->connect(DBI_DATA_SOURCE, DBI_USERNAME, DBI_PASSWORD);
$dbh->do(q|
INSERT INTO classifieds (LastName, FirstName)
VALUES (Feldman, Ed)
|
) || die "Do failed, $DBI::errstr";
That "INSERT INTO" stuff is SQL, the less than romantic language of
databases. Its really simple. "SQL For Dummies" is probably all you really
need to pick it up.
A database is the most efficient, robust, scalable, etc... way to do things.
Unfortunately, this usually goes hand in hand with thousands and thousands of
dollars. However, altruism, being alive and well in the minds of thousands
and thousands of programmers, there are plenty of free alternatives, namely
PostgreSQL, mySQL and miniSQL.
For info on DBI have a look at...
http://www.hermetica.com/technologia/perl/DBI/index.html
That's the quick sum up of your options. Ya know... this should probably be
made part of the FAQ or something.
In article <6dkvnv$fka$1@nnrp1.dejanews.com>,
NOSPAMajm@antopia.com wrote:
>
> I have a site which offers classified ads. I store the ads in a
> tab-delimited text-file database, one entry on each line. The
> on-line perl scripts used by visitors for adding, modifying, viewing,
> and deleting the ads all just basically read the datafile (having opened and
> locked it) into an array, find and process the appropriate line(s), and then
> resave the array overwriting the file. The setup works great and seems
> robust - the issue now is that there are over 800 lines in the array and
> it's getting bigger every day! I'm worried that the datafile will get
> so big it will become unwieldy, but I have no idea what this limit is.
> Is this setup going to continue to work, or is there a different
> approach I could take? One way I've though of is to split the database
> into several smaller files which would limit the filesize but would make
> datafile management a little more complicated. Any advice would be
> appreciated. Please cc email to ajm@antopia.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: 5 Mar 1998 10:14:26 -0700
From: mfuhr@dimensional.com (Michael Fuhr)
Subject: Re: perl Net:DNS module
Message-Id: <6dmmhi$923@flatland.dimensional.com>
"Dan Cox" <dcox@lexmark.com> writes:
> when you do a nslookup in interactive mode you can do a
> ls <domain> and list all the IN A records in a domain. I want to do this
> from perl Net:DNS. I played with it some and cannot figure out
> how to do this. Can this be done? I also tried to just do it all
> from the command prompt with nslookup and can not figure that out
> either. I am sure someone has done it. If you do know how please
> send a email to dcox@lexmark.com.
What did you try that didn't work? What exactly happened when you
tried? Did you see the examples in the Net::DNS and Net::DNS::Resolver
manual page? Did you look at the demo programs in the demo/
directory to see how they work?
Some nameservers don't allow zone transfers from unauthorized
hosts, in which case you won't be able to list all the zone's
records.
--
Michael Fuhr
http://www.dimensional.com/~mfuhr/
------------------------------
Date: Thu, 05 Mar 1998 11:57:53 -0500
From: Gary Gapinski <GGapinski@riser.eds.com>
To: Dan Cox <dcox@lexmark.com>
Subject: Re: perl Net:DNS module
Message-Id: <34FED991.B7F0DA1F@riser.eds.com>
Dan Cox wrote:
>
> when you do a nslookup in interactive mode you can do a
> ls <domain> and list all the IN A records in a domain. I want to do this
> from perl Net:DNS. I played with it some and cannot figure out
> how to do this. Can this be done? I also tried to just do it all
See perldoc Net::DNS and/or perldoc Net::DNS::Resolver. They contain
examples of exactly what you are looking for, namely, the axfr method of
a Net::DNS::Resolver object.
> from the command prompt with nslookup and can not figure that out
> either. I am sure someone has done it. If you do know how please
> send a email to dcox@lexmark.com.
Try something like
echo "ls example.com"|nslookup
------------------------------
Date: Thu, 05 Mar 1998 11:38:38 -0600
From: Cameron Dorey <camerond@mail.uca.edu>
To: Lynn Kasdorf <lkasdorf@pressroom.com>
Subject: Re: Perl win 32 absolute path probs
Message-Id: <34FEE31E.C9C8AE14@mail.uca.edu>
[cc'd to LK]
Lynn Kasdorf wrote:
>
> This is a multi-part message in MIME format.
BAD. This will cause readers with text-only newsreaders to go to the
next message automatically, and some of them are the most knowledgable
on this forum. (It also makes the message hard to read for those of us
with MIME-capable newsreaders to read, because it usually shrinks the
text/uses a different font, etc) Next time, post as text only if you
want the widest available audience.
The rest of the MIME stuff is reproduced at the end, to show you what
you sent.
The translated message (and reply) follows:
> I'm making mods to a massive perl project running under Digital Unix.
> I am running NT 4.0 and ActiveState Perl for win32, build 315.
>
> The problem is, I can find no way of referring to files using absolute
> paths.
>
> The code has this sort of thing...
>
> $XYZROOT = "/usr/local/etc/httpd/htdocs/xyz";
> $CFdatadir = "$XYZROOT/data";
> $CFfrenlnfile = "$CFdatadir/xyzenglink.txt";
> open(LINKFILE,$CFfrenlnfile) || die "Can't open $CFfrenlnfile";
>
> This runs under unix, but fails under NT. If I make this change, it
> works...
>
> $CFfrenlnfile = ../data/xyzenglink.txt";
Just what _is_ your directory structure on your NT box? I bet it starts
with "C:\" as the root, and doesn't include "/usr/local/..." As you
hopefully know, the ".." means "current directory one up," so if your
script isn't in a subdir of where perl is located, this won't work
either. Try using "C:/etc/etc/etc/xyzenglink.txt". BTW, if you had
modified your open statement to include:
|| die "Can't open $CFfrenlnfile: $!";
it would have given you the system error which resulted from the
non-operation.
>
> ...since the perl file containing all this is in a sibling directory
> of the data directory.
>
> Basically, I can only do relative file paths. No permutation of an
> absolute path works. I put a text file at the server root of my
> machine and try to open it. All of these examples fail. (my server is
> called "entropy")
>
> open (TESTFILE, "http://entropy/test.txt");
> open (TESTFILE, "/entropy/test.txt");
> open (TESTFILE, "entropy/test.txt");
> open (TESTFILE, "http://localhost/test.txt");
> open (TESTFILE, "/localhost/test.txt");
> open (TESTFILE, "localhost/test.txt");
>
> What gives???
These are not file paths, they're URLs. Do you really have an "http:"
disk? I thought disk designations in NT were limited to single letters
and a colon.
>
> Lynn Kasdorf
HTH. You're welcome.
Cameron
camerond@mail.uca.edu
[others skip the following, it's just all the MIME garbage which the
post contained, for LK's information. The real junk starts about halfway
down.]
------=_NextPart_000_0011_01BD4707.80345B60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm making mods to a massive perl project running under Digital Unix. I
=
am running NT 4.0 and ActiveState Perl for win32, build 315.
=20
The problem is, I can find no way of referring to files using absolute =
paths.
=20
The code has this sort of thing...
=20
$XYZROOT =3D "/usr/local/etc/httpd/htdocs/xyz";=20
$CFdatadir =3D "$XYZROOT/data";
$CFfrenlnfile =3D "$CFdatadir/xyzenglink.txt";
open(LINKFILE,$CFfrenlnfile) || die "Can't open $CFfrenlnfile";
=20
This runs under unix, but fails under NT. If I make this change, it =
works...
=20
$CFfrenlnfile =3D ../data/xyzenglink.txt";
=20
...since the perl file containing all this is in a sibling directory of
=
the data directory.
=20
Basically, I can only do relative file paths. No permutation of an =
absolute path works. I put a text file at the server root of my machine
=
and try to open it. All of these examples fail. (my server is called =
"entropy")
=20
open (TESTFILE, "http://entropy/test.txt");
open (TESTFILE, "/entropy/test.txt");
open (TESTFILE, "entropy/test.txt");
open (TESTFILE, "http://localhost/test.txt");
open (TESTFILE, "/localhost/test.txt");
open (TESTFILE, "localhost/test.txt");
=20
What gives???
Lynn Kasdorf
------=_NextPart_000_0011_01BD4707.80345B60
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT color=3D#000000 size=3D2>I'm making mods to a massive perl =
project=20
running under Digital Unix. I am running NT 4.0 and ActiveState Perl for
=
win32,=20
build 315.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>The problem is, I can find no way of
=
referring=20
to files using absolute paths.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>The code has this sort of =
thing...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 =
size=3D2>$XYZROOT =3D=20
"/usr/local/etc/httpd/htdocs/xyz"; </FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT=20
size=3D2>$CFdatadir =3D=20
"$XYZROOT/data";</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>$CFfrenlnfile
=3D=20
"$CFdatadir/xyzenglink.txt";</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>open(LINKFILE,$CFfrenlnfile) || die
=
"Can't=20
open $CFfrenlnfile";</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>This runs under unix, but fails =
under NT. If I=20
make this change, it works...</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>
<DIV><FONT color=3D#000000 size=3D2>$CFfrenlnfile
=3D=20
../data/xyzenglink.txt";</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>...since the perl file containing =
all this is in=20
a sibling directory of the data directory.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>Basically, I can only do relative =
file paths. No=20
permutation of an absolute path works. I put a text file at the server =
root of=20
my machine and try to open it. All of these examples fail. (my server is
=
called=20
"entropy")</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>open (TESTFILE, "<A=20
href=3D"http://entropy/test.txt">http://entropy/test.txt</A>");</FON=
T></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>open
=
(TESTFILE,=20
"<U><FONT color=3D#0000ff>/</FONT></U><A=20
href=3D"http://entropy/test.txt">entropy/test.txt</A>");</FONT></FON=
T></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>open
=
(TESTFILE,=20
"<A=20
href=3D"http://entropy/test.txt">entropy/test.txt</A>");</FONT></FON=
T></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>
<DIV><FONT color=3D#000000 size=3D2>open (TESTFILE, "<A=20
href=3D"http://localhost/test.txt">http://localhost/test.txt</A>");<=
/FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>open
=
(TESTFILE,=20
"<U><FONT color=3D#0000ff>/</FONT></U><A=20
href=3D"http://entropy/test.txt">localhost/test.txt</A>");</FONT></F=
ONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000 size=3D2>open
=
(TESTFILE,=20
"<A=20
href=3D"http://entropy/test.txt">localhost/test.txt</A>");</FONT></F=
ONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000=20
size=3D2></FONT></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000
size=3D2>What=20
gives???</FONT></FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2><FONT color=3D#000000=20
size=3D2></FONT></FONT> </DIV>
<DIV><FONT color=3D#000000 face=3D"" size=3D2>Lynn=20
Kasdorf</FONT></DIV></FONT></FONT></DIV></FONT></FONT></DIV></FONT></FONT=
></DIV></FONT></DIV></DIV></BODY></HTML>
------=_NextPart_000_0011_01BD4707.80345B60--
------------------------------
Date: Wed, 04 Mar 1998 21:32:07 +0100
From: George Kuruvilla <george.sko@athena2000.it>
Subject: RegEXP HELP NEEDED
Message-Id: <34FDBA47.519749E@athena2000.it>
Hello, i have this problem with regexp:
i have to replace a text on more than one line but i'm not able to do
it.
I have to replace 2 or three lines in a file with other text. If I use
s/// the program recognize the text which is to be replaced only if it
is on one line. How to replace a text disposed on more than one line ?
--
George Kuruvilla --->ICQ 2011566
--->IRC BelfA
--->www.porciletto.gpa.it
------------------------------
Date: Wed, 04 Mar 1998 21:31:44 +0100
From: George Kuruvilla <george.sko@athena2000.it>
Subject: RegEXP HELP NEEDED
Message-Id: <34FDBA30.13C11D58@athena2000.it>
Hello, i have this problem with regexp:
i have to substitute a text on more than one line but i'm not able to do
it.
I have to substitute 2 or three lines in a file with other text. If I
use s/// the program recognize the text which is to be replaced only if
it is on one line. How to replace a text disposed on more than one line
?
--
George Kuruvilla --->ICQ 2011566
--->IRC BelfA
--->www.porciletto.gpa.it
------------------------------
Date: 5 Mar 1998 17:22:32 GMT
From: mwe@unixfe.cc.rl.ac.uk (Mike Ellwood)
Subject: Socket/inet_aton.pm not found in AIX 4.1.3 build (IO::Socket)
Message-Id: <6dmn0o$1pm4@newton.cc.rl.ac.uk>
Initially, I was running a pre-built 5.004 binary on an AIX 4.1.3
system, and trying to run the "webget" example from P 247 of the
Learning Pearl, which uses IO::Socket.
Basically the compilation failed unable to find
Socket/inet_aton.pm
Suspicious of
the way my pre-built binary etc had been installed, I took the
"latest" source from a CPAN mirror, and built from scratch. The build
appeared successful. (The only slight worry was that it did not find
the "-lsocket" library, which made me wonder). Make test ran ok.
Trying again, I get:
$ ./webget [mynode] [myurl]
Can't locate Socket/inet_aton.pm in @INC (@INC contains: /usr/local/lib/perl5/ai
x/5.00404 /usr/local/lib/perl5 /usr/local/lib/perl5/site_perl/aix /usr/local/lib
/perl5/site_perl .) at ./webget line 5.
BEGIN failed--compilation aborted at ./webget line 5.
There is a "hints" file for aix, and I didn't modify or override that.
I presume there is either something about my configuration that
caused it not to be copied over, or perhaps I inadvertently replied
something in Configure that caused it not to be there, but I don't know
what. (I mostly took the defaults).
If I search for "[Ss]ocket" in my install libraries I get:
# find /usr/local/lib -name "*.pm" -print | grep [Ss]ocket
/usr/local/lib/perl5/aix/5.00404/IO/Socket.pm
/usr/local/lib/perl5/aix/5.00404/Socket.pm
However, there seems to be no trace of anything with "inet" in the name
either in the install or source directories:
# find /usr/local/lib -name "*.pm" -print | grep inet
# find ~mwe/perl/new -name "*.pm" -print | grep inet
#
Output from "myconfig" follows:-
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
Platform:
osname=aix, osvers=4.1.3.0, archname=aix
uname='aix jkjerome 1 4 000054124600 '
hint=recommended, useposix=true, d_sigaction=define
bincompat3=n useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE'
ccflags ='-qmaxmem=8192 -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=255, d_casti32=undef, d_castneg=undef
intsize=4, alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-ldbm -lld -lm -lc -lbsd -lPW
libc=/lib/libc.a, so=a
useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
cccdlflags=' ', lddlflags='-H512 -T512 -bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl
.exp -bE:$(BASEEXT).exp -b noentry -lc -L/usr/local/lib'
--
Mike.Ellwood@rl.ac.uk
-w everywhere except in the bath
------------------------------
Date: 5 Mar 1998 16:52:18 GMT
From: snowe@rain.org (Nick Halloway)
Subject: Variable interpolation in a file (123)
Message-Id: <6dml82$767$1@news.rain.org>
Hello,
I would like to write a file to output in Perl, with variable
interpolation.
So, I have a file which mentions variables like $REQUEST; I would
like to copy this file to output, with $REQUEST interpreted.
If the file has the line
$REQUEST
then reading the file and writing to the output results in the output
having a line reading
$REQUEST
but I want the output to read
<value of $REQUEST>
How can this be done?
Thanks.
------------------------------
Date: 5 Mar 1998 17:06:28 GMT
From: snowe@rain.org (Nick Halloway)
Subject: Re: Variable interpolation in a file (123)
Message-Id: <6dmm2k$767$2@news.rain.org>
Nick Halloway (snowe@rain.org) wrote:
: Hello,
: I would like to write a file to output in Perl, with variable
: interpolation.
PS -- I know that I can do this by writing the file's
contents into the script, but I'm using it in several different places
so I want to have the file's contents in a disk file.
Thanks.
------------------------------
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 2033
**************************************