[8293] in Perl-Users-Digest
Perl-Users Digest, Issue: 1910 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Feb 16 21:17:18 1998
Date: Mon, 16 Feb 98 18:00:47 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 16 Feb 1998 Volume: 8 Number: 1910
Today's topics:
Re: "Can't locate Config.pm in @INC" - how to cure it? <rra@stanford.edu>
Re: "Mastering Regular Expressions" <dha@panix.com>
Re: .rc file parser, anyone? tobez@plab.ku.dk
Re: ? Regular Expressions ? (Troy Passmore)
Re: ? Regular Expressions ? (Martien Verbruggen)
Re: A Pubilc Apology. <rra@stanford.edu>
Re: A Pubilc Apology. <rra@stanford.edu>
Re: A Pubilc Apology. (Leslie Mikesell)
Re: array question (Craig Berry)
Re: array question (Martien Verbruggen)
Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's et (Jonathan Feinberg)
Re: Big files, read into variable? (Andrew M. Langmead)
Re: Can't use string ("") as a subroutine ref while "st <webmaster@fccj.cc.fl.us>
Re: Can't use string ("") as a subroutine ref while "st <tchrist@mox.perl.com>
Re: Code Example Needed & Thanks for the Help (Eileen Kortright)
determing integer or string. <ucs_rat@shsu.edu>
Re: FAQless Forays (was: Code Example Needed) <rjk@coos.dartmouth.edu>
Re: FAQless Forays (was: Code Example Needed) (Abigail)
Re: File question (Martien Verbruggen)
Re: File question (Martien Verbruggen)
Re: Guestbook <SNIPhsommer@micro.ti.comSNIP>
Re: How can I read Novell DOS Environment-variables in (Martien Verbruggen)
Re: How to write a perl module <webmaster@fccj.cc.fl.us>
Re: HTTP post (steve)
Re: HUMOR: Userspeak vs Hackerspeak (Ian Clatworthy)
Re: Is It Possible? (Sitaram Chamarty)
Re: Killfile Triage (Seymour J.)
Re: on reading FAQs and gurus answering questions <rra@stanford.edu>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 16 Feb 1998 10:46:11 -0800
From: Russ Allbery <rra@stanford.edu>
To: Arkady Zilberberg <arkady@nsi.co.il>
Subject: Re: "Can't locate Config.pm in @INC" - how to cure it?
Message-Id: <m37m6ve6bw.fsf@windlord.Stanford.EDU>
[ Posted and mailed. ]
Arkady Zilberberg <arkady@nsi.co.il> writes:
> I'm not a perl programmer so excuse me if the question is trivial.
> Recently I installed a product which uses perl5 in its scripts so I also
> installed perl5 (I took file perl5.001.tar.gz from ftp.cdrom.com).
> First, perl scripts couldn't locate their modules - this I fixed by
> defining PERL5LIB as /usr/local/lib/perl5 (I had installed perl under
> /usr/local).
You shouldn't have needed to do that. I presume this is a Unix machine;
did you compile Perl from source? If so, you should have been given the
opportunity to specify its library paths.
There are ways to work around this, but you don't really want to. What
you want to do is get the right paths compiled into Perl itself so that
you don't have to worry about it.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 16 Feb 1998 04:12:31 -0500
From: David Adler <dha@panix.com>
Subject: Re: "Mastering Regular Expressions"
Message-Id: <vx9hg5zq5fw.fsf@panix.com>
Chipmunk <rjk@coos.dartmouth.edu> writes:
> Seriously, though, I have both Advanced Perl Programming and Mastering
> Regular Expressions, and I'm very happy with both of them. MRE was
> especially helpful. After reading it, I now feel confident enough to
> discuss regexes with Eli on clpm.
[yes I know I'm coming in late on this, but I've been sick...]
Wow! Now *that's* a recommendation! Just don't try discussing them with him
in per(l)son... he has this weird smile he gives you... very
unnerving. :-)
Remember - Elijah's code frightens Randal.
I try to look at it only a few characters at a time, myself. :-o
ObOnTopic: MRE *is* pretty darn good. Granted there are errors in the
first edition (although many, if not all, have been corrected in later
printings), but the errata is easily available online - just carry it
around with you while reading. Very little is serious, just little
typoes here and there... of course w/REs, that *can* be serious...
Still it reads well and is almost unbearably informative. Friedel
knows his stuff.
Not to knock Advanced Perl Programming, but given the imortance of REs
in Perl and the fact that Friedel really goes into them from most
directions, not just from Perl, would give MRE the nod in my opinion.
Ideally, of course, you should just get both. Work towards that
bookshelf (local reference)
UnObHolidayGreeting: Happy Valentines day, everyone.
--
David H. Adler - <dha@panix.com>
"The perversity of the Universe tends towards a maximum."
------------------------------
Date: Sun, 15 Feb 1998 18:41:32 +0100
From: tobez@plab.ku.dk
To: "Grant Totten (EXCHANGE:CAR:5J42)" <grantt@americasm01.nt.com>
Subject: Re: .rc file parser, anyone?
Message-Id: <34E728CC.3A3C@plab.ku.dk>
[Posted and mailed]
Grant Totten (EXCHANGE:CAR:5J42) wrote:
> Has anyone written a 'run command' file parser? Are there any libraries
> availabe to do this?
Have you tried IniConf module from CPAN?
Anton.
------------------------------
Date: 16 Feb 1998 03:28:00 GMT
From: troy@nospam.texas.net (Troy Passmore)
Subject: Re: ? Regular Expressions ?
Message-Id: <slrn6efci0.af4.troy@staff2.texas.net>
Tom,
I think his sig line tells it all.
Peter Perchansky, Computer Consultant & Microsoft FrontPage MVP
Dynamic Net, Inc. DBA PMP Computer Solutions
Internet Programming, Web Site Promotion, and more
FrontPage Web Hosting at http://www.pmpcs.com/services/fpwebhosting.htm
FrontPage Support http://www.pmpcs.com/support/frontpage.htm
I have talked to several Computer Consultants on the phone and most of
them havent got a clue. He is probabilty promised a person that he can
make a perl progam to process his mail and now he is finding out that he
will have to actualy learn the stuff. ;)
God help us from the Consultants expecialy the ones that use Front Page.
Troy
On 11 Feb 1998 01:31:01 GMT, Tom Christiansen <tchrist@mox.perl.com> wrote:
} [courtesy cc of this posting sent to cited author via email]
}
}In comp.lang.perl.misc, "Peter Perchansky" <fp@pmpcs.com> writes:
}:> % man perlfaq4
}:> % man perlfaq6
}:I don't have access to telnet in order to look at manual pages. Can you
}:point me to a web page?
}
}Telnet? Telnet?? What in the name of Dennis does telnet have to
}with your ability to read documentation?
}
}All Perl distributions come with complete manpages. If you have Perl,
}you have its documentation. If you don't have its documentation, you
}don't have Perl. It just might not be found via a program called "man".
}Check your distribution's README or installation notes. It's all there,
}or it's not Perl.
}
}There are old stale don't-read-me versions on the web via www.perl.com,
}but the web is not the answer to your problems. Learning to use the
}documentation you already have, is.
}
}--tom
}--
} Tom Christiansen tchrist@jhereg.perl.com
}But you have to allow a little for the desire to evangelize when you
}think you have good news.
} --Larry Wall in <1992Aug26.184221.29627@netlabs.com>
--
Troy Passmore
troy@texas.net
"We think in generalities,
but we live in detail."
------------------------------
Date: 16 Feb 1998 22:14:44 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: ? Regular Expressions ?
Message-Id: <6cadok$4g2$4@comdyn.comdyn.com.au>
In article <34E86340.7136284C@sourceworks.com>,
Bob Sparks <Sparks@Sourceworks.com> writes:
> At home I have a lovely awk, yes awk, script man2html, that at least puts the
> man into a semi up todate interface. At work I don't have the web server to
> run the cgi script so a have the perldocs in one big html document. You will
> never use man pages again once you are set up properly.
Two words:
pod2html
perldoc
One link:
http://language.perl.com/info/documentation.html
You really ought to check before you post.
Martien
PS. I have used both. I have the pages as HTML on a web server here
somewhere. I can even access them directly from disk. I never use
them. They're there for other people who occasionally use perl. I use
perldoc all the time. I would use man if Solaris didn't have such a
broken version of makewhatis installed. Typing man -F is more work to
me than typing perldoc. Anyone I know who ises perl a lot, doesn't
read HTML pages. You cannot grep HTML pages reliably. You cannot
search them quickly.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd. | inexactitude.
NSW, Australia |
------------------------------
Date: 15 Feb 1998 20:14:10 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: A Pubilc Apology.
Message-Id: <m3oh08kwz1.fsf@windlord.Stanford.EDU>
Chip Salzenberg <chip@mail.atlantic.net> writes:
> Any newsreader worth the bits it's recorded on has a search feature.
> For example, in trn, I say:
> /salzenberg/a
> /chip@/a
$salzenberg = 1; # this line is here so that Chip will read my question
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 15 Feb 1998 20:12:06 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: A Pubilc Apology.
Message-Id: <m3ra54kx2h.fsf@windlord.Stanford.EDU>
Tom Christiansen <tchrist@mox.perl.com> writes:
> In comp.lang.perl.misc, les@MCS.COM (Leslie Mikesell) writes:
>> I know how to track followups after finding the parent article, but how
>> do you make trn notice that there is a new article and the parent is
>> 'yours'?
> Use the '-p' flag.
Note that if your newsreader generates message IDs for you (rather than
letting inews or the news server do it), there are even better ways than
adding individual score file entries for each of your message IDs (which
is what trn always used to do).
I have the following entry in my global SCORE file for use with Gnus:
("references"
("<m3[0-9a-z]+.fsf\\(_-_\\)?@windlord\\.Stanford\\.EDU>" 200 nil r))
which will match all references generated by Gnus for my posts. Believe
me, doing this makes Usenet *infinitely* easier to follow.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 15 Feb 1998 16:39:57 -0600
From: les@MCS.COM (Leslie Mikesell)
Subject: Re: A Pubilc Apology.
Message-Id: <6c7qrt$chb$1@Mars.mcs.net>
In article <6c6r60$egi$1@csnews.cs.colorado.edu>,
Tom Christiansen <tchrist@mox.perl.com> wrote:
>
>:I find most followups to my posts these days with DejaNews.
>
>trn does this for you automatically, providing of course
>it not have already expired.
I know how to track followups after finding the parent article,
but how do you make trn notice that there is a new article
and the parent is 'yours'?
Les Mikesell
les@mcs.com
------------------------------
Date: 15 Feb 1998 23:27:55 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: array question
Message-Id: <6c7tlr$ob4$1@marina.cinenet.net>
steve (steveh@cent.com) wrote:
: On Mon, 09 Feb 1998 18:25:47 +0100, Jahnel Klaus
: <jahnel@xarch.tu-graz.ac.at> wrote:
:
: >is it possible to delete all values of an array so that the array is
: >empty?
:
: @array = '';
This succeeds in deleting all values, but does *not* produce an empty
array.
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| Member of The HTML Writers Guild: http://www.hwg.org/
"Every man and every woman is a star."
------------------------------
Date: 15 Feb 1998 23:27:48 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: array question
Message-Id: <6c7tlk$r8n$6@comdyn.comdyn.com.au>
In article <34f4649a.20747322@news.cent.com>,
steveh@cent.com (steve) writes:
>>is it possible to delete all values of an array so that the array is
>>empty?
> @array = '';
*sigh*
As mentioned in numerous other posts, this does NOT leave the array empty.
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au |
Commercial Dynamics Pty. Ltd. | Curiouser and curiouser, said Alice.
NSW, Australia |
------------------------------
Date: Mon, 16 Feb 1998 10:15:56 -0500
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Re: Being Nice 2 Nice Beings [Was: Reading The FAQ's etc.: a teacher's perspective...]
Message-Id: <MPG.f52223b7ddd06e79896df@news.concentric.net>
nvp@shore.net said...
: I believe that RTFM was brought to you by the same MIT folks who
: brought you IHTFP and others. My understanding is that it's a DIY
: phrase coined in jest -- but will all jest, there's a degree of truth.
Indeed, MIT's FAQ archive can be found at
ftp://rtfm.mit.edu
--
#!/usr/bin/perl -w -- Just another Perl hacker,
(open 0),$_=<0>,s,^.*-+ ,,,,chop;for(split?/*?){($$_++or$y=$_,y,
y \,y,<STDIN>,,eval"sub $_ {print '$y'}"),y,0 \,},>STDOUT},,&$_}
# Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Sun, 15 Feb 1998 18:31:36 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Big files, read into variable?
Message-Id: <EoFnGo.6wL@world.std.com>
munn@bigfoot.com (Thomas Munn) writes:
> I am going to be reading in VERY
>large (around 80+MB) files. My thought is that I should read the variable
>into memory & then manipulate it. How is this done? Or: What is the most
>efficient way to take a huge file, make some changes to it via search and
>replace, and then have it spit out a new file?
If you want to read the entire file into memory, it is pretty
easy. The $/ variable controls the "input record separator" which is
the characters that each record read with the <FILEHANDLE> or
FILEHANDLE->readline() functions consider the separator between
"lines" of input. So reading an entire file into a scalar will
probably be something like this:
{
local $/;
$scalar = <FILEHANDLE>;
}
and then the entire contents of the file is in $scalar.
Of course, an array is a "variable" too, and the readline operator
returns all the remaining lines when given a list context. So getting
each line in a successive element of an array would be something like:
@lines = <FILEHANDLE>
See the section on I/O operators in the perlop man page for details:
<URL:http://www.perl.com/CPAN/doc/manual/html/pod/perlop.html#I_O_Operators>
But one last question, do you really need the entire file before you
can make any changes? If you can just read a portion of the file at a
time and process that portion, you might be better of using the line
at a time processing that uses many of perl's common idioms.
while(<>) {
s/foo/bar/g;
}
1
--
Andrew Langmead
------------------------------
Date: Mon, 16 Feb 1998 13:51:28 GMT
From: Bill Jones <webmaster@fccj.cc.fl.us>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can't use string ("") as a subroutine ref while "strict refs" in use
Message-Id: <34E84352.C488D742@fccj.cc.fl.us>
[courtesy cc of this posting sent to cited author via email]
After sleeping, somewhat, on the problem - I would say
I agree with Tom Christiansen - my logic is lacking. So, I
wrote a small perl script which olnly calls subroutines via
the method cited in perlref/perlsub and I cannot get
them to work under 'use strict'. Use diagnostics complains
about many things regard this subject - but primarily it
keeps saying -
Can't use string ("CODE(0x257d28)") as a subroutine ref while "strict refs"
in
use at Filebase_Tabs.pl line 207, <prjCF> chunk 1 (#1)
(F) Only hard references are allowed by "strict refs". Symbolic
references
are disallowed. See perlref.
Uncaught exception from user code:
Can't use string ("CODE(0x257d28)") as a subroutine ref while "strict
r.
main::readCF() called at Filebase_Tabs.pl line 108
So, off to the drawing board again :-)
All I really wanted was a 'case-switch' routine to allow the data input
stream
to drive the Perl script -
[Switch]
data:Tranalstion:Other Stuff here:etc
data:Tranalstion:Other Stuff here:etc
data:Tranalstion:Other Stuff here:etc
[SwitchII]
...
Thing is, I won't know how big each section is...
Could anyone point me in the right direction?
Thanks for the input to all who responded to my previous
rantings, I appreciate your insight and efforts :-)
Bill
PS - I am on Solaris 2.5x with Perl 5.004_03
Tom Christiansen wrote:
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, bill@astro.fccj.cc.fl.us writes:
> : } else {
> : &$vSub;
> : }
> :
> :But I still get this -
> :Can't use string ("") as a subroutine ref while "strict refs" in use at
>
> Logic bug: you didn't init $vSub for the else case.
>
> --tom
> --
> Tom Christiansen tchrist@jhereg.perl.com
> "That's okay. Anyone whose opinion he cares about already knows that
> he doesn't care about their opinion."
> --Larry Wall
------------------------------
Date: 16 Feb 1998 13:59:16 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Can't use string ("") as a subroutine ref while "strict refs" in use
Message-Id: <6c9gnk$r5u$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, bill@astro.fccj.cc.fl.us writes:
:Can't use string ("CODE(0x257d28)") as a subroutine ref while "strict refs"
:in
: use at Filebase_Tabs.pl line 207, <prjCF> chunk 1 (#1)
At some point, you did this:
$r = \&func;
$s = "$r";
&$s();
Don't quote variables you shouldn't -- it can destroy them.
--tom
--
Tom Christiansen tchrist@jhereg.perl.com
#define SIGILL 6 /* blech */
--Larry Wall in perl.c from the 4.0 perl source code
------------------------------
Date: Sun, 15 Feb 1998 23:36:28 GMT
From: mystra@torilmud.com (Eileen Kortright)
Subject: Re: Code Example Needed & Thanks for the Help
Message-Id: <34e779c4.40360996@news.mw.mediaone.net>
On Sun, 15 Feb 1998 22:21:01 GMT, steveh@cent.com (steve) wrote:
>Eileen:
>As you want to work it out for yourself, here is your starting point
>(i think):
Steve,
Wow, your newservice must be mucho behind :P
I have this part of the program working now, thanks to Russ Allbery
and .. hrm... Chipmunk : P
Although I much prefered Russ's suggestion, for clarity I decided to
go with what Chipmunk (Mr. Chipmunk? heh) suggested and do the
separate array/hash thing.
The reason for this was that I thought I would be easier for someone
else to understand and modify the way he had it outlined and it would
also be easier to add day-of-the-week names.
Anyhow, my thanks to the two of you and to anyone else I might have
missed that posted a suggestion.
I really appreciate it.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
pixel persuasions, presence providers
World Wide Web Hosting and Design Services, Plymouth, Michigan USA
Set your browser to: http://www.pixel-persuasions.com/
Check out our MUD Site at: http://www.torilmud.com
------------------------------
Date: Mon, 16 Feb 1998 16:05:45 -0600
From: ucs_rat <ucs_rat@shsu.edu>
Subject: determing integer or string.
Message-Id: <34E8B839.9CB37620@shsu.edu>
I am new to perl and have to would like to write a program that checks
for a var holding a digit or character.... Would anyone have any
examples...
example...
Read in
2222 foo bar 3333 BarFoo
or read in
foo bar 2222 BarFoo 3333
I can read the line in and split it up so that I only have the first
word/number but how do I tell if it is a number or a work?
Thanks in advance,
Robert A. Thompson
------------------------------
Date: Mon, 16 Feb 1998 03:24:50 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <34E7F7D7.DCA6FD49@coos.dartmouth.edu>
Chip Salzenberg wrote:
>
> According to rjk@coos.dartmouth.edu (Chipmunk):
> > PC non-PC
> >good post ?? ??
> >bad post Many Few
> >
> >Your conclusion, that in general posts from PCs should be killfiled, does
> >not necessarily follow.
>
> It follows *if* you have limited time. I do. Don't you?
In that case, you could save even more time by not reading the newsgroup at all.
Chipmunk
------------------------------
Date: 15 Feb 1998 23:43:08 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <6c7uic$npv$9@client2.news.psi.net>
Bart Lateur (bart.mediamind@tornado.be) wrote on 1629 September 1993 in
<URL: news:34ea4fef.4522854@news.tornado.be>:
++
++ Sure. But if that's what I want, I can still resort to "scalar".
++
++ my($x) = scalar @array;
++
++ which problably is clearer also.
Is it? I find LIST -> SCALAR -> LIST conversion not at all clear,
and makes me look twice.
Abigail
--
perl -we 'print split /(?=(.*))/s => "Just another Perl Hacker\n";'
------------------------------
Date: 16 Feb 1998 22:35:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: File question
Message-Id: <6caeus$4g2$7@comdyn.comdyn.com.au>
In article <6c9foq$pfe$1@news.ibm.net.il>,
"Gil Steiner" <orange19@rocketmail.com> writes:
> How do I open a file, read each line, process it, and return it to the same
> file ?
> what I do now is open the file, read the lines and write them to a different
> file.
You definitely want to read section 5 of the perl FAQ:
perldoc perlfaq5
(specifically the question starting with "How do I change one line in
a file")
You will also want to read the documentation on open, close and the <>
operation
perldoc -f open
perldoc -f close
perldoc perlop
(see the section on I/O operators)
If you read those parts of the documentation that comes with perl, you
will know the answer.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd. | things get worse.
NSW, Australia |
------------------------------
Date: 16 Feb 1998 22:31:25 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: File question
Message-Id: <6caent$4g2$6@comdyn.comdyn.com.au>
In article <34E85100.87C8A9E0@fccj.cc.fl.us>,
Bill Jones <webmaster@fccj.cc.fl.us> writes:
> $erc = system("mv $whereItGoes whereIsData") / 256;
You could of course use perl's builtin rename() as long as you don't
move the file over file system boundaries.
perldoc -f rename
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | That's not a lie, it's a terminological
Commercial Dynamics Pty. Ltd. | inexactitude.
NSW, Australia |
------------------------------
Date: Mon, 16 Feb 1998 15:29:20 -0600
From: Holly Sommer <SNIPhsommer@micro.ti.comSNIP>
Subject: Re: Guestbook
Message-Id: <34E8AFB0.6F79B9C9@micro.ti.comSNIP>
Bob:
You should be asking on a CGI newsgroup, then. But, to save you (and
them) the trouble, go to http://www.altavista.digital.com and run a
search for "Matt's Script Archive" (with the quotemarks), or the words
guestbook and script (put a plus sign in front of both words to pull up
pages which MUST include both words).
In the future, too, look at the name of the newsgroup to which you are
posting. This one is "comp.lang.perl.misc" - do you see anything
in the newsgroup name about guestbooks or CGIs? Nope. A more appropriate
newsgroup would be comp.infosystems.www.authoring.cgi, which covers
CGI scripting, specifically.
-Holly
--
My opinions do not necessarily reflect those of my employer.
------------------------------
Date: 15 Feb 1998 23:29:51 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: How can I read Novell DOS Environment-variables in Perl?
Message-Id: <6c7tpf$r8n$7@comdyn.comdyn.com.au>
In article <34E76EC8.FE65DC27@dataweb.nl>,
Gert-Jan van der Lee <gert-jan.lee@dataweb.nl> writes:
> For instance, the DOS-command 'SET' shows all settings for the
> workstation somebody logged in. Can I read this into Perlvariables?
perldoc perlvar
Have a look at the %ENV hash.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | For heaven's sake, don't TRY to be
Commercial Dynamics Pty. Ltd. | cynical. It's perfectly easy to be
NSW, Australia | cynical.
------------------------------
Date: Mon, 16 Feb 1998 10:17:34 -0500
From: Bill Jones <webmaster@fccj.cc.fl.us>
Subject: Re: How to write a perl module
Message-Id: <34E8588E.31DA3018@fccj.cc.fl.us>
Hmmm... I thought the stuff that shipped with Perl
itself was agood place to start?
But that's me,
I think funny :-)
Bill
carloshd@hotmail.com wrote:
> Hi,
>
> I'm a perl rookie trying to write a module with some custom functions;
> but I can't find information or examples on how to write a module. Can
> anyone tell me where to find the info or a quick tip on how to write
> them. I'm running perl on WinNT4.0 (Perl5.003_07 ActiveState Port).
>
> Thank you,
> Carlos Diaz
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sun, 15 Feb 1998 21:04:51 GMT
From: me@here.com (steve)
Subject: Re: HTTP post
Message-Id: <34ec57f8.17512545@news.cent.com>
why dont you use print LOCATION with the arguements and leave sockets
alone, maybe i am misunderstanding what you are trying to do.
if your script has done what it has to do and now needs to take data
to another script you can use print Location the same as print FILE.
On Sat, 17 Jan 1998 17:53:27 -0800, Tom Phoenix
<rootbeer@teleport.com> wrote:
>On 16 Jan 1998, Smith and O'Halloran wrote:
>
>> The blank line comes AFTER Content-Length, not before.
>>
>> You'll find answers to questions like this in comp.lang.perl.misc .
>
>Alas, that's true. But you _should_ find such answers in docs, FAQs, or a
>newsgroup about the protocol or about CGI scripting, since there's nothing
>Perl-specific about where the blank line goes; that's the same if you're
>programming in any language. Cheers!
>
>--
>Tom Phoenix http://www.teleport.com/~rootbeer/
>rootbeer@teleport.com PGP Skribu al mi per Esperanto!
>Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
> Ask me about Perl trainings!
>
------------------------------
Date: 16 Feb 1998 04:00:59 GMT
From: ianc@mincom.com (Ian Clatworthy)
Subject: Re: HUMOR: Userspeak vs Hackerspeak
Message-Id: <6c8dlr$8gv$1@pithy.mincom.oz.au>
Tom Christiansen (tchrist@mox.perl.com) wrote:
[snip]
: C:\ root#
: ============= =================
: what's that? FAQ list
Almost. I would have suggested "Tip of the day" vs "FAQ".
In fact, given Tom's much-needed crusade against newbies
posting questions without doing their homework, perhaps we
need to package the FAQ as a "Tip of the day" help file!
Perhaps a tip could be popped-up every time a newbie
started their newsreader? Of course, we'd probably need to
be unethical and exploit some security hole to make the
tip pop up, but that shouldn't be hard, right? :-) :-) :-)
(In other words, I'm kidding.)
Ian
(who read comp.lang.perl for 5+ years *before* asking questions)
------------------------------
Date: 16 Feb 1998 15:35:06 GMT
From: sitaram@diac.com (Sitaram Chamarty)
Subject: Re: Is It Possible?
Message-Id: <slrn6efhoo.5v1.sitaram@ltusitaram.diac.com>
On Sun, 15 Feb 1998 15:49:06 -0800, Chris Schoenfeld <chris@ixlabs.com> wrote:
>You may be able to get this to work, but Perl would definitely *not* tbe
>the best tool for this job. You'd probably be better off with VB or
>Macromedia Director.
>
>You would also be doing a good deal of groundbreaking and are unlikely
>to be able to get much help on such a project.
>
>-Chris
>
>Tony Kenny wrote:
>>
>> I was wondering what the furthest limit is of perl. Is it possile with
>> current libraries and modules available to write a stand alone program with
>> perl that includes a GUI etc. Such as a front end to a CDROM training
>> product. ?
Perl/TK! I believe there are all sorts of GUI programs using just
Perl and TK. I dont know more, but I dont know why this would be
groundbreaking.
A friend of mine loaded a Win95 port of Perl that came with all
kinds of GUI stuff as examples (using TK). And that's Win95!
------------------------------
Date: Sun, 15 Feb 98 20:33:19 -0500
From: Shmuel (Seymour J.) Metz <spamtrap@library.lspace.org>
Subject: Re: Killfile Triage
Message-Id: <34e7975f$2$fuzhry$mr2ice@news1.mnsinc.com>
In <6c25uc$cum$1@shell13.ba.best.com>, on 02/13/1998
at 11:12 AM, rone+usenet@ennui.org (boar dome) said:
>If you use a valid email address that looks like an invalid email
>address, it's your own fault if people choose to ignore it.
Sorry, but if you hand out incorrect advise, you share in the blame.
Had you told people that they risked ignoring articles with legitimate
return addresses but that you were willing to take the risk, I would
have considered that legitimate. Misinforming people about the
consequences of following your advise is illegitimate.
--
-----------------------------------------------------------
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2
Team OS/2
Team PL/I
Any unsolicited commercial junk E-mail will be subject to legal
action. I reserve the right to publicly post or ridicule any abusive
E-mail.
I mangled my E-mail address to foil automated spammers; reply to
domain acm dot org user shmuel to contact me. Do not reply to
spamtrap@library.lspace.org
-----------------------------------------------------------
------------------------------
Date: 15 Feb 1998 20:20:13 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <m3iuqgkwoy.fsf@windlord.Stanford.EDU>
Chip Salzenberg <chip@mail.atlantic.net> writes:
> The problems aren't related to voting --- at least not the problems that
> I'm aware of. News systems on autopilot abound, and there's no way to
> arrange that all those active files will get updated.
rec.arts.comics.creative was converted from unmoderated to moderated.
Three months later, the problems were almost gone; after a year, there's
nary a difficulty in sight. It takes a while, but it happens. You just
have to encourage your users to bug their local ISPs to change the group
status.
Larger groups, of course, will have more problems.
(This is not to say I favor moderating in place. For this group, I think
creating a new moderated group would be a better approach.)
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V8 Issue 1910
**************************************