[11305] in Perl-Users-Digest
Perl-Users Digest, Issue: 4905 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 16 12:27:19 1999
Date: Tue, 16 Feb 99 09:00:26 -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 Tue, 16 Feb 1999 Volume: 8 Number: 4905
Today's topics:
Re: "Learning Perl" (Maurice Walshe)
cgi's location? dubing@lisco.com
Re: cgi's location? <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: CPAN shell problem (Graham Ashton)
Re: database: viewing large result sets in perl? droby@copyright.com
Re: Datetime manipulation in perl droby@copyright.com
DB_File & GDBM_File on Win32 <edb@interport.net>
Re: delete a line in a file renenyffenegger@my-dejanews.com
free Perl for NT? <tad2x@node10.unix.Virginia.EDU>
Re: free Perl for NT? <Allan@due.net>
Re: HELP! error: Bad name after Uname:: at shift.pl lin (Tad McClellan)
Re: How to converT decimal to hex???????? (Clay Irving)
MySQL from NT <dragon@ka.net>
Opening and printing textfiles containing variables arno_22@hotmail.com
Re: Opening and printing textfiles containing variables <Tony.Curtis+usenet@vcpc.univie.ac.at>
Re: Parsing <bmb@ginger.libs.uga.edu>
Re: Perl s///...can it be done in one line? (Peter Palfrader)
Re: Perl s///...can it be done in one line? (Sean McAfee)
Re: Problem with UPLOAD files by perl !?? (Clay Irving)
Re: Python vs. Perl vs. tcl ? droby@copyright.com
Re: Redirectiong STDERR (Peter Palfrader)
Regular expression for Currency ??? bill_mcintyre@my-dejanews.com
searching: script for recursive changing files <vogel@hdz-ima.rwth-aachen.de>
Re: searching: script for recursive changing files <tchrist@mox.perl.com>
skipping header in file when doing formated printing jocke1s@earthling.net
SNMPerl <bgibby@iinet.net.au>
Re: SRC: pmload - show what files a module loads <dboorstein@ixl.com>
Using Perl to interrogate Hotmail (Vadim Dostman)
Re: Visual Perl? <dropzone@mail.utexas.edu>
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 16 Feb 99 16:44:19 GMT
From: walshemj@boat.bt.com (Maurice Walshe)
Subject: Re: "Learning Perl"
Message-Id: <7ac7ei$mve$1@pheidippides.axion.bt.co.uk>
In article <7a4r03$4gn$1@gellyfish.btinternet.com>, Jonathan Stowe <gellyfish@btinternet.com> wrote:
>On Fri, 12 Feb 1999 11:45:15 -0800 Bill Garrett wrote:
>> I got the book "Learning Perl" and for some reason some of the
>> source code doesn't work.
>> I took this code exactly from the book and it doesn't work:
>> #!/usr/local/bin/perl -w
>> print "What is your name?";
>> $name = <STDIN>;
>> chomp ($name);
>> print "Hello, $name!\n";
>> What could be the problem?
>> Does it only run from the shell?
>I dont believe that there are any examples of CGI applications in
>"Learning Perl". There are good books out there that deal with this
>subject however.
I belive the most recent version of learning perl (blue lama) does have
some stuff on CGI.
Rgds Maurice
Ps The Perl in a Nutshell is out now
------------------------------------------------------------------------------
|Maurice Walshe You'll Never Get to heaven with an Ak47, |
|Software Engineer But A Zu 30's excelent for low flying Cherubim |
|mjwalshe@boat.bt.com |
| Not an official Statement of BT's Views unless explicity stated |
|-----------------------------------------------------------------------------
------------------------------
Date: Tue, 16 Feb 1999 14:49:26 GMT
From: dubing@lisco.com
Subject: cgi's location?
Message-Id: <7ac0hi$ojo$1@nnrp1.dejanews.com>
Hi there,
A webserver should have a specific cgi directory (e.g. /www/cgi) for storing
all cgi programs. But usually this system cgi directory is not wordwide
writable. Is it possible for general user to save private cgi program in
his/her own private cgi directory (e.g. /home/user/public_html/cgi)?
Therefore no need to bother system administrator especially when the cgi
programmming is just for some experiment.
Thanks in advance for any suggestion on this issue.
By the way, I do not come to this group often. Please email me at
bing-du@cis-gw.tamu.edu.
Bing
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 16 Feb 1999 16:10:08 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: cgi's location?
Message-Id: <83aeyeqt9r.fsf@vcpc.univie.ac.at>
Re: cgi's location?, dubing <dubing@lisco.com> said:
dubing> Hi there, A webserver should have a specific
dubing> cgi directory (e.g. /www/cgi) for storing
dubing> all cgi programs. But usually this system
dubing> cgi directory is not wordwide writable. Is
dubing> it possible for general user to save private
dubing> cgi program in his/her own private cgi
dubing> directory (e.g. /home/user/public_html/cgi)?
dubing> Therefore no need to bother system
dubing> administrator especially when the cgi
dubing> programmming is just for some experiment.
Look carefully at what you have written. Is the
word "perl" actually mentioned at all anywhere?
dubing> By the way, I do not come to this group
dubing> often.
Well please only come back when you have something
to say about perl...
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: 16 Feb 1999 16:02:52 GMT
From: graham@mirror.bt.co.uk (Graham Ashton)
Subject: Re: CPAN shell problem
Message-Id: <slrn7cj5le.l33.graham@wing.mirror.bt.co.uk>
In article <36C8DEC1.BCFE2538@orbonline.net>, Edmond Cheng wrote:
>%perl -CPAN -eshell
>
>We need to know the URL of your favorite CPAN site.
>Please enter it here: ftp.crc.ca
try putting ftp://ftp.crc.ca/path/to/CPAN/ instead.
--
Graham
------------------------------
Date: Tue, 16 Feb 1999 15:33:39 GMT
From: droby@copyright.com
Subject: Re: database: viewing large result sets in perl?
Message-Id: <7ac34k$qt9$1@nnrp1.dejanews.com>
In article <F77CCL.7D0@world.std.com>,
aml@world.std.com (Andrew M. Langmead) wrote:
> tadmc@metronet.com (Tad McClellan) writes:
>
> > Can you really _get_ an infinite size set of anything?
>
> > I will be quite astounded if you can...
>
> But if you start getting a record at a time, how can you tell it is
> going to end? It seems that if you can prove that it isn't an infinite
> set, you've solved the halting problem.
>
I believe the halting problem was completely handled almost 10 years ago.
See http://www.netfunny.com/rhf/jokes/89q4/halting.760.html for the complete
proof.
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 16 Feb 1999 16:38:20 GMT
From: droby@copyright.com
Subject: Re: Datetime manipulation in perl
Message-Id: <7ac6tr$ufh$1@nnrp1.dejanews.com>
In article <7a6d7u$7hl$1@nnrp1.dejanews.com>,
sharda@hotmail.com wrote:
> hi everybody,
>
> I am writing perl code which reads the datetime which are sent by the email
> headers and then stores it into the database.The acceptable database format
> is: mm/dd/yyyy hh:mm:ss
>
> I am not able to write a module which can take care of all possible
> datetime formats.
>
Indeed you're not able to write such a module. Nor am I. Nor anyone else.
> For example:
>
> Day can be : 01 OR 1
>
> Month can be: Feb OR February OR 02 OR 2
>
> Year can be : 99 OR 1999
>
> Hence a data could be: 08 2 03 12:12:12
>
Which could be interpreted as August 2, 1903, March 2, 1908, February 8, 1903,
etc... for I think a total of 6 possibilities (in this case) ignoring the
century problem.
There is no context to disambiguate these
> Now, in this, how to find out which is month, which is day and which is
> year? :(
>
> I cannot restrict the format to a particular type.
>
You need to restrict the format.
If the dates are from mail headers you should be able to restrict the format.
Consult RFC822 and its Y2K update in RFC1123. These documents give very
specific syntax for date and time specification in headers.
If your mail is Internet-based it should adhere to this syntax, and the dates
should be quite easy to parse unless you have to deal with time-zones. And
if they were mailed in this decade they should have a four digit year
(RFC1123 only said SHOULD, not MUST, but it only makes sense...)
> Any idea on this will be highly appreciated.
>
Context is everything. Hope this helps.
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 16 Feb 1999 15:23:55 GMT
From: "Ed.Q.Bridges" <edb@interport.net>
Subject: DB_File & GDBM_File on Win32
Message-Id: <7ac2ib$95m$1@winter.news.rcn.net>
i was able to successfully compile the Berkeley
DBM source code on NT Server, obtaining a libdb.dll
file.
however, i'm not able to make test nor make install
either the BerkeleyDB nor the DB_File modules.
during the perl Makefile.PL step i get numerous
warnings saying that it can't locate various windows
libraries (like gdi.dll, etc), with attendant
messages that say "Don't worry, it probably doesn't
matter" (then why put up the message in the first
place?! but i digress).
then in make test, i get a message saying something
like "Command not found" referring to what appears
to be the command 'cd'.
has anyone ever been able to install the DB_File
(or GDBM) modules on NT Server successfully? or am
I just barking up the wrong tree??
any help would be appreciated.
please cc: responses to edb@interport.net
thank you
--e--
------------------------------
Date: Tue, 16 Feb 1999 14:10:33 GMT
From: renenyffenegger@my-dejanews.com
Subject: Re: delete a line in a file
Message-Id: <7abu8h$mj2$1@nnrp1.dejanews.com>
this is what the -i switch is for -> no need to delete temporary files and
copying files over the original one.
> foreach line in file
> Do we want to delete this line?
> NO - print line to temporary output file
> YES - don't print line to temporary output file
> Copy the temporary file over the original.
> Delete temporary file.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 16 Feb 1999 09:04:31 -0500
From: Todd Anthony Delong <tad2x@node10.unix.Virginia.EDU>
Subject: free Perl for NT?
Message-Id: <x1chfsmfnrk.fsf@node10.unix.Virginia.EDU>
I have project coming up that will involve Perl development on the PC
(probably under NT). I realize that I can purchase the Win32 Perl package
from O'Reilly, but I was wondering if there is a version of Perl 5 for NT for
"free" (where a small donation is greatly appreciated). Ordinarily, I
wouldn't mind purchasing Perl, but this project will eventually involve
running the Perl program on ~200 machines, and I'm not all that psyched about
having to purchase 200 copies of the Win32 version of Perl 5.
Thanks.
--
Todd
------------------------------
Date: Tue, 16 Feb 1999 11:15:19 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: free Perl for NT?
Message-Id: <7ac56u$ofv$1@camel21.mindspring.com>
Todd Anthony Delong wrote in message ...
:I have project coming up that will involve Perl development on the PC
:(probably under NT). I realize that I can purchase the Win32 Perl package
:from O'Reilly,
You don't really purchase it from them. You buy something from them and
they include the Perl distribution which is free, but that is not the only
way to obtain the distribution.
but I was wondering if there is a version of Perl 5 for NT for
:"free" (where a small donation is greatly appreciated).
No need for a donation, just sing the glorious praises of the best
programming language on the face of the earth which is now, and ever shall
be, free, free, free.
: Ordinarily, I
:wouldn't mind purchasing Perl, but this project will eventually involve
:running the Perl program on ~200 machines, and I'm not all that psyched
about
:having to purchase 200 copies of the Win32 version of Perl 5.
But wait, you are mistaken. The Win32 version of Perl is, can you guess,
free!
Get thee to www.activestate.com and all your dreams will be fulfilled.
HTH
AmD
------------------------------
Date: Tue, 16 Feb 1999 08:10:43 -0600
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: HELP! error: Bad name after Uname:: at shift.pl line 665
Message-Id: <39uba7.0o.ln@magna.metronet.com>
silent1@bigpond.com wrote:
: Everytime I try to run my program I get the error:
: Bad name after Uname:: at shift.pl line 665
: this is line 665:
: if ($csray{$Form{'Uname'}}[1] ne $Form{'Pword'}) {
: }
: and that exact line is in the program 8 times before then.
: I can't work out what the problem is.... can anyone shed some light on
: this please?
Line numbers reported in error messages are the line where
perl _noticed_ that something is wrong.
The real error may be several (or even a whole bunch of) lines
before that.
We need more context.
--
Tad McClellan SGML Consulting
tadmc@metronet.com Perl programming
Fort Worth, Texas
------------------------------
Date: 16 Feb 1999 10:36:14 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: How to converT decimal to hex????????
Message-Id: <7ac39e$dl0$1@panix.com>
In <36738004.57331741@news.au.ac.th> burningboy@hotmail.com (James Bond 098) writes:
>How to converT decimal to hex????????
>plz teach me....................................
Read the documentation:
perldoc -f sprintf
or search DejaNews:
http://www.dejanews.com/[ST_rn=ps]/dnquery.xp?ST=PS&QRY=convert+hex&defaultOp=AND&DBS=1&format=terse&showsort=score&maxhits=25&LNG=ALL&subjects=&groups=comp.lang.perl.misc&authors=&fromdate=&todate=
--
Clay Irving
clay@panix.com
------------------------------
Date: Tue, 16 Feb 1999 09:47:09 -0500
From: "Eric Adkinson" <dragon@ka.net>
Subject: MySQL from NT
Message-Id: <36c984fd.0@news.iglou.com>
I am trying to access a MySQL db from Windows NT with Active Perl. I have
the DBI package installed and I keep reading about the DBD::MySQL package,
but I can't find it anywhere. Does anyone know where I can find it?
Alternately, can anyone give me guidance on the use of the DBD::ODBC package
to accomplish this task?
Thanks in advance for your help.
Eric
------------------------------
Date: Tue, 16 Feb 1999 15:18:05 GMT
From: arno_22@hotmail.com
Subject: Opening and printing textfiles containing variables
Message-Id: <7ac273$pvf$1@nnrp1.dejanews.com>
I've got this code:
$var = "Even more blabla";
open (FILE, "text.txt");
while (<FILE>) {
print "$_";
}
close (FILE);
And a textfile containing:
Hi everybody,
This is line 2 with variable: $var
Closing file...
The output of the code is exactly the same as the textfile. Why doens't perl
change $var in 'Even more blabla'. What do I have to do to solve this problem?
Arno Bogaard (arno_22@hotmail.com)
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 16 Feb 1999 16:53:20 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Opening and printing textfiles containing variables
Message-Id: <837ltiqr9r.fsf@vcpc.univie.ac.at>
Re: Opening and printing textfiles containing
variables, arno <arno_22@hotmail.com> said:
arno> I've got this code: $var = "Even more blabla";
arno> open (FILE, "text.txt"); while (<FILE>) {
arno> print "$_"; } close (FILE);
[ unchecked open() ]
arno> Hi everybody, This is line 2 with variable:
arno> $var Closing file...
arno> The output of the code is exactly the same as
arno> the textfile. Why doens't perl change $var in
arno> 'Even more blabla'. What do I have to do to
arno> solve this problem?
It prints out what it gets. If it gets the 4-char
sequence "$var" that's what it prints.
What you want to do is to scan each line looking for
$<name> sequences and then replace them with any
variables you might have defined in your program.
It's probably better/easier to use a hash for the
replacement text thus:
$replace{var} = 'blah blah';
Then you don't create any arbitrarily named
variables which might overwrite some of perl's
internal ones.
hth
tony
--
Tony Curtis, Systems Manager, VCPC, | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien. | <URI:http://www.vcpc.univie.ac.at/>
"You see? You see? Your stupid minds! | private email:
Stupid! Stupid!" ~ Eros, Plan9 fOS.| <URI:mailto:tony_curtis32@hotmail.com>
------------------------------
Date: Tue, 16 Feb 1999 09:29:29 -0500
From: Brad Baxter <bmb@ginger.libs.uga.edu>
Subject: Re: Parsing
Message-Id: <Pine.A41.4.02.9902160926120.61380-100000@ginger.libs.uga.edu>
On Mon, 15 Feb 1999, Larry Rosler wrote:
> Mon, 15 Feb 1999 18:16:12 -0500, Brad Baxter says...
> > Try 'split' and 'join':
> > join( ",", split( /\n/, $OfficeAddress ) ),
> That is painfully slow and complicated compared to 'tr':
> $OfficeAddress =~ tr/\n/,/;
Point well taken. Possibly he'll just have to remember to chop the ending
comma if there is one and he cares (or chomp $OfficeAddress first).
Regards,
-Brad
------------------------------
Date: Tue, 16 Feb 1999 15:43:28 GMT
From: palfrader@usa.net (Peter Palfrader)
Subject: Re: Perl s///...can it be done in one line?
Message-Id: <36c98edc.290163@news.uibk.ac.at>
On Mon, 15 Feb 1999 18:12:32 -0500, comdog@computerdog.com (brian d
foy) wrote:
I'm rather new to perl and understood most of your line at least in
principal, but I do have a few qustions.
>s/"(.*?)"/ my $x = $1; $x =~ s|([A-Z])|$1!|g; qq|"$x"| /ge;
* this uses $_ as a default variable, doesn't it?
* the /e option tells perl to evaluate the replacement string as a
perl expression. qq|"$x"| obviosly returns the result then. Could you
please explain to me what this qq|"$x"| is? is it something like a
print with an arbitrary delimiter?
--
Weasel mailto:palfrader@writeme.com
-----------------------------------------------------------------
"With a rubber duck, one's never alone"
-- The Hitchhiker's Guide to the Galaxy
------------------------------
Date: Tue, 16 Feb 1999 16:03:41 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Perl s///...can it be done in one line?
Message-Id: <xFgy2.7583$Ge3.30075227@news.itd.umich.edu>
In article <36c98edc.290163@news.uibk.ac.at>,
Peter Palfrader <palfrader@usa.net> wrote:
>* the /e option tells perl to evaluate the replacement string as a
>perl expression. qq|"$x"| obviosly returns the result then. Could you
>please explain to me what this qq|"$x"| is? is it something like a
>print with an arbitrary delimiter?
Yes, exactly. See the perlop man page. Also, see my .sig.
--
Sean McAfee mcafee@umich.edu
print eval eval eval eval eval eval eval eval eval eval eval eval eval eval
q!q@q#q$q%q^q&q*q-q=q+q|q~q:q? Just Another Perl Hacker ?:~|+=-*&^%$#@!
------------------------------
Date: 16 Feb 1999 10:37:49 -0500
From: clay@panix.com (Clay Irving)
Subject: Re: Problem with UPLOAD files by perl !??
Message-Id: <7ac3cd$e30$1@panix.com>
In <34e836fb.5313680@news.inet.co.th> burningboy@hotmail.com (James Bond 098) writes:
>Ah....
>I've written a perl script for uploading files.
>IT's
>require "cgi-lib.pl";
>$data=$in{'data'};
>open(file,">anyname.jpg");
>print file $data;
>close(file);
>But...... Do you know how to change "anyname.jpg" to the real name
>of file(from the client), such as , sending a file named "test.txt"
>the my script save it to "test.txt", not "anyname.jpg" !!?
I'd recommend switching to CGI.pm:
http://stein.cshl.org/WWW/software/CGI/cgi_docs.html#upload_caveats
--
Clay Irving
clay@panix.com
------------------------------
Date: Tue, 16 Feb 1999 15:18:35 GMT
From: droby@copyright.com
Subject: Re: Python vs. Perl vs. tcl ?
Message-Id: <7ac282$pvm$1@nnrp1.dejanews.com>
In article <wkaeym6pxl.fsf@ifi.uio.no>,
Lars Marius Garshol <larsga@ifi.uio.no> wrote:
> | It (Python) also seems to have some awkward non-intuitive syntax.
> | For example, to avoid a newline after the output of a print
> | statement, you add a trailing comma. Now, that is not what I would
> | call intuitive (does it remind of me of Basic??) .. another example,
> | to construct a tuple of one item, add a comma .. again .. not very
> | intuitive.
>
> I agree that these are weak points in the syntax. However, I can't
> really think of any better alternatives myself, and also, they are in
> parts of the language I rarely need. So thankfully the damage is
> limited. (And, yes, it reminds me too of Basic, although the varieties
> I've used used ';' instead of ','.)
>
Actually, I think most Basics use both. When printing multiple things
without quoting, you separate by commas if you want tabs in between and by
semicolons if you don't. At the end of the print you get a newline by
default, but using a comma or semicolon prevents the newline and continues
the separation behavior described above to the next print.
At least that's the way I remember it from my days long ago with the PDP-11
and RSTS, and I think it was the same on early DOS Basics. I haven't looked
at the current stuff.
Ugly.
--
Don Roby
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 16 Feb 1999 15:43:28 GMT
From: palfrader@usa.net (Peter Palfrader)
Subject: Re: Redirectiong STDERR
Message-Id: <36c98e2d.114589@news.uibk.ac.at>
btw:
how can I pipe STDERR?
--
Weasel mailto:palfrader@writeme.com
-----------------------------------------------------------------
"With a rubber duck, one's never alone"
-- The Hitchhiker's Guide to the Galaxy
------------------------------
Date: Tue, 16 Feb 1999 15:31:17 GMT
From: bill_mcintyre@my-dejanews.com
Subject: Regular expression for Currency ???
Message-Id: <7ac306$qrt$1@nnrp1.dejanews.com>
I am having a brain lock on this.
What would the regular expression be to test the proper format of currency.
For example $123,234.00 (I want to ensure 2 decimal places and a comma every
thousand)
Thanks for your help.
Bill
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 16 Feb 1999 16:06:39 +0100
From: vogel <vogel@hdz-ima.rwth-aachen.de>
Subject: searching: script for recursive changing files
Message-Id: <36C9897F.DCF071F4@hdz-ima.rwth-aachen.de>
Hello,
we need a script wich changes /home/&users/netscape/ files, e.g.
prefs.js. It must be recursive.
E.g. we want to change the POPserver and we have to change the word
oldPOP into newPOP.
Thanks Stefan
------------------------------
Date: 16 Feb 1999 08:09:37 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: searching: script for recursive changing files
Message-Id: <36c98a31@csnews>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc,
vogel <vogel@hdz-ima.rwth-aachen.de> writes:
:Hello,
:
:we need a script wich changes /home/&users/netscape/ files, e.g.
:prefs.js. It must be recursive.
:
:E.g. we want to change the POPserver and we have to change the word
:oldPOP into newPOP.
You don't write a recursive script. You use tools. One recurses.
One changes. Different stuff.
perl -i.bak -pe 's/foo/bar/g' `find . -name '*.c' -print`
is easiest.
Whatever happened to respecting tool combinatorics? Did somebody get
hit in the face with monopolistic monolith, or what?
USE MANY TOOLS.
--tom
--
#ifdef USE_STD_STDIO /* Here is some breathtakingly efficient cheating */
--Larry Wall, from sv.c in the v5.0 perl distribution
------------------------------
Date: Tue, 16 Feb 1999 15:52:43 GMT
From: jocke1s@earthling.net
Subject: skipping header in file when doing formated printing
Message-Id: <7ac487$rvd$1@nnrp1.dejanews.com>
Hi all,
I am sorry if this seems like very basic question but I am having
a bit of a hard time getting started.
I guess this is very simple and I would really appreciate some advice
in how I do this. Part of the problem is something easily done with the
getline function in awk. And the problem itself is perfect for awk but
since I want to get it into some more general use I really would like to
do it in perl.
I have programming perl and the perl cookbook but I guess I am not experienced
enough to use them to their full potential yet.
Here is what I like to do.
print STDOUT "What file should be read: ";
#
open(FILE, <STDIN>)|| die "Can't open file \n
# opening a ascii file with data
* I now want to skip the first 10 lines
This is done 1 time to get rid of the file header
*
A * get the column 1 value of line 11(the first line after the header)
* skip 1 line
* get the column one value of the next line
B * get the column one value of the next line
the 3 values (text,numers etc separated by space) should be printed and
then the loop should start at A again and do this until EOF.
Would very much appreciate some tutoring here.
Best Regards
JS
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Tue, 16 Feb 1999 22:05:52 +0800
From: "Bradley J. Gibby" <bgibby@iinet.net.au>
Subject: SNMPerl
Message-Id: <7abu21$7ng$1@news.iinet.net.au>
Hi everyone,
Just wondering if anyone can point me to a place where I can download
prefably a pre-compiled version ) of SNMPerl and some USEFUL documentation.
I need to talk to a Ascend Max 4000 and send a single "KILL <session_id>"
signal but I'm having trouble the normal way so I've decided to try SNMP.
Thanks heaps q:)
Please reply to my via email ( bgibby@iinet.net.au ) ... Thank you!
--
Bradley J. Gibby
http://www.iinet.net.au/~bgibby/index.html
------------------------------
Date: Tue, 16 Feb 1999 10:01:09 -0500
From: Dan Boorstein <dboorstein@ixl.com>
Subject: Re: SRC: pmload - show what files a module loads
Message-Id: <36C98835.8DB2560A@ixl.com>
Tom Christiansen wrote:
>
> =head1 NOTE
>
> If the programmers used a delayed C<require>, those files won't show up.
> Furthermore, this doesn't show all possible files that get opened,
> just those that those up in %INC. Most systems have a way to trace
^^^^^
show?
great stuff Tom!
dan boorstein
------------------------------
Date: Tue, 16 Feb 1999 07:53:10 -0800
From: vadim@vocaltec.com (Vadim Dostman)
Subject: Using Perl to interrogate Hotmail
Message-Id: <Gvgy2.10477$bq.63112803@WReNphoon2>
go to http://www.cyber-info.com/ and download hotmail
notify agent... sorry if this is a bit off-topic :)
ohmm shivaya!
Vadim
*** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ***
------------------------------
Date: Tue, 16 Feb 1999 10:27:36 -0600
From: Forrest Reynolds <dropzone@mail.utexas.edu>
Subject: Re: Visual Perl?
Message-Id: <36C99C79.E74C263B@mail.utexas.edu>
The Girlfriend.pm that I have also demands that I
Tie the $knot, but her superclass won't Bless me.
Forrest
Bart Lateur wrote:
>
> Martien Verbruggen wrote:
>
> >> Yeah, this reminds me of a popular program called GirlFriend 1.0. It
> >> doesn't always know what you want either. But then again, I don't think
> >> it is a Perl Script.
> >
> >I upgraded mine to Wife 1.0. Works a lot better :)
>
> The problem is that the Wife module and the GirlFriend module don't work
> too well together.
>
> Bart.
------------------------------
Date: 12 Dec 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 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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 4905
**************************************