[11795] in Perl-Users-Digest
Perl-Users Digest, Issue: 5395 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 15 23:07:28 1999
Date: Thu, 15 Apr 99 20:00:23 -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, 15 Apr 1999 Volume: 8 Number: 5395
Today's topics:
"using ps aux to display each process nams as an HREF" <t0.ho@student.qut.edu.au>
Re: "using ps aux to display each process nams as an HR (Sam Holden)
Re: "using ps aux to display each process nams as an HR <cassell@mail.cor.epa.gov>
Re: $variables in <FILES> (Ronald J Kimball)
Re: are circular references causing out of memory error <tchrist@mox.perl.com>
Re: are circular references causing out of memory error (Ronald J Kimball)
Re: are circular references causing out of memory error <cassell@mail.cor.epa.gov>
Can anybody help me!!! <sergue@ica.net>
Re: Can anybody help me!!! <cassell@mail.cor.epa.gov>
Re: Core <cassell@mail.cor.epa.gov>
display and modify configuration file /etc/resolv.conf <t0.ho@student.qut.edu.au>
Re: flocking question - worried (Daniel Beckham)
ftp for Windows NT? <toddnkay@mediaone.net>
How to make a var defined in more than one package? sstarre@my-dejanews.com
Re: How to make a var defined in more than one package? <uri@home.sysarch.com>
Re: Need to print \n - Not do a carrage return (Ronald J Kimball)
Re: Perl Regex Q? (Ronald J Kimball)
Re: Question about Connection (Abigail)
Re: reference to an *existing* sub <mpersico@erols.com>
Re: SimVirus Program beta99 (Ronald J Kimball)
Re: TPJ still shipping? <eweiss@winchendon.com>
Unix serial port access (Neil Cherry)
Using spaces in globbing? ([sp-])
Re: Using spaces in globbing? ([sp-])
Re: Using spaces in globbing? ([sp-])
Re: Using spaces in globbing? (Sam Holden)
Re: Writing to syslog on Linux (Neil Cherry)
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 16 Apr 1999 11:42:15 +1000
From: "Jonathan Ho" <t0.ho@student.qut.edu.au>
Subject: "using ps aux to display each process nams as an HREF"
Message-Id: <7f64j7$ec6$1@dove.qut.edu.au>
Yo,
How to list the output form ps aux but display each process name as an HREF
so that clicking on the process name will cause the process to restart, in
effect issue kill -HUP on the process.
regards
------------------------------
Date: 16 Apr 1999 01:54:34 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: "using ps aux to display each process nams as an HREF"
Message-Id: <slrn7hd62q.f5f.sholden@pgrad.cs.usyd.edu.au>
Jonathan Ho <t0.ho@student.qut.edu.au> wrote:
>Yo,
>
>How to list the output form ps aux but display each process name as an HREF
>so that clicking on the process name will cause the process to restart, in
>effect issue kill -HUP on the process.
Perl doesn't do HREF stuff that would be handled by a web browser.
You do exactly what you just said. List the output wrap the name in
a HREF that point to a cgi you have written that does whataver you
need doing...
You really should try to do your homework yourself before you ask for an
answer.
--
Sam
PC's are backwards ... throw them out! Linux is ok though.
--Rob Pike (on the subject of CR/LF etc)
------------------------------
Date: Thu, 15 Apr 1999 19:50:01 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: "using ps aux to display each process nams as an HREF"
Message-Id: <3716A559.28BD9F82@mail.cor.epa.gov>
Jonathan Ho wrote:
>
> Yo,
Yo, Ho.
>
> How to list the output form ps aux but display each process name as an HREF
> so that clicking on the process name will cause the process to restart, in
> effect issue kill -HUP on the process.
>
> regards
In Perl, of course. :-)
You do it the same way you have it outlined.
(1) capture the output of ps -aux
(2) re-format the output and put HTML tags around the pieces
(3) generate an HTML form that sends info back to the system,
identifying
which button was clicked
(4) feed that info to a process which then does the kill -HUP, making
sure that the correct shell does the work
When you have it written, if you run into some debugging problems
you can show us your code and get some more help. But you can't expect
us to write your code for you.
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 15 Apr 1999 21:49:01 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: $variables in <FILES>
Message-Id: <1dqbmk9.o2b6hn1f5dozqN@p54.tc2.state.ma.tiac.com>
Tad McClellan <tadmc@metronet.com> wrote:
> Oh yeah, and I don't want the newline either, so Perl
> should have auto-chomped it for me too.
>
> Isn't there an unused punctuation character (or sequence of
> characters) that can be made into a special variable that
> controls auto-chomping?
Forgive me if you were being facetious...
#!perl -l
There does not appear to be a corresponding special variable, however.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
perl -le 'print "Just another \u$^X hacker"'
------------------------------
Date: 15 Apr 1999 19:26:57 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: are circular references causing out of memory error?
Message-Id: <371691e1@cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, martin@cutup.de writes:
:The machine has 128MB of RAM with NT taking up 80 so there
:should be enough "room".
I don't know whether to laugh or to cry. EIGHTY FRICKING MEGABYTES?
Shoot the pig now and put yourself out of its misery.
Or add more swap space and continue to suffer the slings and
arrows of outrageously sucky pieces of claptrap.
--tom
--
if (rsfp = mypopen("/bin/mail root","w")) { /* heh, heh */
--Larry Wall in perl.c from the perl source code
------------------------------
Date: Thu, 15 Apr 1999 21:49:02 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: are circular references causing out of memory error?
Message-Id: <1dqbmqt.1vfq3l7z8yocgN@p54.tc2.state.ma.tiac.com>
<martin@cutup.de> wrote:
> The HTML result is generated by a set of HTML objects. Among them is a Table
> object whose Table_Cell children have a reference back to a Table instance so
> that they know which table they belong to.
>
> Is this a case of a circular reference which Perl's garbage detection can not
> deal with?
Probably. Break the circle of references when you want the objects to
be destroyed.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 15 Apr 1999 19:35:44 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: are circular references causing out of memory error?
Message-Id: <3716A200.AB38D8BF@mail.cor.epa.gov>
Tom Christiansen wrote:
>
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, martin@cutup.de writes:
> :The machine has 128MB of RAM with NT taking up 80 so there
> :should be enough "room".
>
> I don't know whether to laugh or to cry. EIGHTY FRICKING MEGABYTES?
> Shoot the pig now and put yourself out of its misery.
>
> Or add more swap space and continue to suffer the slings and
> arrows of outrageously sucky pieces of claptrap.
Tom, to be fair I really doubt that NT is requiring that much room.
It is just planning on the availability, and marking that memory as
'taken'. It shows up that way on some of the tools, but that
seldom means that NT and programs have already eaten all that RAM
up.
That said, the error message is interesting. If NT etc. have left
48M clear, how could the machine be out of memory? There have been
BIOSes which had trouble properly addressing more than 64M RAM, but
that's unlikely - and darn hard for us to troubleshoot from here. :-)
On the other hand, a program with a memory leak could be chewing up
some of the system resources [which are much smaller than available
RAM], to the point that the system degrades sadly. I seem to recall
a number of win 3.11 and win95 systems which improved markedly after
we took the 'After Dark' screen savers off.
So I wonder what else is running on that machine?
David, who has a win95 machine at home that hasn't locked up since I
upgraded the printer driver in January, but is posting this elsewhere...
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 15 Apr 1999 21:20:56 -0700
From: serguei <sergue@ica.net>
Subject: Can anybody help me!!!
Message-Id: <3716BAA7.CA790C9A@ica.net>
Hi everybody
I need a small help with my perl script. I wrote the database program
but I have not been able to solve one problem.
http://www.visualweb.org/datas/search.html this is a search page.
It was written for the russian communuty. It's not ready yet but
anyway
if you type let's say "emmigration" you will get two parameters from
database.
One is a name of company and other is a small description what kind of
service
the company offers .
The name of company has a link that would draw out only information
about
the company from database .
The script (http://visualweb.org/cgi-bin/com/comp_b.pl) draws out the
information about every company but I need only one company what is
linked
with the link (name of company)
I would very much appreciate it if anyone could help me with the
problem
Thanks in advance
Serguei
------------------------------
Date: Thu, 15 Apr 1999 19:26:05 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Can anybody help me!!!
Message-Id: <37169FBD.951D5578@mail.cor.epa.gov>
serguei wrote:
>
> Hi everybody
> I need a small help with my perl script. I wrote the database program
> but I have not been able to solve one problem.
>
> [snip of discussion]
Serguei,
As I said when you e-mailed me, you need to provide some code so that
the experts here can assess the problem. Please try to put together
a small program which illustrates your problem. Can you re-create the
problem in 20 or 30 lines? If so, show us that, with the results (and
any error messages), and tell us what you were expecting. So far,
you're not giving us anything with which to work.
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Thu, 15 Apr 1999 19:21:16 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Core
Message-Id: <37169E9C.CC91D293@mail.cor.epa.gov>
Chris Lambrou wrote:
>
> One of our PERL scripts on our Web Server dumps the core, peridically.
> 1. When will PERL dump a core file? And under what circumstances?
> 2. How can we identify the offending script?
>
> Gracias.
It would be really helpful if you could give us a little more
information.
Like the output of 'perl -V' so we can see what version of Perl you're
running. Like which version of which webserver, on which version of
what
OS, and with what extensions. apache and mod_perl? IIS and PerlEx?
PerlScript? Get any error messages in your logs? Are you running
your Perl programs with the -w and -T flags on the shebang line?
How many Perl programs? With what other programs? Or is this straight
HTML and Perl and no other scripting languages whatsoever?
How do you know it's one of your perl programs and not the webserver or
another language being used on your webserver? That kind of stuff.
Because Perl doesn't usually dump core. So we need some info.
De nada,
David
--
David Cassell, OAO
cassell@mail.cor.epa.gov
Senior Computing Specialist phone: (541)
754-4468
mathematical statistician fax: (541)
754-4716
------------------------------
Date: Fri, 16 Apr 1999 11:47:52 +1000
From: "Jonathan Ho" <t0.ho@student.qut.edu.au>
Subject: display and modify configuration file /etc/resolv.conf
Message-Id: <7f64tm$9g0$1@dove.qut.edu.au>
Yo,
How to display and modify configuration file /etc/resolv.conf on the html
page?
Regards
------------------------------
Date: Thu, 15 Apr 1999 22:36:15 -0400
From: danbeck@scott.net (Daniel Beckham)
Subject: Re: flocking question - worried
Message-Id: <MPG.11806c2da2bc67b1989680@news.qual.net>
I was referring to this:
Graham Ashton <billynospam@mirror.bt.co.uk> wrote:
> if you want to unlock a file after you've finished writing to it, and
> you unlock it with flock() just before you close() it, do you have a
> potential race condition?
Just the idea that if I unlocked a file and then closed it, would there
be a chance that another process would write data to the file before I
could close it. I'm not totally sure how that might actually be bad,
it's just always felt uncomfortable that I might not have control before
I actually let go of the file.
Daniel
In article <3716857e@cs.colorado.edu>, tchrist@mox.perl.com says...
> [courtesy cc of this posting sent to cited author via email]
>
> In comp.lang.perl.misc, danbeck@scott.net (Daniel Beckham) writes:
> :ooh, can you do that? That race condition has always bothered me. I was
> :under the assumption that you had to unlock it first...
>
> What race condition?
>
> --tom
>
------------------------------
Date: Thu, 15 Apr 1999 22:17:06 -0400
From: "ToddNKay" <toddnkay@mediaone.net>
Subject: ftp for Windows NT?
Message-Id: <c7xR2.11246$tY1.7871@wbnws01.ne.mediaone.net>
Hello all,
Has anyone written a perl script for Windows NT that transfers a file from a
user's machine to the web server executing the script?
Any suggestions or samples that could point me in the right direction? I've
written a similar script for UNIX, but even something as simple as opening
the user's file for reading doesn't work on our NT server.
Thanks in advance,
-Todd
------------------------------
Date: Fri, 16 Apr 1999 01:44:54 GMT
From: sstarre@my-dejanews.com
Subject: How to make a var defined in more than one package?
Message-Id: <7f64mk$lp3$1@nnrp1.dejanews.com>
If you're going to lecture me about not doing my research project on this
topic PLEASE PLEASE just press NEXT and move on. Otherwise, a kind sentance
or two pointing me in the right direction would be most appreciated.
I want to use:
#main.pl
use strict;
require './mypackage.pl';
my varx = 'a';
# I'd like to see this var from mypackage!
#mypackage.pl
use strict;
#I wish I could use varx without saying my varx again!
I've studied Camel sections on bless, and tie, all of which seem to be
related to OO design. For example, tie is shown as
tie variable, classname, list
and offers this for assistance: "CLASSNAME is the name of a class
implementing objects of an appropriate type" [1] Can someone translate this
using words like "packages" and "variable names"? I'm not really big on OOD,
seems like a lot of fluff... The solution with the fewest characters and
lines is the best solution!
Cheers && Hugs,
S
[1]= Programming Perl , Wall et all, O'Rielly 1991 pp 232
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 15 Apr 1999 22:08:43 -0400
From: Uri Guttman <uri@home.sysarch.com>
Subject: Re: How to make a var defined in more than one package?
Message-Id: <x7lnftmi50.fsf@home.sysarch.com>
>>>>> "s" == sstarre <sstarre@my-dejanews.com> writes:
s> If you're going to lecture me about not doing my research project
s> on this topic PLEASE PLEASE just press NEXT and move on. Otherwise,
s> a kind sentance or two pointing me in the right direction would be
s> most appreciated.
sara,
it would help if you wouldn't preface your posts with stuff like
that. you have a real question here that deserves a real answer. there
are many worse questions posted here each day. just
ask it and ignore any flames sent your way.
s> #main.pl
s> use strict;
s> require './mypackage.pl';
s> my varx = 'a';
^^^^
should be $varx anyway.
s> # I'd like to see this var from mypackage!
but it is declared with my which means it is lexical in scope. only the
main file can see that $varx ever. if you want to share a var between
packages you can't declare it with my in one of the packages.
if you use strict and need globals, a use vars will solve the problem.
use vars qw( $varx ) ;
$varx is now global and declared so strict won't yell at you. in the
other package do this:
$main::varx = 'foo';
to access it like any other scalar.
s> I've studied Camel sections on bless, and tie, all of which seem to
s> be related to OO design. For example, tie is shown as
s> tie variable, classname, list
s> and offers this for assistance: "CLASSNAME is the name of a class
s> implementing objects of an appropriate type" [1] Can someone
s> translate this using words like "packages" and "variable names"?
s> I'm not really big on OOD, seems like a lot of fluff... The
s> solution with the fewest characters and lines is the best solution!
a CLASSNAME is just the name of the package in perl. there are many
words in OOD that mean the same or similar thing and you have to become
adept at translating between them. OOD is useful in the right place but
it is not the cureall that its adherents claim it to be. it isn't fluff
but it isn't gold either.
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Thu, 15 Apr 1999 21:49:04 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Need to print \n - Not do a carrage return
Message-Id: <1dqbnrn.z2ddb71u0zivqN@p54.tc2.state.ma.tiac.com>
Wyzelli <wyzelli@yahoo.com> wrote:
> Sorry for my ignorance but I am assuming that the print string we are
> outputting within double quotes needs to display the characters <br> rather
> than perform the function lessthan br greaterthan...
Within double quotes, < and > are literal characters, not comparison
operators.
"1\<2" eq "1<2"
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
perl -e '$_="\012534`!./4(%2`\cp%2,`(!#+%2j";s/./"\"\\c$&\""/gees;print'
------------------------------
Date: Thu, 15 Apr 1999 21:49:05 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: Perl Regex Q?
Message-Id: <1dqbnw8.1eklycg16sym11N@p54.tc2.state.ma.tiac.com>
Ronald J Kimball <rjk@linguist.dartmouth.edu> wrote:
> last if ($Line =~ m{\w:/});
So, now that everyone's done "correcting" my regex... ;)
Are we agreed that this solution really does work?
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"Remember, Perl doesn't write bad programs; programmers do."
------------------------------
Date: 16 Apr 1999 01:57:40 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Question about Connection
Message-Id: <7f65ek$l4$1@client2.news.psi.net>
James Hill (jrhill@writeme.com) wrote on MMLIII September MCMXCIII in
<URL:news:37165D17.59AC@writeme.com>:
`` How does one get perl to read an HTML file from another server than the
`` one it resides on? Thanks!!
There are many possibilties. You can for instance NFS mount the disk
of the remote server, and then access it using open () and <>.
Alternatively, you could use UUCP on the remote server to copy the file
to your server.
Other possibilities include FTP-by-mail and Gopher. No doubt someone
will suggest to use LWP, but that's so boring. Everyone could do that.
I don't recommend smoke signals though, unless you only want to read
the other file in daylight, and chances of fog are low.
Abigail
--
%0=map{reverse+chop,$_}ABC,ACB,BAC,BCA,CAB,CBA;$_=shift().AC;1while+s/(\d+)((.)
(.))/($0=$1-1)?"$0$3$0{$2}1$2$0$0{$2}$4":"$3 => $4\n"/xeg;print#Towers of Hanoi
------------------------------
Date: Thu, 15 Apr 1999 21:34:49 -0400
From: "Matthew O. Persico" <mpersico@erols.com>
Subject: Re: reference to an *existing* sub
Message-Id: <371693B9.E57F722D@erols.com>
"Dagfinn Reiersxl" wrote:
>
> The way to create a reference to an existing subroutine is
>
> $ref = \&A;
>
> See "Programming Perl", page 246.
You know, the reason so many people stumble over this is because the & is optional for function calls. Out of sight, out of mind. Which is why we need more Bricolage articles in TPJ. Way to go http>//www.tpj.com.
--
Matthew O. Persico
http://www.erols.com/mpersico
http://www.digistar.com/bzip2
------------------------------
Date: Thu, 15 Apr 1999 21:49:06 -0400
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: SimVirus Program beta99
Message-Id: <1dqbo6j.f46fucj11006N@p54.tc2.state.ma.tiac.com>
Patrick <dbs2pat@netvigator.com> wrote:
> M8V5D=7)E('9I<G5S,3L@9F]R=V%R9#L-"@T*<')O8V5D=7)E(&1E;&5T93L-
You have an error on line 17.
--
_ / ' _ / - aka -
( /)//)//)(//)/( Ronald J Kimball rjk@linguist.dartmouth.edu
/ http://www.tiac.net/users/chipmunk/
"It's funny 'cause it's true ... and vice versa."
------------------------------
Date: Thu, 15 Apr 1999 22:43:28 -0400
From: Eric Weiss <eweiss@winchendon.com>
Subject: Re: TPJ still shipping?
Message-Id: <3716A3D0.A208B2DA@winchendon.com>
I just bought TPJ 4/1 Spring 1999 on my neighborhood new kiosk for $4.95
Eric
------------------------------
Date: Fri, 16 Apr 1999 02:25:56 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Unix serial port access
Message-Id: <slrn7hd82g.ma4.njc@dmc.uucp>
I've been doing some playing with perl to access the serial port. I
can open the port but when I attempt to read the port I get
(0) 0x00. If I run it with a -w I get "Use of uninitialized value at
hcs.pl line 10 (it the $a, change it to 1 and I get (1) 0x00).
Here is the code:
use SerialPort; # Linux/Posix Emu of Win32::SerialPort
$PortName ="/dev/ttyD3";
$PortObj = new SerialPort ($PortName)
|| die "Can't open $PortName: $^E\n";
while(1) {
($a, $buf) = $PortObj->read(1);
printf("(%d) 0x%02x ", $a, $buf);
}
exit(0);
--
Linux Home Automation Neil Cherry ncherry@home.net
http://members.home.net/ncherry (Text only)
http://meltingpot.fortunecity.com/lightsey/52 (Graphics GB)
http://www2.cybercities.com/~linuxha/ (Graphics US)
------------------------------
Date: Thu, 15 Apr 1999 21:30:49 -0400
From: splice@videotron.ca ([sp-])
Subject: Using spaces in globbing?
Message-Id: <MPG.11805cd6427ea37a9896a1@news.videotron.ca>
Hey everyone.
Been toying around with perl on win98 for a bit, there's one thing I
still can't figure out something. If I want to glob files under a
directory that has spaces in it, what do I do? Globbing "d:\\Long Dir
Name\\*" returns nothing, "d:\\Long*Dir*Name\\*" doesn't work either. I
even tried escaping the spaces ("d:\\Long\x20Dir\x20Name\\*"), but no
luck.
Any insight on how to handle files with spaces? I can't find anything in
the camel book, perl in a nutshell or learning perl.
Reply here or by email at splice(at)videotron(dot)ca
Thanks
[sp-]
------------------------------
Date: Thu, 15 Apr 1999 21:47:25 -0400
From: splice@videotron.ca ([sp-])
Subject: Re: Using spaces in globbing?
Message-Id: <MPG.118060bbf363a1e99896a2@news.videotron.ca>
In article <MPG.11805cd6427ea37a9896a1@news.videotron.ca>,
splice@videotron.ca says...
> Hey everyone.
>
> Been toying around with perl on win98 for a bit, there's one thing I
> still can't figure out something. If I want to glob files under a
> directory that has spaces in it, what do I do? Globbing "d:\\Long Dir
> Name\\*" returns nothing, "d:\\Long*Dir*Name\\*" doesn't work either. I
> even tried escaping the spaces ("d:\\Long\x20Dir\x20Name\\*"), but no
> luck.
>
> Any insight on how to handle files with spaces? I can't find anything in
> the camel book, perl in a nutshell or learning perl.
>
> Reply here or by email at splice(at)videotron(dot)ca
Small correction... I just discovered in the camel book a small note
about not being able to glob with spaces at all. So I guess I rephrase my
problem as:
"How can I get a list of files in a directory which contains spaces in
its name, under win32?"
Thanks again
[sp-]
------------------------------
Date: Thu, 15 Apr 1999 21:52:20 -0400
From: splice@videotron.ca ([sp-])
Subject: Re: Using spaces in globbing?
Message-Id: <MPG.118061dee7d082a39896a3@news.videotron.ca>
Please disregard previous messages. I found a way to do it (using win95
'short filenames'), so I'll be ok for now.
If you do find any other way (expecially an elegant one), please inform
me :)
regards,
[sp-]
------------------------------
Date: 16 Apr 1999 01:57:38 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Using spaces in globbing?
Message-Id: <slrn7hd68i.f5f.sholden@pgrad.cs.usyd.edu.au>
On Thu, 15 Apr 1999 21:47:25 -0400, [sp-] <splice@videotron.ca> wrote:
>In article <MPG.11805cd6427ea37a9896a1@news.videotron.ca>,
>splice@videotron.ca says...
>>
>> Reply here or by email at splice(at)videotron(dot)ca
What's the point of munging a the address in the body and leaving it
correct in the headers... Very strange...
>
>
>Small correction... I just discovered in the camel book a small note
>about not being able to glob with spaces at all. So I guess I rephrase my
>problem as:
>
>"How can I get a list of files in a directory which contains spaces in
>its name, under win32?"
Use opendir, readdir and grep would be my first guess...
--
Sam
Just don't create a file called -rf. :-)
--Larry Wall
------------------------------
Date: Fri, 16 Apr 1999 02:00:08 GMT
From: njc@dmc.uucp (Neil Cherry)
Subject: Re: Writing to syslog on Linux
Message-Id: <slrn7hd6i5.ma4.njc@dmc.uucp>
On Thu, 15 Apr 1999 14:42:00 -0400, Thriveni Bhakta wrote:
> I have not been abel to write to syslog using Perl on Linux.
>The versions that I've tried so far
>1. Red Hat Linux 5.2
>2. Linux Mandrake 5.3
I haven't been able to get it to work either, if you find out how
please post here so the others who are having the same problem can get
the fix.
--
Linux Home Automation Neil Cherry ncherry@home.net
http://members.home.net/ncherry (Text only)
http://meltingpot.fortunecity.com/lightsey/52 (Graphics GB)
http://www2.cybercities.com/~linuxha/ (Graphics US)
------------------------------
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 5395
**************************************