[7112] in Perl-Users-Digest
Perl-Users Digest, Issue: 737 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 16 00:17:30 1997
Date: Tue, 15 Jul 97 21:00:21 -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 Tue, 15 Jul 1997 Volume: 8 Number: 737
Today's topics:
$$$ Make Money Easy Just Do It !!! <Gaiennie@datasync.com>
Re: activeware is down? <keys@babylon5fan.corn.on.the.cob>
bizarre regexp behaviour with split web@calarts.edu
Re: Cookie (Jeremy D. Zawodny)
Finding a process under Win32 <heyandy@apk.net>
help - need recursive chown() for big restore. <fil@amnh.org>
Re: Learning Perl ..Help?? <bat@unifi.com>
LWP - why doesn't this do what I think it should do <b*outon@udel.edu>
New RDB module: RDB Interactive (rdbi) (Walt Hobbs)
Re: Perl 5 debug (Ilya Zakharevich)
Perl program to mget files <gprasad@ti.com>
Re: Perl program to mget files (Eric Bohlman)
Re: Perl Traceroute (Mark Bainter)
some unexpected output <kinlum@wco.com>
Re: some unexpected output (brian d foy)
Re: This is a stupid question, but ... (Charles Lin)
Undefined symbol "_stack_base" in perl (Mark Heath)
use OR require <dantin@icp.grenet.fr>
Re: What's better?.. What's the difference?. <merlyn@stonehenge.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 15 Jul 1997 20:02:08 -0500
From: Chip Gaiennie <Gaiennie@datasync.com>
Subject: $$$ Make Money Easy Just Do It !!!
Message-Id: <33CC1D90.7D489F0A@datasync.com>
TAKE THE TIME TO READ
Want to make MONEY fast?
A little while back, I was browsing, just like you are now, and came
across an article similar to this that said you could make thousands
of dollars within weeks with only an initial investment of $5.00 ! So
I thought, "Yeah, right, this must be a scam", like most of us, but I
was curious, like most of us, so I kept reading. Anyway, it said that
you send $1.00 to each of the 5 names and address stated in the
article. You then place your own name and address in the bottom of the
list of #5, and post the article in at least 200 newsgroups.(There are
thousands) No catch, that was it. So after thinking it over, and
talking to a few people first, I thought about trying it. I figured
what I have got to lose except 5 stamps and $5.00, right?
Like most of us I was a little skeptical and a little worried about
the legal aspects of it all. So I checked it out with U.S. Post
Office(1-800-725-2161) and they confirmed that it is indeed legal!
Then I invested the measly $5.00 Well GUESS WHAT! With in 7 days, I
started getting money in the mail! I was shocked! I still figured it
end soon, and didn't give it another thought. But the money just
coming in. In my first week, I made about $20.00 to $30.00 dollars. By
the end of the second week I had made total of over $1,000.00! In the
third week I had over $10,000.00 and it's still growing. This is now
my fourth week and I have made a total of just over $42,000.00 and
it's still coming in. It's certainly worth $5.00, and 5 stamps, I
spent more than that on the lottery!
Let me tell you how this works and most importantly, Why it works...
also, make sure you print a copy of this article NOW, so you can get
the information of it as you need it. The process is very simple and
consists of 3 easy steps :
STEP 1: Get 5 separate pieces of paper and write the following on each
piece of paper "PLEASE PUT ME ON YOUR MAILING LIST." now get 5 $1.00
bills and place ONE inside EACH of the 5 pieces of paper so the bill
will not be seen through the envelopes to prevent thievery. Next,
place on paper in each of the 5 envelopes and seal them. You should
now have 5 sealed envelopes, each with a piece of paper stating the
above phrase and a $1.00 bill. What you are doing is creating a
service by this. THIS IS PERFECTLY LEGAL! Mail the 5 envelopes to the
following addresses:
#1 Luis E. Reyes
303 - 47th St. #CD-20
San Diego CA 92102
#2 C. Rozzier
PO Box 370
Bothell, WA 98041-0370
#3 T. Jeong
346 W. 30th Place
Chicago IL 60616
#4 Bob Churchfield
4815 Woodlake Dr.
Allison Park, PA 15101
#5 Chip Gaiennie
12428 Ridgeland Ct.
Gulfport, Ms. 39503
STEP 2: Now take the #1 name off the list that you see above, move the
other names up ( 5 becomes 4, 4 becomes 3, etc..) and add YOUR Name as
number 5 on the list.
STEP 3: Change anything you need to, but try to keep this article as
close to original as possible. Now, post your mended article to at
least 200 newsgroups. (I think there are close to 18,000 groups) All
you need is 200, but remember, the more you post, the more money you
make! Don't know how to post in the newsgroups? Well do exactly the
following:
FOR NETSCAPE USERS,
1) Click on any newsgroups, like normal. Then click on "To News",
which is in the top left corner of the newsgroups page. This will
bring up a message box.
2) Fill in the SUBJECT with a flashy title, like the one I used,
something to catch the eye!
3) Now go to the message part of the box and retype this letter
exactly as it is here, with exception of your few changes. (remember
to add your name to number 5 and move the rest up)
4) When you're done typing in the WHOLE letter, click on 'FILE'
above the send button. Then, 'SAVE AS.' DO NOT SEND YOUR ARTICLE UNTIL
YOU SAVE IT. (so you don't have to type this 200 times :-)
5) Now that you have saved the letter, go ahead and send your
first copy! (Click the 'SEND' button in the top left corner)
6) This is where you post all 200! OK, go to ANY newsgroup
article and click the 'TO NEWS' button again. Type in your flashy
subject in the 'SUBJECT BOX', then go to the message and place your
cursor here. Now click on 'ATTACHMENT' which is right below the
'SUBJECT BOX'. Click on attach file then find your letter wherever you
saved it. Click once on your file then click 'OPEN' then click 'OK'.
If you did this right, you should see your filename in the 'ATTACHMENT
BOX' and it will be shaded. NOW POST AWAY!
IF YOU'RE USING INTERNET EXPLORER:
It's just as easy, holding down the left mouse button, highlight
this entire article, then press the 'CTRL' key and 'C' key at the same
time to copy this article. Then print the article for your records to
have the names of those you will be sending $1.00 to.
Next, go to the newsgroups and press 'POST AN ARTICLE' type in
your flashy subject and click the large window below. Press 'CTRL' and
'V' and the article will appear in the message window. **BE SURE TO
MAKE YOUR ADDRESS CHANGES TO THE 5 NAMES. **. Now re-highlight the
article and re-copy it so you have the changes... then all you have to
do for each newsgroups is 'CTRL' and 'V' and press 'POST'. It's that
easy!
THAT'S IT! ALL you have to do is jump to different newsgroups and post
away, after you get the hang of it, it will take about 30 seconds for
each newsgroup! **REMEMBER, THE MORE NEWSGROUPS YOU POST IN, THE MORE
MONEY YOU WILL MAKE! BUT YOU HAVE TO POST A MINIMUM OF 200 **
That's it! you will begin receiving money from around the world within
day's! You may eventually want to rent a P.O.Box due to the large
amount of mail you receive. If you wish to stay anonymous, you can
invent a name to use, as long as the postman will deliver it. ** JUST
MAKE SURE ALL THE ADDRESS ARE CORRECT. **
Now the WHY part:
Out of 200 postings; say I receive only 5 replies (a very low
example). So then I made $5.00 with my name at #5 on the letter. Now,
each of the 5 persons who just sent me $1.00 makes the MINIMUM 200
postings, each with my name at #4 and only 5 persons respond to each
of the original 5, that is another $25.00 for me, now those 25 each
make 200 MINIMUM postings with my name at #3 and only 5 replies each,
I will bring in an additional $125.00! now, those 125 persons turn
around and post the MINIMUM 200 with my name at #2 and only receive 5
replies each, I will make an additional $625.00! OK, now here is the
fun part, each of those 625 persons post a MINIMUM 200 letters with my
Name #1 and the each only receive 5 replies, that just made me
$3,125.00! With a original investment of only $5.00! AMAZING! And as I
said 5 responses are actually VERY LOW! Average is probable 20 to 30!
So lets put those figures at just 15 responses per person. Here is
what you will make:
at #5 $15.00
at #4 $225.00
at #3 $3,375.00
at #2 $50,625.00
at #1 $759,375.00
When your name is no longer on the list, you just take the latest
posting in the newsgroups, and send out another $5.00 to names on the
list, putting your name at number 5 again. And start posting again.
the thing to remember is, do you realize that thousands of people all
over the world are joining the internet and reading these articles
everyday, JUST LIKE YOU are now! So can you afford $5.00 and see if it
really works? I think so... People have said, "What if the plan is
played out and no one sends you the money? So what! What are the
chances of that happening when there are tons of new honest users and
new honest people who are joining the internet and newsgroups everyday
and are willing to give it a try? Estimates are at 20,000 to 50,000
new users, every day, with thousands of those joining the actual
internet. Remember, play FAIRLY and HONESTLY and this will work. You
just have to be honest. Make sure you print this article out RIGHT
NOW, also. Try to keep a list of everyone that sends you money and
always keep an eye on the newsgroups to make sure everyone is playing
fairly. Remember that HONESTY IS THE BEST POLICY. You don't need to
cheat the basic idea to make the money!!
GOOD LUCK to all and please play fairly and reap the huge rewards from
this, which is tons of extra CASH. ** By the way, if you try to
deceive people by posting the message with your name in the list and
not sending the money to the rest of the people already on the list,
you will NOT get as much. Someone I talked to knew someone who did
that and he only made about $150.00, and that's after seven or eight
weeks! Then he sent the 5 $1.00 bills, people added him to their
lists, and in 4-5 weeks he had over $10k. This is the fairest and most
honest way I have ever seen to share the wealth of the world with
costing anything but our time!!! You also may want to but mailing and
e-mail lists for future dollars.
Please remember to declare your extra income. Thanks once again....
The one that sends this file take no responsibility of the contents or
substance of this text. The mailer of this text-file are not the
author.
------------------------------
Date: Mon, 14 Jul 1997 20:17:07 -0600
From: Keys <keys@babylon5fan.corn.on.the.cob>
Subject: Re: activeware is down?
Message-Id: <33CADDA3.601CBEBA@babylon5fan.corn.on.the.cob>
Rick B Teh wrote:
>
> Hi,
>
> I have been looking for the NT version of Perl5. I realized that
> ActiveWare is the company who distributes it, but I think their server is
> down. Does anyone know where else can I get it?
> Thanks.
>
> -Rick
Actually, the perl binaries for Win32 are available at
http://www.perl.com/CPAN/
------------------------------
Date: Tue, 15 Jul 1997 12:39:26 -0600
From: web@calarts.edu
To: web@calarts.edu
Subject: bizarre regexp behaviour with split
Message-Id: <868986581.12052@dejanews.com>
#Can anyone explain to me why
split /\Q$delimiter\E/;
#and
split /(\Q$delimiter\E)/;
#behave differently? My understanding was that the only difference should
#be that the latter form sets $1, the former doesn't. However, with
$delimiter = "\\";
$_ = "some\\thing";
#the first split returns
("some","thing")
#as expected, but the latter split returns
("some","\\","thing")
#Could someone explain to me what's going on here, so that I don't
#inadvertently invoke this particular "feature" again in the future?
(For clarity I am using real Perl syntax, not pseudo-code -- hence the
commented comments. The quoted double backslashes are really escaped
single backslashes, of course.)
-jason
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Tue, 15 Jul 1997 02:55:16 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Cookie
Message-Id: <33cae656.691292335@news.bgsu.edu>
On Mon, 14 Jul 1997 20:06:21 -0300, Benjamin Osyp Beracasa
<osyp@ofiram.com> wrote:
>Does anyone now how to set a cookie with perl.
Yes. Many of us use CGI.pm, available at any CPAN site, for tasks
like that.
>And Anyone now how to configure the matts cookie script
I've not heard of "matts cookie script." It isn't documented?
Jeremy
---
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>
"It's amazing the clarity that comes with psychotic jealousy."
-- George in "My Best Friend's Wedding"
------------------------------
Date: Tue, 15 Jul 1997 09:49:18 -0400
From: Andy Say <heyandy@apk.net>
Subject: Finding a process under Win32
Message-Id: <33CB7FDE.FB1F610C@apk.net>
Is there any modules or code that can be run under Win32 (NT 4.0) that a
perl script can find if a process is running given the absolute path to
the program (i.e. C:\WINNT\NOTEPAD.EXE)?
I have looked at Win32::Process which seems to have routines to start
and track a process if started within PERL, but in this case the process
is already started on the machine.
Thanks,
Andy
------------------------------
Date: 15 Jul 1997 11:38:09 -0400
From: Fil Krohnengold <fil@amnh.org>
Subject: help - need recursive chown() for big restore.
Message-Id: <ehg1tgcom6.fsf@amnh.org>
Hello, all.
I'm a little sysadmin with a big problem. I lost one of my disks
very early this morning and have had to do my first ever restore of
an entire user partition. First time in 3 yeras. So anyway, I need
to come up with some way to restore the owner and group permissions
to the user directories. Somewhere around 3am I came up with this:
#!/usr/local/bin/perl
#
# restore permissions in user directories to the way they were.
#
while (($name,$passwd,$uid,$gid) = getpwent) {
if ( -d $name ) {
chown $uid, $gid, $name;
opendir(USERDIR, "$name");
@allfiles = readdir(USERDIR);
chown $uid, $gid, @allfiles;
}
}
But it doesn't quite work except on the top level user directories.
And even if it did, for those users who actually use the machine and
have little hierarchies, they're still out of luck unless their
username and group happen to be tapeuser and sys.
Can someone help me with a recursive solution?
Thanks
-fil
___________________________________________________________________________
Fil Krohnengold | UNIX Systems Admin, Interdepartmental Laboratories
fil@amnh.org | The American Museum of Natural History
212/769-5294 | CPW @ 79thSt / NY, New York / 10024
------------------------------
Date: Tue, 15 Jul 1997 14:53:58 -0400
From: Boris Tabenkin <bat@unifi.com>
To: Randal Schwartz <merlyn@stonehenge.com>
Subject: Re: Learning Perl ..Help??
Message-Id: <33CBC746.D397AD43@unifi.com>
(On soap box)
Not to sound like I am sucking up, but the PERL book is one of the best
computer books ever written. I hate those learn anything in 7 days
books. They all start off with
{
int a;
int b;
int c;
c=a+b;
print c;
}
No shit;
The PERL book is written for peopal who allready know how to program and
need a reference. I wish more book wehre like that. I just picked up a
"good" java book, Java How to Porgram, same deal, crap.
Randal, thanks for the book and keep up the good work.
P.S. If ypu wnat to learn how to program. learn VB.
(Off soap box)
Boris
Randal Schwartz wrote:
>
> >>>>> "Charles" == Charles Lin <clin@cs.umd.edu> writes:
>
> Charles> I wonder if this is an O'Reilly style? That is, the
> Charles> first chapter is a quick run through everything, and the rest
> Charles> of the book deals with smaller portions. I think it's a
> Charles> weird idea, if this is true. Why try to cram everything into
> Charles> one chapter when you should start gently and work your way
> Charles> through? If you need a "do-it-all" chapter, make it an
> Charles> appendix, and direct non-beginners there.
>
> It's more of a "randal" style, developed over the 20 years of experience
> I've had as a technical writer. As Steve Talbott (my editor on that book)
> worked for me at one time back when I was a real employee, he readily
> endorsed the outline as a successful structure.
>
> The first chapter lets the reader discover within the first hour of
> reading the book a number of basic concepts about the product, backed
> up by a sample walkthrough illustrating said concepts through
> examples. It is not meant as a learning tool -- more of an
> *orientation* tool... to let you know if you should even be reading
> the book.
>
> I first developed that style when I was writing product
> documentation... on the cover sheet in bold letters it said "if you
> don't do anything else, at least read THIS chapter"... because we all
> know that nobody reads product documentation all the way through. :-)
>
> If the style has leaked into other ORA books, it's got to be because
> Steve's next job after working for me was working alongside Tim
> O'Reilly, from whence O'Reilly and Associates has sprung forth. :-)
>
> And just to give original credit where it is due, my mentor Lyle
> Settle first pioneered that particular structure, although he'd
> probably say I made it practical. (That's the "Lyle" in "thanks to
> Lyle and Jack" line from the classic Camel and Llama forewords.)
>
> print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
> ## legal fund: $20,495.69 collected, $182,159.85 spent; just 413 more days
> ## before I go to *prison* for 90 days; email fund@stonehenge.com for details
>
> --
> Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
> Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
> Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
> Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
> Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: Tue, 15 Jul 1997 17:19:54 -0400
From: "Katherine A. Bouton" <b*outon@udel.edu>
Subject: LWP - why doesn't this do what I think it should do
Message-Id: <33CBE97A.41C67EA6@udel.edu>
I am using the LWP and CGI packages
I have a form with 3 check buttons.
I want to create 1 - 3 searches depending on how many buttons are
selected
Each search goes to a different search engine.
If only one button is selected - the program works - ie it goes out and
does the query, formats is and brings it back.
but if more than one button is checked - only the first one - that is nc
- runs!
A simplified version of what I have is...
Button "center" = NC
Button "center" = CD
Button "center" = BA
$data = input
if button "center" =~ 'NC' {
URL = www.nc.com/search.pl?data;
&search_nc
}
if button "center" =~ 'CD' {
URL = www.nc.com/search.pl?data;
&search_cd
}
if button "center" =~ 'BA' {
URL = www.nc.com/search.pl?data;
&search_ba
}
sub search_nc {
my $request = new HTTP::Request('GET', $url, $header);
# Pass request to the user agent and get a response back
my $response = $ua->request($request);
$response = $ua->request($request);
# Check the outcome of the response
if ($response->is_success) {
# print $response->content;
@query_result=split(/%/, $response->content());
$count=1;
$count_queries = @query_result;
while ($count <= $count_queries) {
# strip the header info
$query_result[$count-1] =~ s/<img border=0 src=[\"-_\/A-Za-z\s
0-9]+//g;
if ($count>=2) { print("<BR><b>NCDC</b>:
$query_result[$count-1]\n");}
$count++;
}
} else {
print $response->errorAsHTML; # Prints the error as HTML
}
print $query->end_html;
}
sub cd {
# Create a request
my $request = new HTTP::Request('GET', $url, $header);
# Pass request to the user agent and get a response back
my $response = $ua->request($request);
$response = $ua->request($request);
# Check the outcome of the response
if ($response->is_success) {
@query_result=split(/tp URL:<\/EM>/, $response->content());
$count_queries = @query_result;
$count=1;
while ($count <= $count_queries) {
# get rid of the header stuff by substituting everything after
<TITLE>Broker
$query_result[$count-1] =~ s/<TITLE>Bro[:\"-_\/<>A-Za-z\s 0-9]+//g;
if ($count>=2) { print("<BR><b>CDIAC</b>: $query_result[$count-1]\n");}
$count++;
}
} else {
print $response->errorAsHTML; # Prints the error as HTML
}
print $query->end_html;
}
Help appreciated!
and if you respond, be sure to take the ANTI_SPAM asterisk out of my
email address.
Thanks
Katherine
------------------------------
Date: Tue, 15 Jul 97 15:16:54 PDT
From: hobbs@rand.org (Walt Hobbs)
Subject: New RDB module: RDB Interactive (rdbi)
Message-Id: <199707152217.PAA06799@id.rand.org>
There is now an interactive analysis tool for RDB data tables (rdbtables)
called 'rdbi'. It is especially useful for rdbtables that were made from
spreadsheet data or outside sources of unknown content. Spreadsheet data
files are easily converted via 'repair -b spreadsheet_file'.
====> NOTE, if you don't know what RDB is see the end of messge. <=====
It basically utilizes other RDB modules (column, etbl, ptbl, reporttbl, row,
sorttbl, tbl2lst, summ, valid) to present a simple interface so one can
analyze and/or modify, or make new versions, of an rdbtable quickly.
The header information of a given rdbtable will be shown, which includes any
header comment lines, each column number, column name, and any column
documentation that may exist.
The rdbtable may be printed in column mode, in list mode (like that used by
etbl) or formatted (if a template file is available).
Online help is available at any time.
The use of a pager (LESS by default) is included which may be turned on or
off as needed.
Such actions as limiting or re-arranging columns, sorting by columns, or
selecting rows based on an expression are done with simple commands. Column
names or column NUMBERS may be used in several commands, to save typing. In
these cases temporary copies of the modified rdbtable are made, which may be
saved if desired; otherwise they are removed when the program is exited.
The summary information command (summ module output) shows the detailed
makeup of the columns and has proven to be very useful.
Commands to execute RDB modules that are not built into the interface, as
well as arbitrary UNIX commands, may be executed at any time via an escape
mechanism.
For more detail on the interactive commands for rdbi use 'rdbi -help'.
I like 'rdbi' much better than the old RDB Terminal Interface module 'rdb'
(which has been renamed to 'rdbt').
The tool 'rdbi' is available as a separate file, via anon ftp (this is
the primary RDB location) from:
ftp://ftp.rand.org/pub/RDB-hobbs/
file name: rdbi
Walt Hobbs
PS My RDB mail list is way out of date; many bad returns. If you want
to be on my RDB mail list (for occasional notices) please let me know.
......................................................................
What RDB is:
RDB is a fast, portable, Relational DataBase Management System without
arbitary limits, (other than memory and processor speed).
RDB uses the 'operator/stream' DBMS paradigm described in Unix Review,
March, 1991, page 24, entitled A 4GL Language. The operators are UNIX
filters, i.e. they read STDIN and write STDOUT so they can be connected
by pipes (the '|' char).
The operators work with relational data in ascii files. The fields in
each row are separated by a 'TAB' char and the row is terminated with
a 'NEWLINE' char. The first section of rows (the header) contains the
names and data definitions for each column. The header also contains
optional embedded documentation relating to the entire datafile and/or
each data column. Subsequent rows (the body) contains the data values.
A file in this form is said to be an 'rdbtable'. RDB is compliant with
the Relational Model.
These rdbtables are easily ported to and from spreadsheet programs on
Macintoshes or MSDOS computers.
All operators read an rdbtable via STDIN and most write a new rdbtable
via STDOUT. Exceptions are operators that produce output listings instead
of rdbtables (like 'ptbl' and 'reporttbl').
All operators and utilities take a '-help' option to print usage detail
and other information online.
There are currently 22 RDB modules (operators and utilities) written
in PERL.
......................................................................
------------------------------
Date: 15 Jul 1997 22:31:41 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Perl 5 debug
Message-Id: <5qgtod$492@agate.berkeley.edu>
In article <33CBD9A9.245@syntegra.bt.co.uk>,
Farshad Eshraghi <eshraghf@syntegra.bt.co.uk> wrote:
> Hi everyone,
>
> I have installed Perl 5.003 on HP/UX env.
>
> I want to debug by doing perl -d but it complains about not finding
> perldb.pl
>
> I have the perl5db.pl but no perldb.pl on the distribution.
Most probably what you are calling is a wrong version.
Try
perl -v
perl -V
Ilya
------------------------------
Date: Tue, 15 Jul 1997 16:16:22 -0500
From: Gowri Prasad Gandluri <gprasad@ti.com>
Subject: Perl program to mget files
Message-Id: <33CBE8A6.74C53C0A@ti.com>
Is there a perl program/module which helps
to get multiple files from a remote machine in a single FTP session.
Your help is highly appreciated.
Thanks
Prasad
(gprasad@ti.com)
------------------------------
Date: Tue, 15 Jul 1997 22:43:55 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: Perl program to mget files
Message-Id: <ebohlmanEDDtt8.CKx@netcom.com>
Gowri Prasad Gandluri (gprasad@ti.com) wrote:
: Is there a perl program/module which helps
: to get multiple files from a remote machine in a single FTP session.
Have you looked into Net::FTP, available at your nearest CPAN archive?
------------------------------
Date: Tue, 15 Jul 1997 17:41:28 GMT
From: mark@michiana.net (Mark Bainter)
Subject: Re: Perl Traceroute
Message-Id: <33cbb41b.586792573@news.michiana.net>
On Mon, 14 Jul 1997 09:24:00 -0700, Tom Phoenix
<rootbeer@teleport.com> wrote:
|On Fri, 11 Jul 1997, Kirk Spessard wrote:
|
|> Does anyone know how you would implement a traceoute utility in Perl?
|
|One way would be to get the source for somebody else's traceroute utility,
|and do what it does. Another way is to use code something like this.
|
| system("/usr/local/bin/traceroute", $some_site); # :-)
|
|Hope this helps!
|
Or, you could just look up the RFC for it and follow the guidelines
laid out there.
See:
http://bugs.wpi.edu:8080/EE535/hwk96/hwk3cd96/pascoe/traceroute.html
for more information on how it works.
---
Mark A. Bainter MCP, A+
Technical Engineer mailto:mark@turnergroup.com
Turner Group WWW: http://www.turnergroup.com
2707 Middlebury St. Phone: 219-295-4290
Elkhart, IN 46516 Fax: 219-522-2964
--------------------------------------------------------------------------------------
ex abusu non arguitur in usum
(the abuse of a thing is no argument against its use)
--------------------------------------------------------------------------------------
------------------------------
Date: Tue, 15 Jul 1997 18:17:49 -0700
From: Kenneth Kin Lum <kinlum@wco.com>
Subject: some unexpected output
Message-Id: <33CC213D.8B8E4B43@wco.com>
Guess what the following give give?
$test = "AAA BCBC AAA";
$test =~ s/([^x])BC/$1y/g;
print "test is $test\n";
----
Now, the output:
test is AAA yBC AAA
Is this supposed to be so, not
test is AAA yy AAA
??
------------------------------
Date: Tue, 15 Jul 1997 22:41:22 -0500
From: joe@ (brian d foy)
Subject: Re: some unexpected output
Message-Id: <joe-ya02408000R1507972241220001@news.walrus.com>
In article <33CC213D.8B8E4B43@wco.com>, Kenneth Kin Lum <kinlum@wco.com> wrote:
> Guess what the following give give?
>
> $test = "AAA BCBC AAA";
> $test =~ s/([^x])BC/$1y/g;
> print "test is $test\n";
>
> ----
> Now, the output:
> test is AAA yBC AAA
>
> Is this supposed to be so, not
> test is AAA yy AAA
remember that global matching picks up where it left off! watch what
happens if we ask for some debugging info:
#!/usr/bin/perl -Drw
$test = "AAA BCBC EEE";
$test =~ s/([^x])BC/$1y/g;
print "test is $test\n";
__END__
[some output snipped]
EXECUTING...
1:BRANCH < BCBC EEE>
5:OPEN1 < BCBC EEE>
11:BRANCH < BCBC EEE>
15:ANYOF < BCBC EEE>
51:CLOSE1 <BCBC EEE>
57:EXACTLY <BCBC EEE>
65:END <BC EEE>
1:BRANCH <BC EEE> <-- see where is picks up again?
now there is nothing to match the ([^x]) portion of the regex since
we are starting with "BC EEE", so what you think will happen in the
second pass doesn't. however, if we modify the routine just a bit:
#!/usr/bin/perl -w
$test = "AAA BCBC EEE";
while ( $test =~ s/([^x])BC/$1y/ ) { next }
print "test is $test\n";
__END__
test is AAA yy EEE
which is just the behaviour that you wanted :)
--
brian d foy <comdog@computerdog.com>
------------------------------
Date: 15 Jul 1997 17:26:55 GMT
From: clin@cs.umd.edu (Charles Lin)
Subject: Re: This is a stupid question, but ...
Message-Id: <5qgbsv$31d@mimsy.cs.umd.edu>
TColl78218 (tcoll78218@aol.com) wrote:
|| I am relatively new to perl programming, and I'd like to create a script
|| to return a page based on what type of browser a client has. I have the
|| script written, but I have a pretty simple problem. How do I call the
|| script so that it executes before they get to the page? Like I said, it's
|| a stupid question, but I am a newbie here...
Not so stupid. So, what you want is probably classic use of cgi-bin
scripts. I.e., you want return a page based on info somehow provided
by the user. However, to execute scripts, the web server (on your side)
needs to be able to execute your script. Typically, this is done by
having scripts and programs placed in a special directory (often called
cgi-bin). Hence, a URL might look like http://mysite.com/cgi-bin/foo
and this would execute a program called foo. If you are using a conputer
system that isn't your own, you will have to ask the webmaster about
cgi-bin applications.
There might be other ways of doing what you want without resorting
to that, but I don't know what they are.
--
Charles Lin
clin@cs.umd.edu
------------------------------
Date: 14 Jul 1997 02:34:03 GMT
From: mheath@netspace.net.au (Mark Heath)
Subject: Undefined symbol "_stack_base" in perl
Message-Id: <5qc36r$fu6$1@otis.netspace.net.au>
Im copying a web server from one machine to another and are testing perl
scripts to see if they work on the new machine.
Here is an error which I cant seem to find in any of the faq/diags files
Can't load '/server/www/perl/auto/Data/Dumper/Dumper.so' for module
Data::Dumper: Undefined symbol "_stack_base" in
perl:/server/www/perl/auto/Data/Dumper/Dumper.so at
/usr/local/lib/perl5/DynaLoader.pm line 140.
at /server/www/perl/Data/Dumper.pm line 28
Does this measn that Dumper.so needs to be recompiled to work on the new
machine. It is the same architecture.
Would going from 5.002 to 5.003 cause this problem?
Any pointers or indication of what is going wrong here would be greatly
appreciated, Thanks.
--
-- mark heath - Netspace Online Systems. http://www.netspace.net.au/
Obnoxious Usenet Habits #1. Post a message asking how to post messages.
:wq
------------------------------
Date: Tue, 15 Jul 1997 10:11:31 +0200
From: Joelle D'Antin & Nicolas Gregoire <dantin@icp.grenet.fr>
Subject: use OR require
Message-Id: <33CB30B3.29C3@icp.grenet.fr>
Hi,
I want to do some libraries because some of my fonctions are very big.
I'va made a file recherche.pl and put my functions
in.
But it isn't working :
how have I to call the library ??
What is the matter ??
Please help.
------------------------------
Date: 15 Jul 1997 07:20:46 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: perlprogrammer@hotmail.com
Subject: Re: What's better?.. What's the difference?.
Message-Id: <8csoxgjt1d.fsf@gadget.cscaper.com>
>>>>> "perlprogrammer" == perlprogrammer <perlprogrammer@hotmail.com> writes:
You have an odd handle for someone that is asking such basic questions. :-)
perlprogrammer> ## Instead of typing this...
perlprogrammer> if ($something ne "")
perlprogrammer> ##Couldn't I just type this?..
perlprogrammer> if ($something)
Yes, but then if $something were "0", you'd get a false negative.
perlprogrammer> # but then if so, what would the best idea for
perlprogrammer> if ($something eq "")
It's not. :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 413 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
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 737
*************************************