[8313] in Perl-Users-Digest
Perl-Users Digest, Issue: 1930 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 19 05:10:09 1998
Date: Thu, 19 Feb 98 02:00:31 -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, 19 Feb 1998 Volume: 8 Number: 1930
Today's topics:
Re: "Mastering Regular Expressions" <joseph@5sigma.com>
Re: '.db' file extension automatic with dbmopen() ? (Paul Marquess)
Re: A new user to the Sybase module (Abigail)
Re: Can you flush a print statement to the browser imme (Bart Lateur)
Re: Converting data to an array <corky@ultranet.com>
Re: Displaying Integers (Jonathan Feinberg)
Re: Embending perl into c <agr30@uni-koeln.de>
Re: HELP! My ISP claims that Perl access is a serious <rjk@coos.dartmouth.edu>
Re: Newbie question: script directory (Martin Vorlaender)
Re: newby perl string processing Q (Sean McAfee)
Re: Prisoners of the evil empire <stevenjm@olywa.net>
Re: Q: scalar @{[/$f/g]} <ldanna@hotmail.com>
Re: REMOTE_HOST (Martin Vorlaender)
Re: Retrieving mail from host <agr30@uni-koeln.de>
Re: RTFM ??? <metcher@spider.herston.uq.edu.au>
Re: split on ':', but not '\:' <rjk@coos.dartmouth.edu>
Re: String Extraction and checkup (OUCH) uri@sysarch.com
Re: suid script newbie question (Martin Vorlaender)
Re: ts: Remove files in a PERL sript <rjk@coos.dartmouth.edu>
Re: ts: ts: Remove files in a PERL sript (Martin Vorlaender)
Re: Verifying a URL? <vanucci@sp.dglnet.com.br>
Re: Writing a "println" function that works just like " <rjk@coos.dartmouth.edu>
Re: Year 2000 Compliance: Lawyers, Liars, and Perl <Barticus@worldnet.att.spam.net>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 18 Feb 1998 22:48:43 -0700
From: "Joseph N. Hall" <joseph@5sigma.com>
Subject: Re: "Mastering Regular Expressions"
Message-Id: <34EBC7BB.183F7E30@5sigma.com>
Concur, MRE is an excellent book.
-joseph
David Adler wrote:
>
> Chipmunk <rjk@coos.dartmouth.edu> writes:
>
> > Seriously, though, I have both Advanced Perl Programming and Mastering
> > Regular Expressions, and I'm very happy with both of them. MRE was
> > especially helpful. After reading it, I now feel confident enough to
> > discuss regexes with Eli on clpm.
>
> [yes I know I'm coming in late on this, but I've been sick...]
>
> Wow! Now *that's* a recommendation! [...]
--
Joseph N. Hall, prop., 5 Sigma Productions mailto:joseph@5sigma.com
Author, Effective Perl Programming . . . . . http://www.effectiveperl.com
Perl Training . . . . . . . . . . . . . . . http://www.perltraining.com
------------------------------
Date: 19 Feb 1998 09:06:41 GMT
From: pmarquess@bfsec.bt.co.uk (Paul Marquess)
Subject: Re: '.db' file extension automatic with dbmopen() ?
Message-Id: <6cgsn1$oti$1@pheidippides.axion.bt.co.uk>
[ Posted & Mailed ]
dk smith (dks@mediaweb.com) wrote:
: In general, if Berkley DB is explicitly included with,
: use DB_File;
: and then a subsequent call to dbmopen occurs like this,
: dbmopen( %DB, "/etc/aliases", undef);
: isn't the ".db" extension appended to the filename? So
: in this case the file name is actually:
: /etc/aliases.db
Nope.
: Are there cases when this is not true? I'm running on Solaris 2.5.1, Perl
: 5.004_03. Would gladly read yet another document if directed.
DB_File does not add any extension behind the scenes.
Paul
------------------------------
Date: 19 Feb 1998 04:48:24 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: A new user to the Sybase module
Message-Id: <6cgdio$mnb$1@client2.news.psi.net>
Tucker Callaway (tuckwc@uclink2.berkeley.edu) wrote on 1633 September
1993 in <URL: news:34EB8BFA.CF6DBDF4@ac.housing.berkeley.edu>:
++
++ The only way I can think of doing this right now is display the first 20
++ entries. Then when the user clicks for the next 20 entries. I query
++ the database again but skip the first 20 entries and print the 21-40th
++ entries. As you can imagine this process can get very inefficient for
++ large numbers of entries. (for the 101 -120 th entries I have to skip
++ 100 entries)
Unless you're database is heavily loaded on a too small machine,
skipping 100 rows is peanuts compared to the overhead of dealing
with the TCP/IP connection.
++ What I like to do is to give a call to procedure that will take
++ arguments x, and y, Where x is the first starting entry I want and y is
++ the number of entries after x I want. (and do it in constant time).
++ But I can seem to find such a procedure in SybPerl. (or I may have
++ overlooked it)
Use a cursor.
But now we've left the realms of Perl and entered the world of T-SQL.
Abigail
--
perl5.004 -wMMath::BigInt -e'$^V=new Math::BigInt+qq;$^F$^W783$[$%9889$^F47$|88768$^W596577669$%$^W5$^F3364$[$^W$^F$|838747$[8889739$%$|$^F673$%$^W98$^F76777$=56;;$^U=substr($]=>$|=>5)*(q.25..($^W=@^V))=>do{print+chr$^V%$^U;$^V/=$^U}while$^V!=$^W'
------------------------------
Date: Wed, 18 Feb 1998 09:26:02 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Can you flush a print statement to the browser immediately?
Message-Id: <34f2a598.5548743@news.tornado.be>
"Rick Ryan" <rickryan@datrixnet.com> wrote:
>I've got a perl script where I'm using back ticks to run a system command to
>retrieve information from a database. I've also got some PRINT statements up
>above the system call but they don't show up until the entire program has
>been run. Is there any way to "flush" the print commands to the screen
>immediately so that the user can see that something's going on?
Urm... you mean in CGI, right? The text body doesn't mention this, but
the subject line mentions the word "browser".
OK. Your problem is that the server doesn't send the data back until it
thinks the script has finished. Something to do with "content-length", I
assume.
So you have to make the server think the script is finished. Goto Randal
Schwartz' WebTechniques pages, and look up Column 20 (dec'97).
I don't think Randal likes people climbing in through the window, so I
won't post the page's exact URL. The front door is at:
http://www.stonehenge.com/merlyn/WebTechniques/
HTH,
Bart.
------------------------------
Date: Wed, 18 Feb 1998 23:59:07 -0500
From: Bob Trieger <corky@ultranet.com>
Subject: Re: Converting data to an array
Message-Id: <34EBBC1B.7C80@ultranet.com>
Anirvan Chatterjee wrote:
>
> georg@cyberjunkie.com wrote:
> > open (MYFILE,"stuff.data");
> > @numbers = <MYFILE>;
>
> It may also be useful to chomp the resulting array so as to remove any
> pesky trailing newlines (depending on whether they're wanted or not).
Also would be a great idea to check for return value of the open.
Bob Trieger
corky@ultranet.com
------------------------------
Date: Thu, 19 Feb 1998 02:07:34 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Displaying Integers
Message-Id: <MPG.f55a43cbc078ac989707@news.concentric.net>
shimpei+usenet+.mil+.gov@BOFH.patnet.caltech.edu said...
: I'm surprised no one has suggested the easiest solution yet.
:
: printf "%02d\n", $number;
That's for large values of "no one."
--
#!/usr/bin/perl -w -- Just another Perl hacker,
(open 0),$_=<0>,s,.*-+ ,,,chop;for(split?@*?){($$_++or$}=$_,y,
y \,y,<STDIN>,,eval"sub $_ {print'$}'}"),y,} \,},>STDOUT,,&$_}
# Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: 19 Feb 1998 00:44:41 +0100
From: Martin Bialasinski <agr30@uni-koeln.de>
To: sriram@weblogic.com
Subject: Re: Embending perl into c
Message-Id: <87d8gktr4m.fsf@haitech.internet-treff.de>
sriram@weblogic.com writes:
> What I understand from your request is that you'd like to eliminate Tcl
> and use Perl instead.
Right.
> And you want to build a regular Perl extension, where a perl script is
> the driver, which makes calls into some C code.
Not only some C code, but C code which is part of the programm which
embends the perlinterpreter. Just if it makes a difference.
> If my understanding is correct, take a look again at the discussion of
> SWIG in Chapter 18, "Extending Perl: A first course". It provides
> script-level bindings both to C variables as well as functions.
swig depends on the .h file. But not non of the functions or variables I
want to export to the perlinterpreter is defined in there.
There is another problem I see (sorry for the pseudo C):
vbox.c vbox.pm
------ -------
int a; {wrapper to
{Set a according vbox.c created
to some input} with swig}
int funct_b {
return a*2
}
embend perl
start perl ----> use vbox.pm
print funct_b
Will this work in the way, that two simultaneously running vbox programms
would have distinct values for the variable "a" ?
> (While you are at it, perhaps you should be checking out the book too.
> I happen to know the author personally, and I'd vouch for it anyday :)
How comes? Does he live in your neighborhood or did you go to school with
him? :-)
Ciao,
Martin
------------------------------
Date: Thu, 19 Feb 1998 00:57:45 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: HELP! My ISP claims that Perl access is a serious security risk!
Message-Id: <34EBC9DA.6E9B9072@coos.dartmouth.edu>
Troy Denkinger wrote:
>
> In article <34EA7257.E57D37A8@coos.dartmouth.edu>, rjk@coos.dartmouth.edu wrote:
> >
> >In your first response, you quoted part of the ISP sysadmin's response out of
> >context in order to defend him. If you go back and read the original message,
> >you will notice that the sysadmin does *not* offer to give Perl access if the
> >user will be responsible for his account. The sysadmin says that such a
>
> I have to strongly disagree with your interpretation. I was
> initially going to apologize for misinterpreting the
> original post and also agree that the guy should get a
> different ISP. To satisfy my curiosity and figure out how
> I'd misinterpreted this, I went to Deja News.
>
> If you look at the original post, you'll find my quoting was
> in context and that the ISP was offering Perl access "to a
> user" which seems to be different than a webserver account
> in this context.
You apparently have a different understanding of the word "context".
>From your original post:
> In article <tgooding-ya023580001602982113120001@news2.ibm.net>,
> tgooding@millcomm2.com (Tom Gooding) wrote:
>
> [snip]
>
> >security. It seems possible for me to allow perl to a user, but then you
> >must make sure your password is indeed secure, and that you are liable for
> >any actions taken from your account.
>
> [snip]
Notice those [snips]. See how the quote was taken out of context? You can
even tell from the text "security." that you cut out part of a paragraph.
Here's the original quote, *in* context:
>From the ISP sysadmin to the originator of this thread:
> At the moment, we only allow perl/compiler access to our webserver
> accounts, and then only if they ask for it. We also limit perl due to the
> nature of it. if a language, interpreted or not, can do direct i/o
> control and do direct memory access, it too can be used to exploit bugs in
> security. It seems possible for me to allow perl to a user, but then you
> must make sure your password is indeed secure, and that you are liable for
> any actions taken from your account.
Note the part about "only allow[ing] perl/compiler access to our webserver
accounts". The sysadmin is not offering perl access to the user; he is saying
such a policy is "possible". And since the sysadmin did not follow through on
this speculation, it seems clear that he decided not to implement the policy,
possible though it may be.
This post is going to kill my OCR for this week. :-(
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: Thu, 19 Feb 1998 03:54:09 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Newbie question: script directory
Message-Id: <34eb9ed1.524144494f47414741@radiogaga.harz.de>
John O'Brien (jobrien@world.std.com) wrote:
: Holly Sommer wrote:
: > John O'Brien wrote:
: > : How do I find out what directory my perl script is executing in?
: >
: > The Cwd command (Current working directory). Or, in *IX, a line like:
: > $mydir = `pwd`; will capture the path to the current dir.
: >
: Almost.
No. Exactly to the point. It was the answer to the question you asked.
If that wasn't what you intended to ask - well, this is comp.lang.perl.misc,
not alt.read.my.mind.
: If the script is an executable someplace on my $PATH, I want
: to know the directory it is executing out of, not the current directory.
Now that is something completely different...
perldoc FindBin
perldoc File::Basename
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 19 Feb 1998 05:44:33 GMT
From: mcafee@choplifter.rs.itd.umich.edu (Sean McAfee)
Subject: Re: newby perl string processing Q
Message-Id: <5FPG.1960$N4.11816025@news.itd.umich.edu>
In article <34EBB0BE.4A12@ultranet.com>,
Bob Trieger <corky@ultranet.com> wrote:
>Brian O'Connor wrote:
>> How do I extract a particular field from a line of char delimited
>> fields without assigning the whole lot to unused variables. eg
>> A password file, I want the 4th field(grp id)
>> I can
>> ($a,$b,$c,$d,$e,$f,$g) = split(/:/);
>> then use $d, but there must be a better way
>@array = split(/:/); #this reads your string into an array
>then you just reference the 4th element in the array.
>arrays count from 0 so $array[3] is your choice.
Or, more directly,
$d = (split(/:/))[3];
You can do this with array slices, too:
($month, $day, $year) = (localtime)[4,3,5];
--
Sean McAfee | GS d->-- s+++: a25 C++ US+++$ P+++ L++ E- W+ N++ |
| K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
| tv+ b++ DI++ D+ G e++>++++ h- r y+>++** | umich.edu
------------------------------
Date: Thu, 19 Feb 1998 01:42:33 -0800
From: Steven May <stevenjm@olywa.net>
Subject: Re: Prisoners of the evil empire
Message-Id: <34EBFE89.1118E927@olywa.net>
Collaborators.
Steve
Matthew Pryor wrote:
>
> So what do you call an MS solution provider?
> Are they the prison wardens? Or maybe
> they run the torture chambers. Or are they
> just prisoners too?
>
> Food for thought.
>
> Philip Hood wrote:
>
> > Or those who don't have a PANIX account w/ perl as there shell.
> >
> > more later ...
> > PH
> >
> > Nathan V. Patwardhan (nvp@shore.net) wrote:
> > : Larry D'Anna (ldanna@hotmail.com) wrote:
> >
> > : Or those who don't understand an application without a gui or a window
> > : manager without a Start button. :-)
------------------------------
Date: Wed, 18 Feb 1998 00:48:24 -0500
From: Larry D'Anna <ldanna@hotmail.com>
Subject: Re: Q: scalar @{[/$f/g]}
Message-Id: <34EA7628.1E4C5B25@hotmail.com>
Larry D'Anna wrote:
>
> Andrew Johnson wrote:
> >
> > Eli the Bearded wrote:
> >
> > [snip]
> > ! > I'm overlooking something far simpler to return the number of matches of
> > ! > an expression, $foo, in the default search space, $_.
> > !
> > ! $a = scalar @{[/$foo/g]};
> > ! $b = @{[/$foo/g]};
> > ! $c = s/($foo)/$1/g
> > ! $d = split /$foo/ -1 # not pretty, not recommended, but works
> > !
> > ! Doubtless other people can come up with others.
> >
> > as of 5.004:
> >
> > $e=()=/$foo/g;
> >
> > but although I've mentioned it before, I've yet to hear whether
> > this (apparently undocumented) behaviour is intentional or
> > merely an accident of other changes in 5.004.
> >
>
> that is verry strange, how does it work?
After reading a few more posts I happened to stumble across
the answer:
The scalar result of a list assignment is the number of
elements assigned to.
---------------------------------------------------
|Democracy is the worst system of government. --
|Except for all the others
| -Winston Churchill
---------------------------------------------------
Larry D'Anna "eschew obfuscation"
------------------------------
Date: Thu, 19 Feb 1998 05:14:30 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: REMOTE_HOST
Message-Id: <34ebb1a6.524144494f47414741@radiogaga.harz.de>
Steve (trollboy@usa.net) wrote:
: How do i have a script log your ip address so it looks like for
: example this: p9.ts3.lowel.MA.tiac.com instead of 207.60.164.74
perldoc perlfunc or Net::hostent, look for gethostbyaddr
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: 19 Feb 1998 01:04:03 +0100
From: Martin Bialasinski <agr30@uni-koeln.de>
Subject: Re: Retrieving mail from host
Message-Id: <87afbotq8c.fsf@haitech.internet-treff.de>
farber@f-tech.net (Paul Farber) writes:
> Well, does perl have a module or something that will just return teh
> message of an e-mail????
Yes. Surprisingly these are the Mail::* and Mime::* modules. Did you check
CPAN?
Ciao,
Martin
------------------------------
Date: Thu, 19 Feb 1998 14:59:48 +1100
From: Jaime Metcher <metcher@spider.herston.uq.edu.au>
Subject: Re: RTFM ???
Message-Id: <34EBAE34.E5C4C7DF@spider.herston.uq.edu.au>
Andrew M. Langmead wrote:
>
snip
> Have you every noticed that every once and a while you get a
> fascinating question from someone who is trying to use your product in
> a way you (or maybe anybody) ever has before? And once you're done,
> you think to yourself "that is so neat." and you're filled with a
> sense of awe and wonderment.
>
Absolutely! Or "that is so dumb". Or (often) "that is so weird". I
often think to myself (while watching someone abuse a piece of software
in some completely unprecedented way): "Microsoft invested millions of
dollars in useability testing on thousands of people from all walks of
life. But in all those thousands of people - they *never* came across
one like this!". Computer support is like psychiatry - you get to see
inside people's minds and man, is it bizarre!
snip
> There are so many interesting things that can be done in perl. I'd
> like to hear about a few of them.
hear, hear - not that this post is helping :-(
--
Jaime Metcher
------------------------------
Date: Thu, 19 Feb 1998 01:26:52 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Justin Banks <justinb@cray.com>
Subject: Re: split on ':', but not '\:'
Message-Id: <34EBD0AF.9BD564D4@coos.dartmouth.edu>
[posted and mailed]
Justin Banks wrote:
>
> Hello -
> I'm trying to split a line on colons, except where the colon is
> backslashified, and I can't seem to make it happen. I've tried replacing
> the sequence '\:' before the split, like so :
>
> $line = "one:two:three\:here:four";
> $line =~ s/\\(?=:)/BACKSLASH/g;
> print "$line\n";
>
> But that doesn't work.
That's because you're not replacing the sequence '\:'. You're only replacing
the backslash itself, if it happens to be followed by a colon. (?=) is a
zero-width lookahead assertion, so the colon is not actually part of the match.
Try this instead:
$line =~ s/\\:/BACKSLASHCOLON/g;
and after the split:
$line =~ s/BACKSLASHCOLON/\\:/g;
Of course, other, better solutions have already been posted. I just wanted to
explain why your original, almost correct code wasn't working.
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: 18 Feb 1998 23:48:03 -0500
From: uri@sysarch.com
Subject: Re: String Extraction and checkup (OUCH)
Message-Id: <x7lnv8qjy4.fsf_-_@sysarch.com>
harrison@pixi.com (Robert F. Harrison) writes:
> On Wed, 18 Feb 1998 09:57:59 +0100, Evert Smit <evert.smit@eds.ch> wrote:
> > i am looking for a piece of perl script, that will look at a string, rip
> > it appart, check if it is 8 digits long and make sure that there are 2
> > numbers in it. I am sure someone has this one already and would be
> > eternally thankful, if i could use it.
>
> No one has done this before. I asked everybody. Here's why:
>
> Good news, you don't need any script at all. The answer is all strings
> of 8 digits contain at least 2 numbers.
>
> 12345678
long snip
> Thanks for your thought provoking question.
> -rfh harrison@pixi.com
i hope he recovers from your help really soon :-)
perl never "rips strings apart". that is for other languages.
uri
--
Uri Guttman SYStems ARCHitecture and Software Engineering
uri@sysarch.com Have Perl, Will Hack
http://www.sysarch.com (781) 643-7504 x*2 FAX: (781) 643-2710
Try the Best Search Engine on the Net --------> http://www.northernlight.com
------------------------------
Date: Thu, 19 Feb 1998 05:46:05 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: suid script newbie question
Message-Id: <34ebb90d.524144494f47414741@radiogaga.harz.de>
JackE (jacke@hghed.com) wrote:
:Newsgroups: comp.lang.perl,comp.lang.perl.misc
By the way: comp.lang.perl is a dead parrot, err... camel.
: Hi, all - I have a sort-of-newbie question, which I can't seem to find a
: really straight answer for in any docs I have seen...
: What exactly is a suid script, why is it such a horrendous security hole,
: and how can I fix it? i.e. do I need to rebuild my perl, or what????
As this has more to do with Eunichs than with Perl, please repost
your question to comp.os.unix, comp.security.unix, or any appropriate
comp.unix.*.
cu,
Martin
P.S.: At least, your post had the word "perl" in it...
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 19 Feb 1998 01:36:42 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: ts: Remove files in a PERL sript
Message-Id: <34EBD2FD.9680A1E8@coos.dartmouth.edu>
tsatan@hotmail.com wrote:
>
> From the keyboard of Tom Christiansen <tchrist@mox.perl.com>:
> | In comp.lang.perl.misc, PTBS <ptbs@mail.dma.be> writes:
> | :Then I want to remove the files from my /temp directory.
> | :But how can I do that?
> |
> | You grep for "Delete" in the perlfunc manpage. You want the matches
>
> Wrong. Use the unlink function like this:
>
> unlink "/etc/passwd" or die "cannot unlink: $!";
It's much easier to correct someone when you quote out of context, isn't it?
In the original post, Tom goes on to say, "You want the matches for the
functions that talk about files and directories, not those for arrays or
hashes." In other words, if you grep for "Delete" in the perlfunc manpage,
you get:
Deletes the specified value from its hash array. Returns the
Deletes the directory specified by FILENAME if it is empty. If
Deletes a list of files. Returns the number of files
And what do you know, that last one mentions files. Now all you need to do is
find where that line is in the manpage, and you've got the "unlink" function.
So, Tom Christiansen's answer was *not* wrong. Now, I want you to think about
what you've done.
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: Thu, 19 Feb 1998 05:56:11 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: ts: ts: Remove files in a PERL sript
Message-Id: <34ebbb6b.524144494f47414741@radiogaga.harz.de>
tsatan@hotmail.com wrote:
: From the keyboard of Tom Christiansen <tchrist@mox.perl.com>:
: | In comp.lang.perl.misc, tsatan@hotmail.com writes:
: | :Wrong. Use the unlink function like this:
: |
: | Don't tell people answers that are in the manpages or faqs.
: Wrong. You so easily dismiss people who are new to perl.
: I don't feel it's proper for you to cut and dry it as you
: do. It doesn't help the discussion for you to be so impenetrable.
Wrong. It's always better in the long run to help people to help themselves.
In this particular case: given your answer, the poster will be back when
he looks for a function to find the first occurrence of a substring in a
string. Given Tom's answer, he'll grep through perlfunc for 'substring'
and eventually find index().
cu,
Martin
--
| Martin Vorlaender | VMS & WNT programmer
Ceterum censeo | work: mv@pdv-systeme.de
Redmondem delendam esse. | http://www.pdv-systeme.de/users/martinv/
| home: martin@radiogaga.harz.de
------------------------------
Date: Thu, 19 Feb 1998 02:46:53 -0300
From: "Fabiano Vanucci" <vanucci@sp.dglnet.com.br>
Subject: Re: Verifying a URL?
Message-Id: <887863449.817556@citroen>
Stewart Eastham escreveu na mensagem <34EA2E7D.B06726A9@planetpod.com>...
>Is there a way to verify a URL exists using PERL? I looked into the
>Net::Ping module, but that only verifies hosts, instead of actual web
>pages.
>
>stewart eastham
>sme@planetpod.com
>
>
Use LWP to get an URL request. If your URL exist it will return OK and the
page you requested.
hope this help.
Fabiano Vanucci
www.nucci.com.br and www.pizzabynet.com.br
------------------------------
Date: Thu, 19 Feb 1998 01:54:11 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
To: Mohamed Hendawi <moe@alum.mit.edu>
Subject: Re: Writing a "println" function that works just like "print"
Message-Id: <34EBD717.B3EB1E9C@coos.dartmouth.edu>
[posted and mailed]
(comp.lang.perl no longer exists. If it appears on your system, ask your news
admin to remove it.)
Mohamed Hendawi wrote:
>
> I would like to implement a simple function "println" that works
> exactly like the built-in perl print function, except that it appends
> a newline to the printed output.
Does the $\ variable suit your needs, or do you really need a separate function?
Find out more about $\ (aka $OUTPUT_RECORD_SEPARATOR aka $ORS) in the
documentation for perlvar.
--
_ / ' _ / rjk@coos.dartmouth.edu
( /)//)//)(//)/( chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
------------------------------
Date: Wed, 18 Feb 1998 22:37:15 -0800
From: RandallBart <Barticus@worldnet.att.spam.net>
Subject: Re: Year 2000 Compliance: Lawyers, Liars, and Perl
Message-Id: <6cgk2a$d41@bgtnsc03.worldnet.att.net>
Steve Dover wrote:
>
> Bart Lateur wrote:
> >
> > seebs@plethora.net (Peter Seebach) wrote:
> >
> > >The struct tm has been Y2K-ready for a long time.
> > >I dread the 34,667 bug.
> >
> > Do you expect still to be alive by then? Or do you expect
> > your programs still to be used? Really?
There is no need to worry about software surviving until 34,667.
Society will be destroyed by Y10k.
> Time marches on, but by design, a given date or timestamp datam
> will only be allocated so many bits. At some point in time,
> more bits will need to be allocated. There's no way around it.
64 bits of seconds will hold the known age of the universe. That's a
design limitation I can live with.
--
I |\ Randall Bart mailto:Barticus@usa.spam.net
L |/
o |\ Barticus@worldnet.att.spam.net Barticus@hotmail.spam.com
v | \ 1-818-985-3259 Please reply without spam
e |\
Y |/ Panic in the Year Zero Zero: http://members.aol.com/PanicYr00
o |\ 29th Term Revealed (!?):
u |/ http://members.aol.com/PanicYr00/Sequence.html
------------------------------
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 1930
**************************************