[13934] in Perl-Users-Digest
Perl-Users Digest, Issue: 1344 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 10 18:15:35 1999
Date: Wed, 10 Nov 1999 15:15:23 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <942275723-v9-i1344@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Wed, 10 Nov 1999 Volume: 9 Number: 1344
Today's topics:
Re: Perl Wizards <cassell@mail.cor.epa.gov>
Re: Perl Wizards (Kragen Sitaker)
Re: PERLHUMOR: self-printing resume (Tad McClellan)
Re: Portable Perl Code (Kragen Sitaker)
Re: printing 2 character hex as one byte binary? (Kragen Sitaker)
Re: printing 2 character hex as one byte binary? <kbandes@home.com>
REgarding the "x-httpd-cgi" <aparnar@imap4.asu.edu>
Re: REgarding the "x-httpd-cgi" <flavell@mail.cern.ch>
Re: regular expression to parse html out <cassell@mail.cor.epa.gov>
Re: Remebering environmentvariables <cassell@mail.cor.epa.gov>
Re: script dumps core <alex@kawo2.rwth-aachen.de>
Re: Splitting at 255 bytes (Greg Bacon)
Re: Splitting at 255 bytes raju_k@iname.com
Tying a pseudo-hash <mel@disc.com>
Unix Web server to MS Access <webmaster@graceumc-hsv.org>
Re: urgent help please (Tad McClellan)
Re: Using Perl to fill in html fields <cassell@mail.cor.epa.gov>
Re: Virus <aqumsieh@matrox.com>
Re: Virus (Greg Bacon)
Re: Virus (Abigail)
Re: Virus (Sam Holden)
Re: Virus (Kragen Sitaker)
Re: Virus <lr@hpl.hp.com>
W95 & gethostbyname questions (Neil Cherry)
Win32::Internet FTP List problem (Joris Lenior)
Re: Y2K and German drivers (J. Moreno)
Re: YA Find/Replace newbie question <octothorpe12NOocSPAM@yahoo.com.invalid>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 10 Nov 1999 14:35:08 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Perl Wizards
Message-Id: <3829F31C.43B4EF0E@mail.cor.epa.gov>
[no wizards are likely to answer a Subject: line like that - in
future, please write a more descriptive subject]
Nobody wrote:
>
> I am trying to reuse some perl code that has been given to me.
That's a potential problem right there. Aren't you worried
about worms, Trojan horses, security holes, etc. from using
a steaming heap of code you don't understand?
> I am having
> problems with this particular line :
>
> grep(m!$/bin/(.{10}) ! && $ps{$1}++, &safe_backtic("ps -ef"));
>
> I don't understand the first pattern matching statement (or if it is a
> pattern matching statement !) m! ....!
> What do the ! ... ! do ?
Neither do I. The ! ... ! are acting as an alternative to the
usual m// , but I don't see how this can match anything, when
$ matches the end-of-line. What does &safe_backtic do that
backticks won't? It's not like the code is allowing arbitrary
commands there. And it's not like there isn't a better way
to get the process table info. Are you *sure* you want to
trust this code?
> Also are the results of this pattern matching being back substituted into
> $ps{$1} ??
In theory, yes. In practice.. well, what happens when you print
out the contents of %ps ? Is there anything in there that wasn't
there before this line?
> Any help from perl wizards out there would be useful ..
Okay, here's my best advice. Get Andrew Johnson's book
"Elements of Programming with Perl" and learn enough that
you don't have to depend on wonky code from Heaven only
knows where.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 10 Nov 1999 22:57:03 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Perl Wizards
Message-Id: <3LmW3.64946$23.2563387@typ11.nn.bcandid.com>
In article <3829F31C.43B4EF0E@mail.cor.epa.gov>,
David Cassell <cassell@mail.cor.epa.gov> wrote:
>[no wizards are likely to answer a Subject: line like that - in
>future, please write a more descriptive subject]
The fact of your posting contradicts your words :)
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 10 Nov 1999 09:34:01 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: PERLHUMOR: self-printing resume
Message-Id: <slrn82j0ip.rur.tadmc@magna.metronet.com>
On Wed, 10 Nov 1999 13:40:27 GMT, Rick Delaney <rick.delaney@home.com> wrote:
[snip mention of the $a and $b package global variables]
>This is poorly documented.
I agree.
$a and $b are special variables that are not mentioned in perlvar.pod.
> I knew it but couldn't find it anywhere in
>the docs. Anyone?
perldoc -f sort
But who would think to look there when searching for info
about variables?
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 10 Nov 1999 19:11:02 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Portable Perl Code
Message-Id: <arjW3.64494$23.2530407@typ11.nn.bcandid.com>
In article <382e5e77.18419263@news.skynet.be>,
Bart Lateur <bart.lateur@skynet.be> wrote:
>Steven Glicker wrote:
>>I would greatly appreciate knowing how one typically writes portable
>>code in Perl in cases where a function (say alarm) exists in Linux but
>>not in Windows.
>
>Funny enough: alarm() works on DJGPP DOS perl, but not on Activestate.
alarm()'s semantics require interruption of whatever is happening at
the moment, like a hardware interrupt. It's frequently used to
interrupt system calls.
This is obviously doable in DOS. Can you do it in Win32? I'm no Win32 expert.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 10 Nov 1999 19:14:57 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: printing 2 character hex as one byte binary?
Message-Id: <RujW3.64513$23.2530964@typ11.nn.bcandid.com>
In article <80cael$5rl$1@nnrp1.deja.com>,
<Lawrence.Lifshitz@umassmed.edu> wrote:
>OK, I think is different from the slew of questions about
>how to convert hex to "binary". I read in an ascii description
>of a hex number (eg, "f4"). I then want to save it to a file
>as the one byte "binary" equivalent (ie, the number 244 stored
>in one byte).
Run this code to get your solution:
print pack('H*', '7065726c646f63202d66207061636b0a');
>So, what am I missing?
In Perl, a character is a short string, not a small number.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 10 Nov 1999 16:19:19 -0500
From: Kenneth Bandes <kbandes@home.com>
Subject: Re: printing 2 character hex as one byte binary?
Message-Id: <3829E157.E48E9601@home.com>
Lawrence.Lifshitz@ummed.edu wrote:
>
> OK, I think is different from the slew of questions about
> how to convert hex to "binary". I read in an ascii description
> of a hex number (eg, "f4"). I then want to save it to a file
> as the one byte "binary" equivalent (ie, the number 244 stored
> in one byte). I tried doing $decimal = hex($hexstring) which
> converts f4 to 244. But when I try to print it out it always comes
> out as the ascii string "244".
...
You want pack. You could do
$bin = pack "H2", $hexstring;
This interprets $hexstring as 2 hex digits, high-nybble first,
and converts it to a byte, exactly as you want.
You may read about pack in perlfunc, or do
perldoc -f pack
Ken Bandes
------------------------------
Date: Wed, 10 Nov 1999 12:20:52 -0700
From: Aparna Ramachandran <aparnar@imap4.asu.edu>
To: Mohan Sakhrani <mssakhrani@ucdavis.edu>
Subject: REgarding the "x-httpd-cgi"
Message-Id: <Pine.GSO.3.96.991110121944.24219B-100000@general2.asu.edu>
Hi,
WE are trying to create a discussion borad for educational purposes.In doing
so, I came up with an error during the posting of messages.The error is
"You have started to download the file "Myfilename.cgi" of type
"application /x-httpd/cgi-bin".Click more info to learn about Navigator's
capabilites.
More info Pick Appl Save File Cancel
I came across your replies in one of the discussion groups in the web.I would
be very grateful if you could help me out.
Regards
Aparna
-------------------------------------------------------------------------------
APARNA RAMACHANDRAN
Graduate Assistant
MATI Computing Lab
Hispanic Research Center
Arizona State University
Email: aparnar@asu.edu
Phone: 480-965-5642(O)
480-921-0176(R)
-------------------------------------------------------------------------------
------------------------------
Date: Wed, 10 Nov 1999 21:28:48 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: REgarding the "x-httpd-cgi"
Message-Id: <Pine.HPP.3.95a.991110212008.5592K-100000@hpplus01.cern.ch>
On Wed, 10 Nov 1999, Aparna Ramachandran wrote:
> WE are trying to create a discussion borad for educational purposes.In doing
> so, I came up with an error during the posting of messages.The error is
>
> "You have started to download the file "Myfilename.cgi" of type
> "application /x-httpd/cgi-bin".Click more info to learn about Navigator's
> capabilites.
You don't have a Perl problem. This would be the same if your
CGI application was written in COBOL or Visual Basic.
I surmise that the script failed to send out an appropriate Content-type
header, and that you dont have the resourcefulness to check it out, e.g
via telnet to the web server port, to find out one way or the other.
> I came across your replies in one of the discussion groups in the web.
You did what? Oh, you seem to have tried to start a new thread by
following up to some previous thread: that's bad. Take a look at the
usenet new user FAQs on news.announce.newusers to get a better idea of
what this usenet thing is and what it could do for your life...
If you're going to tangle with CGI scripts then you really need to
tangle with the comp.infosystems.www.authoring.cgi group (f'ups set).
There are some FAQs that can help you, at e.g
http://www.htmlhelp.org/faq/cgifaq.html
good luck.
------------------------------
Date: Wed, 10 Nov 1999 15:05:09 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: regular expression to parse html out
Message-Id: <3829FA25.5E0A325F@mail.cor.epa.gov>
vod wrote:
>
> Hello,
>
> Before u say anything, i want to say that
> i know it may not be wise but never the less i am trying to make a
> small search script for my web-site. I want the script to search
> thru the .htm* pages but only the text that is outside the html tags,
> i.e. that is outside < > tags.
Okay, I won't say it. I'll be thinking it, though. :-)
Seriously, if this is *your* website and you control what
is in the HTML, then you can be sure that many of the
bad things which break a common regex won't occur. Otherwise,
you'll need to use a parser to solve this problem.
> At the moment i have the script ready that searches all the page
> blindly what i was hoping to make a regular expression that could
> eliminate html tags < >.
> Basically i think the reg ex has to look for any word starting
> with "<" followed by anything and ending with ">".
Sort of. Go to a command prompt and type this:
perldoc -q html.+string
[that's a regex in there: it searches for any FAQ with the
letters html, followed by something, followed by 'string' -
and perldoc makes the search case-insensitive for you]
You'll find:
[1] the simple-minded regex solution you wanted;
[2] a more sophisticated regex solution which handles
HTML tags that go over more than one line, or have
quoted angle-brackets, or HTML comments;
[3] a ref to TomC's striphtml program;
[4] examples of why regexes won't work in general; and
[5] a ref to HTML::Parse, which is but one of several
ways to parse HTML in Perl.
HTML::Parser is another way. So is Parse::RecDescent .
> I am not very good at reg exes so i was hoping to find a
> a reg exes from anyone of u guys/girls that would do the needfull
> i.e. elimiate html tags in a .html page.
Always check the FAQ first. It's surprising how often the
answer is already there, waiting for you.
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 10 Nov 1999 14:18:56 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Remebering environmentvariables
Message-Id: <3829EF50.10104299@mail.cor.epa.gov>
Lab. - konto nproj-2 wrote:
[snip]
> So, this was some background. The thing is that this does not work. If I
> set the environmentvariable teamid in the login-script like this:
>
> $ENV{'teamid'}= *Teamid extracted from database*
>
> And then click on another link, the variable is not there anymore.
>
> Does anyone know how to do this? Please help, because I'm really stuck.
You're trying to 'maintain state' in a stateless protocol.
That's a CGI problem, regardless of the language used to code
the program. So you'll want to look at the newsgroup
comp.infosystems.www.authoring.cgi and read the CGI Programming
FAQ at http://www.webthing.com/tutorials/cgifaq.html .
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 10 Nov 1999 20:05:58 +0100
From: Alex Farber <alex@kawo2.rwth-aachen.de>
Subject: Re: script dumps core
Message-Id: <3829C216.874468A6@kawo2.rwth-aachen.de>
Kragen Sitaker wrote:
> >I have also read on the p5p-list that it is better to use
> >$db = tie(%hash, "DB_File", $database, O_CREAT|O_RDWR|O_EXCL, 0666);
> >since DB_File unfortunately reads some data _before_ locking.
> >Doe anyone have comments on it?
>
> open(file, mode|O_CREAT|O_EXCL) fails if the file already exists. Is
> that what O_EXCL means with DB_File's TIEHASH? (i.e. have you tested
> your code?)
>
> I am very interested to hear about DB_File's reading problem.
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1999-09/msg00954.html
/Alex
------------------------------
Date: 10 Nov 1999 19:19:17 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: Splitting at 255 bytes
Message-Id: <80cgfl$qff$3@info2.uah.edu>
In article <942261351.1424554723@news.linkohio.com>,
Thomas Brian Holdren <bholdren@linkohio.com> writes:
: All I want to do is... I have a big long $string. I want to break it
: up into an @array, every 255 bytes for entry into mySQL.
push @array, substr $str, 0, 255 => '' while $string;
Enjoy,
Greg
--
In theory there is no difference between theory and practice. In practice,
there is.
------------------------------
Date: Wed, 10 Nov 1999 20:55:12 GMT
From: raju_k@iname.com
Subject: Re: Splitting at 255 bytes
Message-Id: <80cm3d$f1q$1@nnrp1.deja.com>
In article <942261351.1424554723@news.linkohio.com>,
Thomas Brian Holdren <bholdren@linkohio.com> wrote:
> Dear Perl Gentlemen/Ladies,
>
> I know, of course, this is a silly question. I have looked through
the docs
> for pack, unpack, join, split, and substr. I cannot find details for
what I
> want to do.
>
> All I want to do is... I have a big long $string. I want to break it
up into
> an @array, every 255 bytes for entry into mySQL. I have tried unpack
with A,
> but it only gets the first section (which the perl book said it would)
like so:
>
> @array = unpack 'A255', $string;
>
> but only one element gets returned. *sigh*. I know I could probably
do some
> ugly hack with substr, but I want to make this code efficient.
>
> Can anyone please help or point me to a FAQ/URL/Camel page. I have
even tried
> the data manipulation FAQ, strings section, extracting columns part.
It said
> "use unpack". An example would have been nice.
There's probably a better way to do this with split() with an expression
like /([.\n]){255}/ but I haven't tried it and it doesn't 'look' right.
A brute force method (I can just see the purist preparing a diatribe):
my $LEN = 255
my $str = "";
my @substrs = '';
my $len = 0;
# generate some long string and store in $str and get it's length
...
$len = length($str);
# get the substrings
for(my $i = 0; $_ = substr($str, $i, $LEN); ){
# you can blindly do a $i += $LEN above if you don't care about
# warnings
$i += (($i + $LEN) <= $len) ? $LEN : $len - $i;
push(@substrs, $_);
}
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 10 Nov 1999 22:00:37 GMT
From: Mark Lofdahl <mel@disc.com>
Subject: Tying a pseudo-hash
Message-Id: <80cpu2$i3f$1@nnrp1.deja.com>
Is there a way to tie a psuedo-hash as a hash instead of an array?
my $k = {"a" => 1, "b" => 2};
my $psuedohash = [$k];
I can treat $pseudohash as a hash like this
$pseudohash->{a} = 5;
printf("%d\n", scalar(keys(%$pseudohash)));
but not like this
tie(%$pseudohash, "Tie::StdHash");
error -- Can't locate object method "TIEARRAY" via package
"Tie::StdHash"
Is there any way to do this?
Thanks,
Mark
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 10 Nov 1999 16:17:24 -0600
From: Dean Collins <webmaster@graceumc-hsv.org>
Subject: Unix Web server to MS Access
Message-Id: <3829EEF4.89C724E1@graceumc-hsv.org>
I have a web form served from a unix box and need the info inserted into
MS Access on NT. From what I'm reading, this can be done using the
DBD::ODBC but it's not clear how to do it.
Looking at the docs at
:forteviot.symbolstone.org/cgi/dbi/moduledump?module=DBD::ODBC
"set-up these environment variables:
DBI_DSN The dbi data source, e.g.'dbi:ODBC:YOUR_DSN_HERE'"
What do I put in where is says "YOUR_DSN_HERE" How exactly do I declare
where the Access db is? How do I set up the DSN?
Before someone jumps me about Access, it was already being used, I'm
stuck with it. We have plans to upgrade but I need the Web form working
now!
Thanx in advance,
Dean Collins
------------------------------
Date: Wed, 10 Nov 1999 10:29:57 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: urgent help please
Message-Id: <slrn82j3rl.s5h.tadmc@magna.metronet.com>
On Wed, 10 Nov 1999 17:06:28 GMT, Samadhi <samadhi@latinmail.com> wrote:
>Hi, I want to convert a string like this: "sample line 01<br>sample
>line
>02<br>etc" in this other (to send a e-mail):
>
> sample line 01
> sample line 02
> etc
>
>can you help me please please please please?
Sure we can help.
Show us the code you have so far, and we will tell you why
it isn't working.
You may want to check out the description for
s/PATTERN/REPLACEMENT/egimosx
in the 'perlop.pod' man page.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 10 Nov 1999 14:37:06 -0800
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Using Perl to fill in html fields
Message-Id: <3829F392.B9B120F6@mail.cor.epa.gov>
Randal L. Schwartz wrote:
[snip]
> http://www.stonehenge.com/merlyn/
>
> But that's only my home page. For Web stuff, you want my WebTechniques
> and LinuxMagazine columns, online at:
>
> http://www.stonehenge.com/merlyn/WebTechniques/
> http://www.stonehenge.com/merlyn/LinuxMagazine/
But then how will everyone find all those pictures you took
of those Las Vegas booth babes?
[Greg already pointed out your typo in the last URL, so I
won't rub it in more...]
David
--
David Cassell, OAO cassell@mail.cor.epa.gov
Senior computing specialist
mathematical statistician
------------------------------
Date: Wed, 10 Nov 1999 13:42:31 -0500
From: Ala Qumsieh <aqumsieh@matrox.com>
Subject: Re: Virus
Message-Id: <x3ybt92yyqx.fsf@tigre.matrox.com>
abigail@delanet.com (Abigail) writes:
> unless ($program =~ /# HACKED/) {
> $program =~ s/\n/\n$text/;
> }
Not a very smart virus. Very easy to fool. Just stick a '# HACKED'
somewhere in the code.
But a cool virus nevertheless.
--Ala
------------------------------
Date: 10 Nov 1999 21:32:49 GMT
From: gbacon@ruby.itsc.uah.edu (Greg Bacon)
Subject: Re: Virus
Message-Id: <80coa1$dmt$1@info2.uah.edu>
In article <b3iW3.64055$23.2518983@typ11.nn.bcandid.com>,
kragen@dnaco.net (Kragen Sitaker) writes:
: In article <slrn82ija4.6es.abigail@alexandra.delanet.com>,
: Abigail <abigail@delanet.com> wrote:
:
: > undef $/;
:
: This should probably be local $/; undef $/ in a BEGIN is likely to make
: most Perl scripts fail to run properly.
C<local $/; undef $/;> is redundant.
Greg
--
It's a miracle that curiosity survives formal education.
-- Albert Einstein
------------------------------
Date: 10 Nov 1999 15:54:21 -0600
From: abigail@delanet.com (Abigail)
Subject: Re: Virus
Message-Id: <slrn82jqj5.lmh.abigail@alexandra.delanet.com>
Ala Qumsieh (aqumsieh@matrox.com) wrote on MMCCLXII September MCMXCIII in
<URL:news:x3ybt92yyqx.fsf@tigre.matrox.com>:
//
// abigail@delanet.com (Abigail) writes:
//
// > unless ($program =~ /# HACKED/) {
// > $program =~ s/\n/\n$text/;
// > }
//
// Not a very smart virus. Very easy to fool. Just stick a '# HACKED'
// somewhere in the code.
Details, details, details.
chmod -w is a much better protection.
Besides, once you know how a virus works, protection against it is
usually easy.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
------------------------------
Date: 10 Nov 1999 22:53:02 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Virus
Message-Id: <slrn82jtqo.iht.sholden@pgrad.cs.usyd.edu.au>
On 10 Nov 1999 21:32:49 GMT, Greg Bacon <gbacon@ruby.itsc.uah.edu> wrote:
>In article <b3iW3.64055$23.2518983@typ11.nn.bcandid.com>,
> kragen@dnaco.net (Kragen Sitaker) writes:
>
>: In article <slrn82ija4.6es.abigail@alexandra.delanet.com>,
>: Abigail <abigail@delanet.com> wrote:
>:
>: > undef $/;
>:
>: This should probably be local $/; undef $/ in a BEGIN is likely to make
>: most Perl scripts fail to run properly.
>
>C<local $/; undef $/;> is redundant.
I must admit that I parsed that sentence a little different. With a pause
after the ;
--
Sam
It has been discovered that C++ provides a remarkable facility for
concealing the trival details of a program--such as where its bugs are.
--David Keppel
------------------------------
Date: Wed, 10 Nov 1999 22:55:29 GMT
From: kragen@dnaco.net (Kragen Sitaker)
Subject: Re: Virus
Message-Id: <BJmW3.64942$23.2562901@typ11.nn.bcandid.com>
In article <80coa1$dmt$1@info2.uah.edu>, Greg Bacon <gbacon@cs.uah.edu> wrote:
>In article <b3iW3.64055$23.2518983@typ11.nn.bcandid.com>,
> kragen@dnaco.net (Kragen Sitaker) writes:
>
>: In article <slrn82ija4.6es.abigail@alexandra.delanet.com>,
>: Abigail <abigail@delanet.com> wrote:
>:
>: > undef $/;
>:
>: This should probably be local $/; undef $/ in a BEGIN is likely to make
>: most Perl scripts fail to run properly.
>
>C<local $/; undef $/;> is redundant.
I meant:
This should probably be 'local $/', for the reason that 'undef $/' in
a 'BEGIN' is likely to make most Perl scripts fail to run properly.
--
<kragen@pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
<URL:http://www.pobox.com/~kragen/bubble.html>
------------------------------
Date: Wed, 10 Nov 1999 14:58:19 -0800
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Virus
Message-Id: <MPG.129398645430e51598a1d0@nntp.hpl.hp.com>
In article <80coa1$dmt$1@info2.uah.edu> on 10 Nov 1999 21:32:49 GMT,
Greg Bacon <gbacon@ruby.itsc.uah.edu> says...
> In article <b3iW3.64055$23.2518983@typ11.nn.bcandid.com>,
> kragen@dnaco.net (Kragen Sitaker) writes:
>
> : In article <slrn82ija4.6es.abigail@alexandra.delanet.com>,
> : Abigail <abigail@delanet.com> wrote:
> :
> : > undef $/;
> :
> : This should probably be local $/; undef $/ in a BEGIN is likely to make
> : most Perl scripts fail to run properly.
>
> C<local $/; undef $/;> is redundant.
s/;/./ in Abigail's prose. 'undef $/' is the beginning of a new phrase,
not part of a sequence of Perl statements.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Wed, 10 Nov 1999 22:25:29 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: W95 & gethostbyname questions
Message-Id: <slrn82js4o.li4.njc@dmc.uucp>
I've create a simple program which works under Linux. Now when I try
to get it to work it can't find the host. My question is where does
Perl/W95 expect to find the hosts file?
--
Linux Home Automation Neil Cherry ncherry@home.net
http://members.home.net/ncherry (Text only)
http://meltingpot.fortunecity.com/lightsey/52 (Graphics GB)
------------------------------
Date: Wed, 10 Nov 1999 19:56:21 GMT
From: jorlen@wxs.nl (Joris Lenior)
Subject: Win32::Internet FTP List problem
Message-Id: <3829cdcc.38762346@news.wxs.nl>
Hi,
I'm trying to write a perl script which downloads a set of files from
an HP3000 and converts them to excelsheets. Everything is working
except the FTP part. In the line @msfiles = $FTP->List("MS51*"), I try
to create an array containing the filenames I need. But instead of
having only the filenames, the array exists
of the following lines.
239B FA 4501 50000 1 4384 3 32 MS51R149
239B FA 3851 50000 1 4384 3 32 MS51R151
239B FA 165 50000 1 1472 1 32 MS51R152
239B FA 844 50000 1 1472 1 32 MS51R160
Looks like somehow the attributes got in there although the Listmode
should be 1 by default and only give names. I had this working before
for different hosts but changed something and can't remember what. Any
help will be appreciated I prefer using Win32::Internet instead of
Net::FTP.
kind regards,
Joris Lenior
#!/usr/bin/perl -w
#Variables
#FTP
$host="host";
$user="user1";
$passwd="******";
$localdir="d:/temp";
$remotedir="../MS";
chdir "$localdir";
use Win32::Internet;
my $INET = new Win32::Internet();
$INET->FTP($FTP, "$host", "$user", "$passwd");
$FTP->Cd("$remotedir");
$FTP->Ascii();
@msfiles = $FTP->List("MS51*");
foreach $file (@msfiles) {
$FTP->Get("$file", "$file");
}
$INET->Close($FTP);
------------------------------
Date: Wed, 10 Nov 1999 15:53:44 -0500
From: planb@newsreaders.com (J. Moreno)
Subject: Re: Y2K and German drivers
Message-Id: <1e127os.105iuhqabkjb4N%planb@newsreaders.com>
Jocelyn Amon <finsol@ts.co.nz> wrote:
> Your analogy regarding driving on the correct side of the road is a good
> one. We have a very real problem with this where I live in Nelson,
> located in the south island of New Zealand. It mostly relates to German
> tourists driving on the wrong side of the road. Yes, they know we drive
Yeah, but I've driven on the wrong side of the road here in the US where
there is only way and I've never been outside the US.
People screw up, just because a screw up is common doesn't make it any
less of a personal failing.
--
John Moreno
------------------------------
Date: Wed, 10 Nov 1999 11:09:11 -0800
From: visigothe <octothorpe12NOocSPAM@yahoo.com.invalid>
Subject: Re: YA Find/Replace newbie question
Message-Id: <000b8d9b.bae6e2f9@usw-ex0106-041.remarq.com>
Thanks to everyone who game me insight!
I got it working, and it seemed that I had a regex that bombed out, but
in fact it was a bad variable [can't verywell find the 1st occurance of
something if it isn't in the datafile].
it all works quite well now. [happy dance]
Thanks for the FAQ URL; it made my life much happier
CMH
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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.
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 V9 Issue 1344
**************************************