[9544] in Perl-Users-Digest
Perl-Users Digest, Issue: 3138 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 13 05:17:19 1998
Date: Mon, 13 Jul 98 02:00:32 -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 Mon, 13 Jul 1998 Volume: 8 Number: 3138
Today's topics:
Re: \Q and \E (Marc Haber)
Re: Arrays (Martien Verbruggen)
Re: attachment to email kscope@the-city.com
Re: attachment to email <bowlin@sirius.com>
Re: Bizarre copy of ARRAY in aassign? justinb@ignored.cray.com
boolean searh in files <xah@shell13.ba.best.com>
Re: Changing filename automatically with perl (-)
Re: Code for deciding week number? (-)
directory name globbing with ActiveState Perl for Win32 <blok@physics.ubc.ca>
Re: Does your Web host offer ....? (-)
Re: Free newsletter services [Was: Re: trigger sending (-)
Re: Help with cgi-lib.pl and input text boxes <julia@avk.com>
Re: Need a more efficient sort subroutine. (-)
Re: Perl At Work scott@softbase.com
Re: Perl-like C++ class library (Lars Gregersen)
Re: Putting CPAN on a CD: good or not good? (Bernhard Muenzer)
Re: Putting CPAN on a CD: good or not good? (Bart Lateur)
Re: redux, step 1 (was Re: new charter and moderator fo (Iain Chalmers)
s: simple-database <Adam.K@idnet.de>
Re: Silly question about IO::SOCKET (Ronald J Kimball)
Re: tree data structure <rpsavage@ozemail.com.au>
Re: tree data structure <jgraham@uvic.ca>
use Sys::Syslog tricks <pcrown@ispnews.com>
Re: Weirdness in trying to extract year from localtime (Bart Lateur)
Re: What's the substitute for #! /usr/bin/perl in Win32 <bowlin@sirius.com>
Re: Why is Dave operating here? (was Re: REPOST: Re: ) (Jay Denebeim)
Re: Why is Dave operating here? (was Re: REPOST: Re: ) <andrew@erlenstar.demon.co.uk>
Re: Why is Dave operating here? (was Re: REPOST: Re: ) <david@work.net.nz>
Re: Why is Dave operating here? (was Re: REPOST: Re: ) (Abigail)
Re: Why is Dave operating here? (was Re: REPOST: Re: ) (Daniel E. Macks)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 12 Jul 1998 20:24:54 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: \Q and \E
Message-Id: <6ob63r$pi7$2@nz12.rz.uni-karlsruhe.de>
rjk@coos.dartmouth.edu (Ronald J Kimball) wrote:
>$str =~ s/\\Q((?:[^\\]|\\[^E])*)(?:\\E|$)/quotemeta($1)/eggs;
I will have to think a few hour about that exp :-)
Greetings
Marc
--
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber | " Questions are the | Mailadresse im Header
Karlsruhe, Germany | Beginning of Wisdom " | Fon: *49 721 966 32 15
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29
------------------------------
Date: 12 Jul 1998 23:01:10 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Arrays
Message-Id: <6obf7m$pqf$1@comdyn.comdyn.com.au>
In article <slrn6qc5p5.n2k.the_wildman_98@foobar.net>,
the_wildman_98@hotmail.com (The Wildman) writes:
> That was a typo. If I go through another loop, this time with
Typos are important in programmer's land.
> print $array[$i],"\n";
> it prints the same value. Making me think that I am not dealing with an
> array at all.
Your code was:
for ($i = 0;$i < MAX;$i++) {
$array[$i] = $i;
}
$array[$i] refers to an array element. Even if you have $array and
%array in use somewhere, @array will still be an array. The code
above, apart from the MAX should work, and I will demonstrate that it
does:
#!/usr/local/bin/perl -w
use strict;
# Because of the use strict (good idea), I need to predeclare stuff
my $MAX = 3;
my $i;
my @array;
for ($i = 0; $i < $MAX; $i++)
{
$array[$i] = $i;
}
for ($i = 0; $i < $MAX; $i++)
{
print "$i: $array[$i]\n";
}
__END__
0: 0
1: 1
2: 2
This works fine. Maybe there is something wrong with something else in
your code?
You could use something a little more perlish with foreach (which is
basically for) and the range operator (see perlop):
my $MAX = 2;
foreach $i (0 .. $MAX)
{
}
Martien
-
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: Mon, 13 Jul 1998 04:59:44 GMT
From: kscope@the-city.com
Subject: Re: attachment to email
Message-Id: <6oc480$v4t$1@nnrp1.dejanews.com>
In article <35a404ae.9987575@nntp.idsonline.com>,
root.noharvest.\@not_even\here.com wrote:
> Charles Maier <maierc@chesco.com> Said this:
> #!/usr/bin/perl
>
> $uuencoded = `uuencode web.htm encoded.txt`;
>
> open (MAIL, "|/usr/sbin/sendmail -t");
> print MAIL "From: bob\@lmnet.com (Bob) \n";
> print MAIL "To: webmaster\@lmnet.com (Webmaster) \n";
> print MAIL "Subject: Test Attachment\n";
> print MAIL "\n";
> print MAIL <<"END_OF_MESSAGE";
>
> Hello, this is a message. I want to send an attachment with it, to see
> how that works
> END_OF_MESSAGE
>
> print MAIL $uuencoded;
> print MAIL "\n";
> close MAIL
>
> This script encoded a file in the current directory named web.htm and
> sent it to webmaster \@ lmnet . com and I received it as "encoded.txt"
> in my windows based mail client.
>
charles - i tried this script, and what i got [after i remembered the back
ticks] was the contents of the .htm file printed at the end of the body of the
email message. i'm also on a unix box with apache - windows based mail client.
any thoughts?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: Sun, 12 Jul 1998 23:02:50 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: kscope@the-city.com
Subject: Re: attachment to email
Message-Id: <35A9A30A.EE5559BD@sirius.com>
kscope@the-city.com wrote:
> charles - i tried this script, and what i got [after i remembered the back
> ticks] was the contents of the .htm file printed at the end of the body of the
> email message. i'm also on a unix box with apache - windows based mail client.
> any thoughts?
I can send you a module that will send email with attachments.
It works on Unix and Windows.
-- Jim Bowlin
------------------------------
Date: 12 Jul 1998 23:10:25 -0700
From: justinb@ignored.cray.com
Subject: Re: Bizarre copy of ARRAY in aassign?
Message-Id: <kgcu34mi8mm.fsf@dervish.cray.com>
Gellyfish@btinternet.com (Jonathan Stowe) writes:
> On 10 Jul 1998 18:00:15 -0700, justinb@ignored.cray.com wrote :
> Maybe a snippet of the code that produced the message hey ? We are
> after all not capable of psychic diagnosis.
This might be helpful, but as I said before, the error is being
reported at :
Bizarre copy of ARRAY in aassign at /sw/pd/perl/5.004_o32/lib/perl5db.pl
line 1122, <IN> chunk 20.
Since this isn't my code, I'm not sure what to do. Interestingly enough,
having moved on with the older version and modifying my code extensively,
I cannot replicate the problem. This is probably because I tool all
DBI stuff out. Since I've got it under RCS, though, I would imagine that
I could co that revision if needed, and post, if you really think that
would help. Regardless, the Camel says that users should *never* see
this sort of error, and as I did, I thought that people might be interested
in it.
> Perhaps it might also be
> illuminating for you to look into the CHANGES document with your Perl
> in order to see what has changes in respect of the kind of statement
> that has caused the error.
Not much, that I can see. Then again, I'm not sure what I would be
looking for, except an array assignment.
--
Justin Banks - Silicon Graphics Inc. Eagan, MN
The Church says that the earth is flat, but I know that it is round, for
I have seen the shadow on the moon, and I have more faith in a shadow
than in the Church. --Ferdinand Magellan
------------------------------
Date: 13 Jul 1998 01:12:51 -0700
From: Xah Lee <xah@shell13.ba.best.com>
Subject: boolean searh in files
Message-Id: <yo3lnpytbi4.fsf@shell13.ba.best.com>
In most www search engines, we can seach using boolean operators. Is there an equivalent engine written in Perl?
For example, I want to use criterions:
("geometry" and "algebra") not "algebraic"
to find files of a given folder that satisfy the above within, say, 200 words. (say, 4 char per word)
Of course, if all we want is simple AND operators, it's trivial to do in Perl. (Attached below my sig is an example.)
Xah
xah@best.com
http://www.best.com/~xah/SpecialPlaneCurves_dir/specialPlaneCurves.html
"Lesson for Unix weenies: Break lines at logical points only"
-- MacPerl --
# script description:
# search a folder for files whose lines contain certain combination of strings. For example, find files that contain the word "algebra" and "geometry", within 10 lines. This is a template script. Modify to suite needs before run. Xah.
# created: 1998/06.
# Last modified: 1998/06.
# inputs: a folder path.
# output: print file paths to STDOUT.
use strict;
use File::Find;
#-- arguments --
my $folderPath=q(user347:T2:perl_files_dir:perl_scripts_dir:searchStringInFiles.pl);
my @searchStringsArray=(q(Remember),q(graphs));
my $stringUnitSeparater=qq(\n);
my $unitsPerBlock=20;
my $fileNameEndingString=q(.txt);
#-- subroutines --
# &processFile() will check if file $File::Find::name contains the search strings. If so, print the file path to stdout.
sub processFile {
my $currentFile = $File::Find::name;
if (-d $currentFile) {return 1;}; # if file is directory, do nothing.
if ($currentFile!~m{$fileNameEndingString$}) {return 1;}; # if file is not the right type, do nothing.
if (not(open(FILE,$currentFile))) {die(qq(Error: problem opening file: $!));};
my $line;
my @textBlockArray= split(m(\|),q( |)x$unitsPerBlock);
my $textBlock=join(q(),@textBlockArray);
local $/=$stringUnitSeparater;
while (defined($line = <FILE>)) {
push(@textBlockArray,$line); shift @textBlockArray;
$textBlock=join(q(),@textBlockArray);
if (textContainsStringQ($textBlock,@searchStringsArray)) {print qq($currentFile\n); return 1;};
};
close(FILE);
};
# &textContainsStringQ("text","string1","string2",...) returns true (1) if "text" contains one of the stringi, else, false (0).
sub textContainsStringQ {
my $text = shift @_;
my @searchStrigsArray=@_;
my $regexPattern=join(q(|),@searchStrigsArray);
if ($text=~m{$regexPattern}) {return 1;} else {return 0;};
};
#-- main body --
find(\&processFile,$folderPath);
__END__
------------------------------
Date: Mon, 13 Jul 1998 07:52:04 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Changing filename automatically with perl
Message-Id: <35a9bb0a.44216055@nntp.idsonline.com>
jevon@my-dejanews.com Said this:
>Hey.. I am looking for suggestions.
>
>In my script I am outputting individual files. I want them to be named
>game1.gme, game2.gme etc...
>
>I want to know how to read in what the last file is (ie. Largest number) and
>then add one (1) to it..
>
grep your directory contents into an array, like this:
opendir (RETURN, "/directory/path");
@files = grep(!/^\.\.?$/,readdir(RETURN));
closedir (RETURN);
Then loop through the array, strip off the non-numeric characters, and
increment the highest number found by one.
foreach $file (@files)
{
($file, $ext) = split(/\./, $file);
$file =~ s/\D//g;
if ($file >= $lastfile)
{
$lastfile = $file;
}
}
$lastfile++;
Now you can use $lastfile as the incremented number to create the next
file.
------------------------------
Date: Mon, 13 Jul 1998 07:43:42 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Code for deciding week number?
Message-Id: <35a9b952.43775652@nntp.idsonline.com>
Thomas Albech <thomas@provideo.dk> Said this:
>How do you mathematically decide, which week number we are currently in?
>Is there any expression for it
>in combination with the Time module?
>
I bet there's some module already... try the CPAN.
http://www.perl.org/CPAN
Since i've never needed the week number, I am not aware of any
explicit tool/feature/function/whatever but I suspect there is
something, especially in unix, to get this info directly. I mean, for
some financial stuff, this would be important, I would think.
------------------------------
Date: Sun, 12 Jul 1998 21:00:07 -0700
From: Rik Blok <blok@physics.ubc.ca>
Subject: directory name globbing with ActiveState Perl for Win32
Message-Id: <35A98647.4D2414D0@physics.ubc.ca>
I am trying to use some advanced filename globbing that supports
wildcarded directory names (like /p*/*.pm) under ActiveState's Perl for
Win32 (Perl version 5.00307). I've seen a module called "DosGlob" that
is apparently included in the standard release as of v5.004 which should
do the trick.
I was hoping I could just download that module and ...ta da! it would
work but it didn't (of course). When I try to "use" it it complains
"Bad command or filename" in the output.
Anyways, does anybody know how I can get directory globbing with the
ActiveState release?
Please reply via email.
Thanks in advance,
Rik.
--
Rik Blok <blok@physics.ubc.ca>
Department of Physics and Astronomy,
University of British Columbia, Canada
http://www.physics.ubc.ca/~blok/
------------------------------
Date: Mon, 13 Jul 1998 07:19:56 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Does your Web host offer ....?
Message-Id: <35a9b477.42532465@nntp.idsonline.com>
Dan Baker <dtbaker_@flash.net> Said this:
>megauser@my-dejanews.com wrote:
>...
>> Here is one that does...all in one place....No Unix is required...30 day free
>> trial.
>> http://www.useractive.com
>-------------
>
>wow, I can't believe this not only got cross posted to so many groups,
>but groups that have the capability to rip the person apart probably....
>how does this get "handled?" Quietly ignored? special mail-bots to bury
>the site?
>
Attacking the site by mailbombing them or anything like that would
make you no better than they are. It's like keying someone's car
because they took "your parking space". Juvenile, unconstructive, and
utterly stupid.
If this post bothered you, traceroute www.useractive.com and find out
who their upstream provider is. Contact them and complain that they
are spamming. They'll get a warning this time, and if they continue,
they could get their plug pulled.
Do it.... that's the best weapon against these schmucks.
------------------------------
Date: Mon, 13 Jul 1998 07:15:57 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Free newsletter services [Was: Re: trigger sending a Free Newsletter
Message-Id: <35a9b0ac.41574231@nntp.idsonline.com>
lvirden@cas.org Said this:
>
>According to Dan Baker <dtbaker_@flash.net>:
>:This is not a perl solution, but if you don't want to mess with the
>:upkeep of the database, or sending bulk mail at all, you can accomplish
>:the same thing by using NetMind to do it for you. I've used it on
>:several websites, and it's a super way to let readers control their own
>:notification when you update a page. check out http://www.netmind.com
>:
>
>And of course there are other sites as well. For instance, onelist.com
>provides a moderated, announce only style mailing list that you can set
>up. CommunityWare.com I believe it is has a newsletter feature that
>goes out to the members of the appropriate web forum group, etc.
>
There are a few drawbacks to this though.
First, your user list is accessible to a third party. While they may
or may not be trustworthy, it's still an issue. especially if, in the
future, you want to sell this list to someone else (I don't mean to a
spammer, but to an "affinity group" or something) - the potential
buyer might balk at your price and could simply go to this other party
and get a better deal, leaving you with nothing. Maybe that's a
long-shot, but it's a consideration.
Second, some people may notice that your newsletter is being run from
another company, and may find that unnerving (whether that's a
rational fear or not, who cares) and may choose not to subscribe. Or,
in a more likely case.... they won't know until after they've
subscribed, and upon seeing the newsletter coming from an unfamiliar
source, they might get upset and unsubscribe immediately, thinking
they were just "spammed". Don't forget, they subscribed to YOUR
newsletter, because they are familiar with your "brand" and you've
made them feel comfortable with your company/service/whatever.
Now, I'm not saying that you shouldn't use these services... I'm just
saying that these are a few considerations. Probably not a big deal,
but maybe they are to you.
If you can set up majordomo, or even use one of the win95 based smtp
servers, it's not that big of a deal to just run your own newsletter.
Once majordomo is up and running, sending out the newsletter is as
easy as sending any other email message.
------------------------------
Date: Sun, 12 Jul 1998 22:21:16 -0700
From: Julia Gaskill <julia@avk.com>
Subject: Re: Help with cgi-lib.pl and input text boxes
Message-Id: <35A9994C.B35C9A90@avk.com>
Emmett McLean wrote:
> Hi,
>
> I'd like to use cgi-lib.pl which comes with the
> Apache distribution. It works great except that
> in an input text control all text after the
> first blank gets annilated. Is there work around,
> without using JavaScript which allows you to
> extract all data in an input text control?
>
> Thanks,
>
> Emmett
input type=textarea - not - textbox
--
God did not create the world in seven days; he screwed around for six
days and then pulled an all-nighter.
------------------------------
Date: Mon, 13 Jul 1998 08:06:00 GMT
From: root.noharvest.\@not_even\here.com (-)
Subject: Re: Need a more efficient sort subroutine.
Message-Id: <35a9be44.45041357@nntp.idsonline.com>
meeko@meeko.org (Meeko) Said this:
>I am writing a program which will let a user sort the contents of a
>csv file according to as many columns as he/she wishes to, however
>the sort routine I am using is taking extremely long, and since I am
>not an expert on writing efficient sort routines, I figured someone
>could come up with a much better one. Here is what I am doing right
>now:
There is a sort module available at the CPAN.
Sort.pm, I think.
once you add this to your script,
use Sort::Fields;
You can do this:
@sort_out = fieldsort '\^', [2, '-3n', 4], @sort_in;
where @sort_out is obviously the sorted array, '\^' is your delimiter
(caret in this case), [2, '-3n', 4] If I recall means sort fields 2, 3
in reverse numeric, and 4, and @sort_in is the array to be sorted.
Pretty straightforward. On my pentium pro box, it takes about 2 or 3
minutes to sort a 20 megabyte file on those three fields. I imagine
that even if it takes just as long on your 3 megabyte files, that
would be an improvement. I'm guessing it would take less than a
minute or at most 2 minutes for what you described.
------------------------------
Date: 7 Jul 1998 21:51:45 GMT
From: scott@softbase.com
Subject: Re: Perl At Work
Message-Id: <6nu59h$qlu$3@mainsrv.main.nc.us>
> What did Bill Gates say as they were leading him to the guillotine?
"I funded the first Perl port to Windows!"
Scott
--
Look at Softbase Systems' client/server tools, www.softbase.com
Check out the Essential 97 package for Windows 95 www.skwc.com/essent
All my other cool web pages are available from that site too!
My demo tape, artwork, poetry, The Windows 95 Book FAQ, and more.
------------------------------
Date: Mon, 13 Jul 1998 07:34:05 GMT
From: lg@kt.dtu.dk (Lars Gregersen)
Subject: Re: Perl-like C++ class library
Message-Id: <35a9b83d.3799766@news.dtu.dk>
[posted and mailed]
On Sat, 11 Jul 1998 05:23:42 GMT, eodell@pobox.com (Eric O'Dell)
wrote:
>I've been working on a C++ class library designed to provide Perl-like
>functionality to C++ programmers when it is not possible or desirable
Do you know SPLASH? It's free and great!
See:
http://www.wolfman.com/splash.html
Lars
Lars Gregersen, M.Sc. Chem. Engng.
Department of Chemical Engineering, DTU, Denmark
E-mail: lg@kt.dtu.dk
Homepage: http://www.gbar.dtu.dk/~matlg/
------------------------------
Date: Mon, 13 Jul 1998 08:01:54 GMT
From: bmuenzer@compuserve.com (Bernhard Muenzer)
Subject: Re: Putting CPAN on a CD: good or not good?
Message-Id: <uYhz5Tjr9GA.335@nih2naaa.prod2.compuserve.com>
Keywords: from just another new york perl hacker
PC Magazin always comes with a CD-ROM attached, and they also make the
content of the CD-ROM available on their Web site:
http://www.pc-magazin.de/
The CD usually contains high-quality shareware and freeware, and usually
it is cheaper to buy the magazine with the CD-ROM than to feed the
German Telekom downloading the stuff for "free" (FYI: my Telekom bill
often lists more than 100 DM for _local_ calls only).
--
int m,u,e=0;float l,_,I;main(){for(;1840-e;putchar((++e>907&&942>e?
61-m:u)["\n)moc.isc@rezneumb(rezneuM drahnreB"]))for(u=_=l=0;79-(m=
e%80)&&I*l+_*_<6&&26-++u;_=2*l*_+e/80*.09-1,l=I)I=l*l-_*_-2+m/27.;}
------------------------------
Date: Mon, 13 Jul 1998 09:07:07 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Putting CPAN on a CD: good or not good?
Message-Id: <35acc42f.1779734@news.tornado.be>
Kent Perrier wrote:
>Randal Schwartz <merlyn@stonehenge.com> writes:
>>
>> Seriously though, "not going to jail" is a long way from "no longer a
>> felon". That's another two years in the making <sigh, crossing
>> fingers>.
>
>This is a new developement (at least to me). What happened?
>(Email or a URL to check out is fine for an answer.)
Randal posted an announcement in these newsgroups on july 8th.
Newsgroups: comp.lang.perl.misc,comp.lang.perl.modules
Subject: aside: my .signature just got shorter
From: Randal Schwartz <merlyn@stonehenge.com>
Message-ID: <news:8ck95ofdsn.fsf@gadget.cscaper.com>
BTW my sincere congrats to Randal. I hope it'll turn out better still.
Bart.
------------------------------
Date: Mon, 13 Jul 1998 16:48:17 +1000
From: bigiain@mightymedia.com.au (Iain Chalmers)
Subject: Re: redux, step 1 (was Re: new charter and moderator for comp.lang.perl.announce)
Message-Id: <bigiain-1307981648170001@bigman.mighty.aust.com>
In comp.lang.perl.misc, tchrist@mox.perl.com (Tom Christiansen) wrote:
<snip->
> In comp.lang.perl.misc,
> pjfarley@banet.net (Peter J. Farley III) writes:
> :Resume's are even wormier. But if you allow postings, resume's are a
> :natural concommitant.
>
> No. Just no.
>
> --tom
I agree, but if you too many people don't, my second preference would be
Birgitts idea of a weekly or bi-weekly collection - the clpa
classifieds???
count me as a yes for labelled commercial and non-programmer posts too...
Iain
------------------------------
Date: Mon, 13 Jul 1998 08:30:21 +0200
From: Adam Kopacz <Adam.K@idnet.de>
Subject: s: simple-database
Message-Id: <th9co6.39.ln@news.kLo.de>
Hi,
[sorry for my bad english]
i search a small 'database' perl script.
it should write and count some strings to a file.
the file should look like this:
128 bla
4 xyz
2 abc
12 uggaa
the script should scan the file for the string and if its not there
than it should add it and the number 1. if the string comes again then
the number should be make ++..
this perl app should be for my private WWW site. it should give me a
small insight about the www-browser the user are using.
could someone help me with this or has a finished script for this ?
i'm verry new in perl5 :(
--
Adam Kopacz - http://www.idnet.de/~AdamK - ICQ# 257499
------------------------------
Date: Mon, 13 Jul 1998 00:04:42 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: Silly question about IO::SOCKET
Message-Id: <1dc2vwm.15i806knrp72kN@bay1-529.quincy.ziplink.net>
David Thompson <domainsource@usa.net> wrote:
> while (<$remote>) {print}
> [...]
> Now, my silly questions is if I want to save the results into a string
> instead of printing it, what do I put after the while?
This question has absolutely nothing to do with the IO::Socket module.
> Would $somestring .= $remote work? Thanks!!!
No. The value of $remote is a filehandle, not the input read from the
filehandle. Input, input, who's got the input?
The input is in $_. Read about <> in the Perl documentation to find out
why.
--
_ / ' _ / - aka - rjk@coos.dartmouth.edu
( /)//)//)(//)/( Ronald J Kimball chipmunk@m-net.arbornet.org
/ http://www.ziplink.net/~rjk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: 13 Jul 1998 04:23:14 GMT
From: "Ron Savage" <rpsavage@ozemail.com.au>
Subject: Re: tree data structure
Message-Id: <01bdae17$a1aea4e0$43ea1286@steelres-pcm657.resmel.bhp.com.au>
Examine signature.
Check web site.
Download Class::Tree.pm, classTree.pl, dirTree.pl.
Study.
Abandon hope...
Jonah Graham <jgraham@uvic.ca> wrote in article
<YQcq1.3154$xs3.1402562@news.rdc1.bc.wave.home.com>...
> Has anyone out there ever used a tree in PERL? If someone has could you
> please post it.
>
> Thanks,
> Jonah
>
>
>
>
------------------------------
Date: Mon, 13 Jul 1998 04:50:50 GMT
From: "Jonah Graham" <jgraham@uvic.ca>
Subject: Re: tree data structure
Message-Id: <Kmgq1.3333$xs3.1496404@news.rdc1.bc.wave.home.com>
It seems that your signature is missing. Could you please re-send it.
Thanks,
Jonah
Ron Savage wrote in message
<01bdae17$a1aea4e0$43ea1286@steelres-pcm657.resmel.bhp.com.au>...
>Examine signature.
>Check web site.
>Download Class::Tree.pm, classTree.pl, dirTree.pl.
>Study.
>Abandon hope...
>
>Jonah Graham <jgraham@uvic.ca> wrote in article
><YQcq1.3154$xs3.1402562@news.rdc1.bc.wave.home.com>...
>> Has anyone out there ever used a tree in PERL? If someone has could you
>> please post it.
>>
>> Thanks,
>> Jonah
>>
>>
>>
>>
------------------------------
Date: 12 Jul 1998 23:25:07 -0500
From: Phil Crown <pcrown@ispnews.com>
Subject: use Sys::Syslog tricks
Message-Id: <iul2z8bg.fsf@ispnews.com>
What's required to get use Sys::Syslog working (Linux, FreeBSD,
Solaris)?
I've run h2ph and now get an error that the facility/level 'info' not
recognized and/or LOG_DEBUG is not defined.
The examples I am trying are straight from Syslog.pm.
I've searched and read the FAQ but found nothing about how to set this
up.
--
Phil Crown
------------------------------
Date: Mon, 13 Jul 1998 09:07:09 GMT
From: bart.mediamind@tornado.be (Bart Lateur)
Subject: Re: Weirdness in trying to extract year from localtime
Message-Id: <35afc60d.2257307@news.tornado.be>
Abigail wrote:
>Allen Choy wrote:
>++ Don't I get into a Y2K problem if I add 1900?
>
>Why do you think so?
I think Allen expects localtime() to return just the last two digits of
the year.
For clarity, Allen: you SHOULD add 1900 to the year, as the year is the
number of years since 1900.
Bart.
------------------------------
Date: Sun, 12 Jul 1998 23:07:04 -0700
From: Jim Bowlin <bowlin@sirius.com>
To: jim@spamnot.bokler.com
Subject: Re: What's the substitute for #! /usr/bin/perl in Win32 Perl?
Message-Id: <35A9A407.4B7A3FEB@sirius.com>
James Moore wrote:
>
> Newby needs an answer to the following question:
>
> I'm using the ActiveState Win32 Perl on an NT 4.0 system... what do I
> use in place of the first line (#! /usr/bin/perl) in Unix versions of
> the script ?
On NT this is web server issue. If such a line is needed, the path
to your perl.exe is usually what is needed. Often this is:
#!C:/perl/bin/perl
-- Jim Bowlin
------------------------------
Date: 12 Jul 1998 22:25:19 -0600
From: denebeim@deepthot.ml.org (Jay Denebeim)
Subject: Re: Why is Dave operating here? (was Re: REPOST: Re: )
Message-Id: <6oc27f$p52$1@marvin.deepthot.ml.org>
In article <6oc0bi$3cd$1@news.NERO.NET>,
John Stanley <stanley@skyking.OCE.ORST.EDU> wrote:
>X-Reposted-By: dave@ferret.ocunix.on.ca
>
>When was the charter for this newsgroup changed to invite Dave? I don't
>recall any discussion asking for Dave's "help", and do not appreciate
>losing the ability to cancel my own articles.
Hipcrime is running, Dave usually follows. I'm still seeing attempts
to cancel showing up in my rejected message logs.
Jay
--
* Jay Denebeim Moderator rec.arts.sf.tv.babylon5.moderated *
* newsgroup submission address: b5mod@deepthot.ml.org *
* moderator contact address: b5mod-request@deepthot.ml.org *
* personal contact address: denebeim@deepthot.ml.org *
------------------------------
Date: 13 Jul 1998 05:07:20 +0100
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
Subject: Re: Why is Dave operating here? (was Re: REPOST: Re: )
Message-Id: <87hg0mxukn.fsf@erlenstar.demon.co.uk>
>>>>> "John" == John Stanley <stanley@skyking.OCE.ORST.EDU> writes:
John> X-Reposted-By: dave@ferret.ocunix.on.ca
John> When was the charter for this newsgroup changed to invite Dave?
John> I don't recall any discussion asking for Dave's "help", and do
John> not appreciate losing the ability to cancel my own articles.
I think you'll find that Dave is reposting only those articles
cancelled by the "HipCrime" dweeb who is currently engaged in a rather
pathetic cancel attack.
--
Andrew.
------------------------------
Date: Mon, 13 Jul 1998 16:42:11 +1200
From: David Farrar <david@work.net.nz>
Subject: Re: Why is Dave operating here? (was Re: REPOST: Re: )
Message-Id: <35A99023.1EB2@work.net.nz>
x-no-archive:yes
John Stanley wrote:
>
> X-Reposted-By: dave@ferret.ocunix.on.ca
>
> When was the charter for this newsgroup changed to invite Dave? I
> don't recall any discussion asking for Dave's "help", and do not
> appreciate losing the ability to cancel my own articles.
>From the Cancel FAQ:
"Dave's reposting activities are occasionally extended to include the
rest of news.* and other hierarchies, to resurrect messages removed by
large-scale rogue cancellers"
DPF
------------------------------
Date: 13 Jul 1998 07:08:58 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Why is Dave operating here? (was Re: REPOST: Re: )
Message-Id: <6ocbqa$31g$1@client3.news.psi.net>
John Stanley (stanley@skyking.OCE.ORST.EDU) wrote on MDCCLXXVII September
MCMXCIII in <URL: news:6oc0bi$3cd$1@news.NERO.NET>:
++ X-Reposted-By: dave@ferret.ocunix.on.ca
++
++ When was the charter for this newsgroup changed to invite Dave? I don't
++ recall any discussion asking for Dave's "help", and do not appreciate
++ losing the ability to cancel my own articles.
Since when do we invite people? And what makes you think you lose the
ability to cancel your own articles?
To me, it looks like Dave is resurrecting rogue cancels. Unless you have
the conception that all articles are yours and you should have the ability
to cancel them all, I don't there's anything Dave is preventing you to do.
Abigail
--
perl -MLWP::UserAgent -MHTML::TreeBuilder -MHTML::FormatText -wle'print +(HTML::FormatText -> new -> format (HTML::TreeBuilder -> new -> parse (LWP::UserAgent -> new -> request (HTTP::Request -> new ("GET", "http://work.ucsd.edu:5141/cgi-bin/http_webster?isindex=perl")) -> content)) =~ /(.*\))[-\s]+Addition/s) [0]'
------------------------------
Date: 13 Jul 1998 07:27:57 GMT
From: dmacks@sas.upenn.edu (Daniel E. Macks)
Subject: Re: Why is Dave operating here? (was Re: REPOST: Re: )
Message-Id: <6occtt$g9p$1@netnews.upenn.edu>
John Stanley (stanley@skyking.OCE.ORST.EDU) said:
: X-Reposted-By: dave@ferret.ocunix.on.ca
:
: When was the charter for this newsgroup changed to invite Dave? I don't
: recall any discussion asking for Dave's "help", and do not appreciate
: losing the ability to cancel my own articles.
AFAIK, all reposted articles in CLPM were cross-posted to a
DtR-protected froup. Otherwise I'd suspect that DtR (in line with its
mission) is dealing with a (pathetic-as-usual) cancel storm by
HipSlime. If Hip's expanding to CLPM, better (IMHO) to temporarily
think an extra time before hitting "send" than to lose the froup to
cancels.
dan
--
Daniel Macks
dmacks@a.chem.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 3138
**************************************