[9895] in Perl-Users-Digest
Perl-Users Digest, Issue: 3488 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Aug 20 05:08:53 1998
Date: Thu, 20 Aug 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 Thu, 20 Aug 1998 Volume: 8 Number: 3488
Today's topics:
Re: 5.004_04: 'sort' core dumps, 'TIEHASH' is buggy... <zenin@bawdycaste.org>
Call another perl script? <versace@gianni.com>
Re: changing parents environment (Abigail)
Re: comp.lang.perl.announce redux (Ronald J Kimball)
Re: comp.lang.perl.newbie <ajohnson@gpu.srv.ualberta.ca>
Re: CVS protocol <Savage.Ron.RS@bhp.com.au>
help: regular-expression /w multi-lines (GEMINI)
Re: help: regular-expression /w multi-lines <versace@gianni.com>
Re: help: regular-expression /w multi-lines (Larry Rosler)
Re: How do I pass "Hello World" to a scipt? (NEWBIE) <gwynne@utkux.utk.edu>
Re: How do I pass "Hello World" to a scipt? (NEWBIE) (Abigail)
How to validate an URL? (Hans Xie)
Re: How to validate an URL? (Maurice Aubrey)
Re: mod_perl stacked handlers <ask@netcetera.dk>
Netscape response to Perl using Front Page extensions <fish@civl.port.ac.uk>
Re: newbie question (Ronald J Kimball)
Re: NEWBIE Question: Perl Script in Unix vs. NT <gwynne@utkux.utk.edu>
Re: NEWBIE Question: Perl Script in Unix vs. NT (Abigail)
Open a text file <blairs@jps.net>
Re: Open a text file <jbc@west.net>
Re: Please help with HTTP::Response (Martien Verbruggen)
Re: Posting JPEG-images from CGI-script... <dunna001@bama.ua.edu>
Re: Problem with $^I in W95 (Tye McQueen)
Re: Recommend a good editor (Aenigmatica)
Re: Samba anyone??? (Mike)
such a thing as a "perl user"? <jbc@west.net>
Re: system call "find" in PERL salvador@my-dejanews.com
Re: Using Perl module without access to Perl installati <lee@spam-me-not-darryl.com>
Utility for news article fetching selected by keywords <perrot@francenet.fr>
Re: Webpage sourcecode <niting@raleigh.ibm.com>
Re: Webpage sourcecode <gwynne@utkux.utk.edu>
Re: Webpage sourcecode (Abigail)
Re: Writing text to another server (Abigail)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 20 Aug 1998 07:24:58 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: 5.004_04: 'sort' core dumps, 'TIEHASH' is buggy...
Message-Id: <903598536.788824@thrush.omix.com>
Bryan McNett <bmcnett@bigpanda.com> wrote:
: hiya. i use perl 5.004_04.
Full output of "perl -V" when reporting bugs, thanks.
Ever better if you use the perlbug program.
: sort seems to be having problems. when i try this:
: $foo = sub{ $_[0]<=>$_[1] };
: sort { &{$foo}($a,$b) } @bar;
: perl core dumps.
Works fine on my system. 5.00404 on FreeBSD 2.2.7-STABLE.
: also, i am getting unexpected results from TIEHASH:
>snip<
: as i expect, MODULE2::STORE('age',13) and MODULE2::STORE('size',7) are
: called. but mysteriously, MODULE2::STORE('password','xyzzy') is never
: called. is this what i should expect?
Yes, unless the hash that the "bob" ref points to is also tied.
Multidimensional data structures are not directly supported.
: but, when i do this instead:
: 1. tie %user, 'MODULE1', ...
: 2. $me = $user{bob};
: 2. $me->{password} = 'xyzzy';
: 3. $me->{age} = 13;
: 4. $me->{size} = 7;
: MODULE2::STORE('password','xyzzy') is called...
So the hash ref "bob" points to is tied?
A smaller test script you could post in full would be much more
helpful.
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Thu, 20 Aug 1998 12:30:29 +0800
From: 8\(F&@ <versace@gianni.com>
Subject: Call another perl script?
Message-Id: <35DBA665.3145@gianni.com>
Hi all,
I have writen 3 perl cgi scripts for different functions, say a.pl, b.pl
and c.pl. Now, I would like to write another perl script to dispatch to
a.pl, b.pl or c.pl depends on the function passed in. E.g
if ($function eq "a") {
call a.pl
} elsif ($function eq "b") {
call b.pl
} elsif ($function eq "c") {
call c.pl
}
How to do that? Many Thanks!
------------------------------
Date: 20 Aug 1998 05:01:21 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: changing parents environment
Message-Id: <6rgaj1$ha5$1@client3.news.psi.net>
Jr. (pwhst+@pitt.edu) wrote on MDCCCXIV September MCMXCIII in
<URL: news:Pine.GSO.3.96L.980819155525.20620C-100000@unixs-eval.cis.pitt.edu>:
++
++
++ So, what I want to know is, "Can I set an environment variable and send it
++ back to the shell from within my perl script??"
Is there any reason why you can't be bothered to read the FAQ?
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: Thu, 20 Aug 1998 01:14:51 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: comp.lang.perl.announce redux
Message-Id: <1de1bv9.3sfr9r8mekjiN@bay1-147.quincy.ziplink.net>
John Moreno <phenix@interpath.com> wrote:
> This is of course ridiculous - please, a hundred words that are British
> English and not American English (no slang or food please).
No, what's ridiculous is continuing this goddamn thread in
comp.lang.perl.misc, where anyone with half a brain can see that it is
obviously off-topic. And I am fairly certain that "off-topic" means the
same thing in the UK as it does in the US.
--
_ / ' _ / - 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: Wed, 19 Aug 1998 23:34:12 -0500
From: Andrew Johnson <ajohnson@gpu.srv.ualberta.ca>
Subject: Re: comp.lang.perl.newbie
Message-Id: <35DBA744.53FDA3EB@gpu.srv.ualberta.ca>
Ronald J Kimball wrote:
>
> Andrew M. Langmead <aml@world.std.com> wrote:
>
> > Especially with a language like Perl ... that gives you enough rope to bury
> > yourself.
>
> Okay, I have to ask... How much rope does it take to bury yourself?
about the same amount of shovels it takes to shoot yourself
in the foot.
regards
andrew
------------------------------
Date: 20 Aug 1998 05:02:40 GMT
From: "Ron Savage" <Savage.Ron.RS@bhp.com.au>
Subject: Re: CVS protocol
Message-Id: <01bdcbf9$29fa32c0$8aeb1286@steelres-pcm657.resmel.bhp.com.au>
Allan,
I'm not aware of the CVS client/server protocol.
As a start tho my web site you'll find my Perl module VCS::CVS.
--
Ron Savage
Home (preferred): rpsavage@ozemail.com.au
Office: Savage.Ron.RS@bhp.com.au
http://www.ozemail.com.au/~rpsavage
------------------------------
Date: 20 Aug 1998 06:41:09 GMT
From: dennis@info4.csie.nctu.edu.tw (GEMINI)
Subject: help: regular-expression /w multi-lines
Message-Id: <6rgge5$rri$1@netnews.csie.NCTU.edu.tw>
I have a string with multiple lines like follows:
line1
line2
=========
1. first
2. second
3. third
=========
line3
line4
now I'd like to extract the lines between the "=========" lines,
and then split it into a list by the newline character:
$_= the lines shown above
($mylines)=/={5,}.*\n(.*)\n={5,}/m;
@list=split(/\n/,$mylines);
however, the regular expression doesn't work because the (.*)
doesn't match the newline character.
so how should I write the expression correctly?
thanks.
------------------------------
Date: Thu, 20 Aug 1998 15:57:21 +0800
From: 8\(F&@ <versace@gianni.com>
Subject: Re: help: regular-expression /w multi-lines
Message-Id: <35DBD6E1.9B4@gianni.com>
just a pointer, modifier 's' let '.' match even embedded newline
characters. i.e. m/PATTERN/s
GEMINI wrote:
>
> I have a string with multiple lines like follows:
>
> line1
> line2
> =========
> 1. first
> 2. second
> 3. third
> =========
> line3
> line4
>
> now I'd like to extract the lines between the "=========" lines,
> and then split it into a list by the newline character:
>
> $_= the lines shown above
> ($mylines)=/={5,}.*\n(.*)\n={5,}/m;
> @list=split(/\n/,$mylines);
>
> however, the regular expression doesn't work because the (.*)
> doesn't match the newline character.
> so how should I write the expression correctly?
> thanks.
------------------------------
Date: Thu, 20 Aug 1998 01:02:17 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: help: regular-expression /w multi-lines
Message-Id: <MPG.104577e7e1b705cc9897d7@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and copy mailed.]
In article <6rgge5$rri$1@netnews.csie.NCTU.edu.tw> on 20 Aug 1998
06:41:09 GMT, GEMINI <dennis@info4.csie.nctu.edu.tw> says...
...
> ($mylines)=/={5,}.*\n(.*)\n={5,}/m;
> @list=split(/\n/,$mylines);
>
> however, the regular expression doesn't work because the (.*)
> doesn't match the newline character.
> so how should I write the expression correctly?
To make the '.' match the newline character, you need to use the 's'
modifier, not the 'm' modifier (which affects the behavior of the ^ and $
anchors). However, you don't want the first .* to eat up too much. So
you should try either of these:
($mylines) = /={5,}.*?\n(.*)\n={5,}/s;
or (probably slightly more efficient),
($mylines) = /={5,}[^\n]*\n(.*)\n={5,}/s;
You were on the right track; another look at `perldoc perlre` might help.
--
Larry Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Thu, 20 Aug 1998 00:10:16 -0400
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: How do I pass "Hello World" to a scipt? (NEWBIE)
Message-Id: <6rg7pp$j8m$1@gaia.ns.utk.edu>
This is a CGI problem. Get a copy of The Official Guide to CGI.pm by
Lincoln Stein and use CGI.pm. There are other ways to solve your problem;
however, CGI.pm is the easiest way to go. You need to spend some time
studying how to do this.
Bob Gwynne
------------------------------
Date: 20 Aug 1998 05:09:23 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: How do I pass "Hello World" to a scipt? (NEWBIE)
Message-Id: <6rgb23$hcp$1@client3.news.psi.net>
Wayne Cochrane (Wayne_D_Cochrane@keane.com) wrote on MDCCCXIV September
MCMXCIII in <URL: news:35DB32BE.660D445E@keane.com>:
++ I am setting up a new intranet with IIS. I want to test some simple Perl
++ scripts to see what I can do. The "Hello World" script below works fine.
++ I can not, however, seem to figure out how to pass "Hello World" to the
++ script at run time. I changed the variable line to "$in = <STDIN>;" and
++ tried to pass many parameters when calling the script, some examples
++ are:
You do it the same way as you would do with an Simula CGI script.
You need a basic understanding of the CGI protocol. Which can be
found elsewhere.
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: Thu, 20 Aug 98 03:43:26 GMT
From: hans.xie@its.csiro.au (Hans Xie)
Subject: How to validate an URL?
Message-Id: <6rg60u$m0_001@its.csiro.au>
Dear all,
Would any one shed some light on how to valide an URL with PERL in UNIX?
Thanks in advance.
HB XIE
------------------------------
Date: Thu, 20 Aug 1998 06:48:35 GMT
From: maurice@hevanet.com (Maurice Aubrey)
Subject: Re: How to validate an URL?
Message-Id: <slrn6tnhm4.61p.maurice@localhost.localdomain>
On Thu, 20 Aug 98 03:43:26 GMT, Hans Xie <hans.xie@its.csiro.au> wrote:
>Would any one shed some light on how to valide an URL with PERL in UNIX?
You need the LWP module. You can find it at http://www.perl.com/
The docs explain this.
--
Maurice Aubrey <maurice@hevanet.com>
Every program expands until it can read mail.
- The MIT Law of Software Development
------------------------------
Date: 20 Aug 1998 06:17:52 +0200
From: Ask Bjoern Hansen <ask@netcetera.dk>
Subject: Re: mod_perl stacked handlers
Message-Id: <m3zpd0jngv.fsf@balder.netcetera.dk>
amartinez@arturo.net writes:
> Anyone here familiar with Mod_perlstacked handlers?
They sure are on the mod_perl mailinglist:
>From the SUPPORT file:
=item MAIL LIST
For comments, questions, bug-reports, announcements, etc., send mail
to I<modperl@apache.org>.
To subscribe to this list (which you must do to send mail to the
list), send a mail message to I<majordomo@apache.org> with the body:
subscribe modperl
Please note that mails on the mailinglist go out with a reply-to
header, so you have to be subscribed to get the answers.
We also have a mailinglist just for announcements. Subscribe my
sending a message to I<majordomo@apache.org> with the body:
subscribe modperl-announce
(Thanks to Brian Behlendorf)
(Thanks also to Mark A. Imbriaco who maintained the original list for 2 years)
=item MAIL LIST ARCHIVES
There are several modperl list archives, choose your favorite:
Thanks to Ken Williams:
http://forum.swarthmore.edu/epigone/modperl
Thanks to James Cooper:
http://outside.organic.com/mail-archives/modperl/
Thanks to Hank Leininger:
http://www.progressive-comp.com/Lists/?l=apache-modperl&r=1#apache-modperl
Thanks to FindMail:
http://www.findmail.com/listsaver/modperl/
=back
--
ask bjoern hansen - <URL: http://www.netcetera.dk/>
use strict; use Standard::Disclaimer; print @_;
------------------------------
Date: Mon, 17 Aug 1998 15:18:32 +0100
From: "Fish" <fish@civl.port.ac.uk>
Subject: Netscape response to Perl using Front Page extensions
Message-Id: <6r9e8r$f7626@tech.port.ac.uk>
I have a strange thing happening that I would love someone to have ..
a) experienced
b) found a solution
Submitting a form to a Perl script on an NT machine running Front Page
extensions and (I think) IIS 4.0 results in the browser asking the client if
he wants to save the results to file, popping up a Windows Save dialog box,
rather than printing the form results to the browser direct. This doesn't
happen using IE3 or IE4, but seems to happen with Netscape 3.01 or
Communicator. Any ideas?
Appreciation in advance.
Fish
------------------------------
Date: Thu, 20 Aug 1998 01:14:52 -0400
From: rjk@coos.dartmouth.edu (Ronald J Kimball)
Subject: Re: newbie question
Message-Id: <1de1cbq.ma3jq71x4fge8N@bay1-147.quincy.ziplink.net>
Terry <tbenge@nospam.ndsuk.com> wrote:
> I've seen this line being used to compare the REMOTE_ADDR with an ip
> address. What does it do in this case
>
> if $_ is ^100\.100\.100\.100
That looks more like a regex than the value of a variable...
> $_ =~ tr/./\./;
>
> What would $_ now contain.
The same thing it did before. tr/./\./ replaces all periods with
periods - not very exciting.
--
_ / ' _ / - 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: Thu, 20 Aug 1998 00:11:16 -0400
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: NEWBIE Question: Perl Script in Unix vs. NT
Message-Id: <6rg7rk$j8n$1@gaia.ns.utk.edu>
If you use -w at the end of line 1, you will find that you have some errors
in your code. If you type "use strict;" on the second line, you will get
more info than you care to know about.
Bob Gwynne
------------------------------
Date: 20 Aug 1998 05:12:15 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: NEWBIE Question: Perl Script in Unix vs. NT
Message-Id: <6rgb7f$hcp$2@client3.news.psi.net>
Mr. Mirthful (NOjcjSPAM@mail.med.upenn.edu) wrote on MDCCCXIV September
MCMXCIII in <URL: news:35db481f.198124758@uphs1>:
++ Hi,
++
++ i have the following Perl Script, which is used to keep track of
++ results from a survey. it works when running it from an NT based web
++ server, and now i need to have it running from Unix. The problem is
++ that when it is run, it returns an "internal server error". On the
++ Unix box, other Perl programs are running fine, so it is not a
++ configuration problem. i assume there must be something in the code
++ that is correct for NT but not Unix. Any help would be greatly
++ appreciated.
Perl is very helpful with error messages. Use -w, use strict;
and get yourself an HTTP server that logs what it finds on STDERR.
And of course, if it's really a problem of something that would run
on Unix, run the program from command line and see what happens.
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: Wed, 19 Aug 1998 22:50:37 -0700
From: "Michael C. Blair" <blairs@jps.net>
Subject: Open a text file
Message-Id: <35dbb908.0@blushng.jps.net>
I would like some suggestions on where to find an example of opening a text
file and reading the data into a HTML Table. Thanks
------------------------------
Date: Thu, 20 Aug 1998 01:44:06 -0700
From: John Callender <jbc@west.net>
Subject: Re: Open a text file
Message-Id: <35DBE1D6.2E54B049@west.net>
Michael C. Blair wrote:
>
> I would like some suggestions on where to find an example of opening a
> text
> file and reading the data into a HTML Table. Thanks
[I tried to mail this, but it looks like his mail address is broken.]
This is really a bigger question than is likely to be answered directly
in the perl newsgroups; the folks here will tend to be more helpful on
specific problems you run into while trying to figure this out on your
own, especially if they think you've put some effort into it already.
Some of the regular participants in the group get fairly snotty about
this; doubtless you will hear (or have already heard) from some of them.
Don't let them bother you.
Good starting points for learning what you'll need to know are:
* O'Reilly & Associates' book, "Learning Perl"
(http://www.oreilly.com/catalog/lperl2/)
* Reading as much of the Perl man pages as you can take in before your
brain turns to mush; you could start by typing "perldoc perl" at the
command line of the machine where you've got it installed, or going to
http://www.perl.com/CPAN-local/doc/manual/html/pod/perl.html.
With that said, here's a bare-bones outline that assumes you want to
read in a file formatted with columns of text separated by tabs. If your
situation is different, you'll need to figure out how to adapt this
solution, or substitute your own approach:
[data file example]
column 1 column 2 column 3
column 1 column 2 column 3
column 1 column 2 column 3
column 1 column 2 column 3
[perl example]
#!/usr/bin/perl
open IN, "filename" or die "Couldn't open filename for reading: $!\n";
while (<IN>) {
chomp;
my ($col1, $col2, $col3) = split /\t/, $_;
$table .= <<EndOfText;
<TR><TD>$col1</TD><TD>$col2</TD><TD>$col3</TD></TR>
EndOfText
}
close IN;
open OUT, ">output_file.html" or die "couldn't open output_file.html for
writing: $!\n";
print OUT <<EndOfText;
<HTML>
<HEAD>
<TITLE>My File</TITLE>
</HEAD>
<BODY>
<H1>My File</H1>
<TABLE>
$table
</TABLE>
</BODY>
</HTML>
EndOfText
close OUT;
At least, that's how I'd do it. Good luck!
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: 20 Aug 1998 03:02:14 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Please help with HTTP::Response
Message-Id: <6rg3jm$mas$5@nswpull.telstra.net>
In article <35DA25AC.7291@resonate.com>,
"Jon C. Hodgson" <jon@resonate.com> writes:
> I can print:
> $response=$ua->request($request);
> print $response->content();
> Is there a way to convert the $response->content() object to text that I
> can step thru & process?
my $text = $response->content();
$text =~ s/whatever/whatever2/;
print $text;
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Wed, 19 Aug 1998 22:14:54 -0500
From: MrNobody <dunna001@bama.ua.edu>
To: Administrator <w3master@infosys.ru>
Subject: Re: Posting JPEG-images from CGI-script...
Message-Id: <Pine.GSO.3.96.980819220243.8084A-100000@bama.ua.edu>
On 19 Aug 1998, Administrator wrote:
> Could you please help me to find out how to return to the client's machine
> a JPEG- or GIF- images from CGI-script, written on PERL.
>
> I heard that an image could be sent form a server with the help of and HTTP
> headers i.e.: "Content-Type: image/x-xbitmap/n/n". But it appeares to me
> that this commands works only w/ XBM images.
Do you realy wish to create your image in perl? Or are you trying to
simply return a pre-existing image from a CGI script? If you just want to
return an existing image with CGI, you would pass back:
Location: $image_location\n\n
which would cause the browser to go to $image_location to get the image
you wanted. I know this is not a complete answer, but I think you might be
able to asemble your application from pre-existing images, and save a lot
of code. I you MUST generate the pics, then this is no help.
-MrNobody
I dont exist, so
stop looking at me.
perl -e 'print pack("C*",10,rs(231266),&v,32,rs(17528),rs(235297),&v,32,
rs(195292),&v,32,rs(19496),rs(27979),10);sub v{rand(26)+97};
sub rs{srand($_[0]);(&v,&v,&v);}'
------------------------------
Date: 19 Aug 1998 23:56:17 -0500
From: tye@fumnix.metronet.com (Tye McQueen)
Subject: Re: Problem with $^I in W95
Message-Id: <6rga9h$el4@fumnix.metronet.com>
louie@visca.com (Louie) writes:
)
) I'm trying to use the $^I in-place edit variable in Win95 (running the
) GSAR version 5.004_02). The following works as expected:
[...]
) However, when I try $^I = 'old/*.bak'; (the c:/texts/old/ directory
) exists), the original file is erased and no backup is made.
If the old file was named "file.ext", then Perl tried to create
a backup called "file.extold/*.bak" and failed.
) In fact, this happens whenever a * is used.
Who said you could use "*" in $^I values? Granted, the
documentation on this feature is a bit slim (at least the best of
what I found, which was in perlrun.pod), but I don't think it
even hints that what you are trying is supported.
) Finally, if I try $^I = 'bak'; the
) original file is erased and a 0 byte copy (numbers.txtbak) is created.
)
) Is this just MS-DOS weirdness? Thanks.
Well, this last one might be an MS-DOS weirdness. The rest are
just Perl.
--
Tye McQueen Nothing is obvious unless you are overlooking something
http://www.metronet.com/~tye/ (scripts, links, nothing fancy)
------------------------------
Date: Wed, 19 Aug 1998 23:24:39 -0400
From: aenigmatica@netscape.net (Aenigmatica)
Subject: Re: Recommend a good editor
Message-Id: <MPG.104560bb11b9a11f989687@news>
Windows NT always came with lpr and lpd support, just install "Microsoft
TCP/IP Printing". It will install lpr, lpd and lpq.
Works quite nicely with NTEmacs and XEmacs. One could also rewrite the
routines to use "net print" or "copy" commands to spool a file.
As for Win95, there are several offerings for lpr clients.
-F
In article <35dabdcf.0@news.new-era.net>, scott@softbase.com says...
>
> Remember, we're talking about Windows. There is no lpr.
>
> Scott
------------------------------
Date: 20 Aug 1998 02:26:52 GMT
From: schutzmd@SPAMFREEjmu.edu (Mike)
Subject: Re: Samba anyone???
Message-Id: <6rg1hc$g5o$3@lark.jmu.edu>
rkprasad@my-dejanews.com wrote:
> Has anyone heard about "samba"? I believe it is an Unix editor but with a
> IDE look..Any info on this is very much appreciated.
Samba is basically unix's method of utilizing the SMB protocol. The SMB
protocol is what is used my Microsoft networking, allowing networked
computers to share printers and files. Basically, Samba allows us to
cross the platform barrier.
- mike -
------------------------------
Date: Thu, 20 Aug 1998 01:38:54 -0700
From: John Callender <jbc@west.net>
Subject: such a thing as a "perl user"?
Message-Id: <35DBE09E.EEE976B2@west.net>
I've been growing vaguely depressed at the Perl Conference this year,
which is kind of odd, given how I'm also having a great time, just like
last year. As I've been thinking about where the depression is coming
from, I think I have an inkling:
I'm never going to be like you guys.
As much as I love accomplishing really awesome tasks with perl (awesome
for me; not awesome for you), I have to recognize that I will *never* be
JAPH. I just started too late, or don't have the aptitude, or something,
and now that I've got all this other crap going on in my life (involving
having to learn and be responsible for lots of things not nearly as fun
as perl), I'm just never going to get there.
I guess it's like being a sports fan. It's great fun to sit in the
stands watching the pros, and it's another kind of fun to go down to the
park and play a pickup game with your buddies, but there's something
disillusioning about actually winding up on the court rubbing elbows
with the perl equivalent of Michael Jordon (or Kurt Rambis, even), and
realizing that you're not only not in the same league as those guys;
you're not even in the same *sport*.
I'm forced to conclude that the most I will ever be is a perl "user".
Which would be fine, except that I'm not sure it's possible to even be
such a thing. I know there are experts around here who will say it
isn't.
Which makes me a sort of un-person -- always a depressing thing to be.
But listening to Larry's keynote today gave me a ray of hope. Maybe he
didn't mean what I thought he did, but that stuff about the importance
of the outer layers of the onion made me feel that I might have a place
in the perl universe after all.
Perl has made the easy things so easy that maybe you don't even have to
be a real programmer to use it. You can be like me, just a user. And
maybe that's okay.
I'm curious what others think about this.
--
John Callender
jbc@west.net
http://www.west.net/~jbc/
------------------------------
Date: Thu, 20 Aug 1998 08:43:10 GMT
From: salvador@my-dejanews.com
Subject: Re: system call "find" in PERL
Message-Id: <6rgnit$oin$1@nnrp1.dejanews.com>
In article <6rfpar$bk2$1@mark.ucdavis.edu>,
Eric Sheng <shenge@ece.ucdavis.edu> wrote:
> Hi All,
>
> I am experience an extremely long run time when I do a `find` call in my
PERL. The
> following is the detail.
>
> The directory structure I need to retrieve information from is as follows:
>
> Grandpa_ma
> |
> --------------------------------------
> | | |
> son_one son_two ... son_n
> |
> -----------------
> | |
> grandson_hacker grandson_non_hacker
> | |
> ---------- -------
> | | doctor.ext
> prog_PERL prog_C lawyer.ext
> ----- ------ writer.ext
> foo.ext hello.ext .
> goo.ext world.ext .
> hoo.ext . .
> too.ext .
> . .
> .
> .
>
If the file structure is so rigid, then you can use the glob function to get
the filenames:
----------------------------------------------------------
$son_name = "son_one";
foreach $non_hacker (glob "Grandpa_ma/$son_name/grandson_non_hacker/*.occup")
{ $family_tree{$non_hacker} = "1\n"; } # although... why '*.occup'?
may it be '*.ext'?
foreach $dir (glob "Grandpa_ma/$son_name/grandson_hacker/prog_*") {
@progs=glob "$dir/*.ext";
$family_tree{$dir} = $#progs;
}
----------------------------------------------------------
bye!
- Salvador.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 20 Aug 1998 00:41:08 -0700
From: Darryl Lee <lee@spam-me-not-darryl.com>
Subject: Re: Using Perl module without access to Perl installation
Message-Id: <notyou.903598464@shell3.ba.best.com>
Regarding the subject line...
mjtg@cus.cam.ac.uk (M.J.T. Guy) referred us to:
:> perldoc perlfaq8
:>
:> How do I keep my own module/library directory?
:>
:> When you build modules, use the PREFIX option when
:> generating Makefiles:
:>
:> perl Makefile.PL PREFIX=/u/mydir/perl
This worked fine. But when i tried the following:
:> use lib '/u/mydir/perl';
i received the following unpleasant message:
Can't locate Date/Calc.pm in @INC (@INC contains: /home/notyou/perl/ /usr/local/
lib/perl5/i386-freebsd/5.00404 /usr/local/lib/perl5 /usr/local/lib/perl5/site_pe
rl/i386-freebsd /usr/local/lib/perl5/site_perl .) at ./ski.cgi line 503.
BEGIN failed--compilation aborted at ./ski.cgi line 503.
When i dug through my perl directory, and replaced the use lib line
with something like:
use lib '/u/mydir/perl/lib/site_perl';
...things started working handily. Anybody know why "use lib" isn't digging
where it needs to?
--
Darryl Lee <lee@SPAMNO!darryl.com> | Geek? Who me? <http://www.darryl.com>
------------------------------
Date: 20 Aug 1998 10:53:47 +0200
From: Gildas Perrot <perrot@francenet.fr>
Subject: Utility for news article fetching selected by keywords ?
Message-Id: <rd7m04c9us.fsf@epiphore.francenet.fr>
Hi everybody,
Is there any tool to fetch in certain newsgroups, articles
selected by keywords ?
Thanks in advance for your help. Gildas.
--
Gildas PERROT, perrot@francenet.fr __o
FranceNet, 28 rue Desaix, 75015 Paris ---_ \<,_
http://www.francenet.fr ---- (_)/ (_)
------------------------------
Date: Wed, 19 Aug 1998 18:14:22 -0700
From: "Nitin Gupta" <niting@raleigh.ibm.com>
Subject: Re: Webpage sourcecode
Message-Id: <6rg4c6$1er4$1@ausnews.austin.ibm.com>
you can use the HTML::Parse module and with it use the get (or getprint)
method to get the sourcecode of any web page. The module documentation has
examples which are easy to understand. Modules are available from
http://www.cpan.org
-Nitin
Joel Rosenberg wrote in message <35DB63FC.C51B28E0@best.com>...
>I am seeking to read webpage sourcecode via a cgi script. I am able to
>set up an automated viewer, but would like to add the ability to copy
>the source code if I see something on the page that I like.
>
>Any suggestions: I tried the normal open(WEBPAGE, "$file") || die
>"Can't open $file\n";
>I didn't think it would work but if fooled around for a while and got
>nowhere.
>
>Joel Rosenberg
>jhr@best.com
>650-941-8990
>
>
------------------------------
Date: Wed, 19 Aug 1998 23:59:31 -0400
From: "Bob Gwynne" <gwynne@utkux.utk.edu>
Subject: Re: Webpage sourcecode
Message-Id: <6rg75k$j0k$1@gaia.ns.utk.edu>
This is a CGI problem, not a Perl problem. I'm having a difficult time
understanding why you need to write a CGI program to view and copy HTML
code. Use Internet Explorer 4, View/Source. You can then copy the source.
Don't use Netscape for this one.
Bob Gwynne
Joel Rosenberg wrote in message <35DB63FC.C51B28E0@best.com>...
>I am seeking to read webpage sourcecode via a cgi script. I am able to
>set up an automated viewer, but would like to add the ability to copy
>the source code if I see something on the page that I like.
>
>Any suggestions: I tried the normal open(WEBPAGE, "$file") || die
>"Can't open $file\n";
>I didn't think it would work but if fooled around for a while and got
>nowhere.
>
>Joel Rosenberg
>jhr@best.com
>650-941-8990
>
>
------------------------------
Date: 20 Aug 1998 05:14:04 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Webpage sourcecode
Message-Id: <6rgbas$hcp$3@client3.news.psi.net>
Joel Rosenberg (jhr@best.com) wrote on MDCCCXIV September MCMXCIII in
<URL: news:35DB63FC.C51B28E0@best.com>:
++ I am seeking to read webpage sourcecode via a cgi script. I am able to
++ set up an automated viewer, but would like to add the ability to copy
++ the source code if I see something on the page that I like.
What's wrong with sending the file labelled as 'text/plain' ?
Abigail
--
perl -e '$a = q 94a75737420616e6f74686572205065726c204861636b65720a9 and
${qq$\x5F$} = q 97265646f9 and s g..g;
qq e\x63\x68\x72\x20\x30\x78$&eggee;
{eval if $a =~ s e..eqq qprint chr 0x$& and \x71\x20\x71\x71qeexcess}'
------------------------------
Date: 20 Aug 1998 05:16:30 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Writing text to another server
Message-Id: <6rgbfe$hcp$4@client3.news.psi.net>
Genie Stasko (g2stasko@airmail.net) wrote on MDCCCXIV September MCMXCIII
in <URL: news:AF8B208500F4AC5C.CFDAFB4D2DA5FD2D.802B8EFD49D96700@library-proxy.airnews.net>:
++ Does anyone know how to create a CGI script that writes a webpage's
++ input to a text file on a different server than the one the script
++ resides on? I have an existing script on a unix server which emails the
++ user's input via the unix 'sendmail'. I'd like to have the script
++ additionally place the input in a text file on a separate LAN shared
++ server. Does this require manipulating sockets, perhaps?
I can think of hundreds of different ways. Some include sockets, others
don't. What the best is depends solely on your LAN configuration,
and not at all on Perl.
Go talk to your sysadmin.
Abigail
--
sub _'_{$_'_=~s/$a/$_/}map{$$_=$Z++}Y,a..z,A..X;*{($_::_=sprintf+q=%X==>"$A$Y".
"$b$r$T$u")=~s~0~O~g;map+_::_,U=>T=>L=>$Z;$_::_}=*_;sub _{print+/.*::(.*)/s}
*_'_=*{chr($b*$e)};*__=*{chr(1<<$e)};
_::_(r(e(k(c(a(H(__(l(r(e(P(__(r(e(h(t(o(n(a(__(t(us(J())))))))))))))))))))))))
------------------------------
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 3488
**************************************