[15478] in Perl-Users-Digest
Perl-Users Digest, Issue: 2888 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 28 06:10:30 2000
Date: Fri, 28 Apr 2000 03:10:22 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <956916622-v9-i2888@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Fri, 28 Apr 2000 Volume: 9 Number: 2888
Today's topics:
perl and CGI on Win32 <sunvale@hotmail.com>
Re: perl and CGI on Win32 anursalim@my-deja.com
Re: perl and CGI on Win32 <peter_gonnissenNOpeSPAM@euroseek.com.invalid>
Perl can't find specific XML::DOM package bbrelin@my-deja.com
Re: perl in NT .BAT files Question <skx@tardis.ed.ac.uk>
Re: Posting MIME articles from scripts <anthony@alphageo.com>
Re: Posting MIME articles from scripts <gellyfish@gellyfish.com>
Re: Posting MIME articles from scripts (Villy Kruse)
PPM bricht beim installieren ab <john.feiner@gmx.at>
Re: Printing integers from array <aperrin@davis.DEMOG.Berkeley.EDU>
Re: prob installing DBI / DBD <gellyfish@gellyfish.com>
Remove all empty spaces at the end of a string <ppi@searchy.net>
Re: Remove all empty spaces at the end of a string <rhomberg@ife.ee.ethz.ch>
Re: Security: why no '.' in path? <gellyfish@gellyfish.com>
sigrand.pl generated sig file not used by pine... (PSG)
SQL & win32::ODBC <stephane@siw.ch>
Re: SQL & win32::ODBC anursalim@my-deja.com
Re: SQL & win32::ODBC <stephane@siw.ch>
Re: system commands failing on Windows NT <gellyfish@gellyfish.com>
Re: Testing for require/use vs. execution? nobull@mail.com
using unix grep in a perl prog <borg@aborg.com>
Re: using unix grep in a perl prog (David Efflandt)
Re: using unix grep in a perl prog (Bart Lateur)
Re: Weird locale error opening file <gellyfish@gellyfish.com>
where can i find CGI::Pretty for installation <john.feiner@gmx.at>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 28 Apr 2000 03:45:38 -0400
From: "Youngsoo Kim" <sunvale@hotmail.com>
Subject: perl and CGI on Win32
Message-Id: <8ebft2$15q$1@charm.magnus.acs.ohio-state.edu>
Hey...
I just start to write perl script. I got a problem to execute
scripts on my machine.
I have windows 98, and apache server installed.
Perl is installed on directory "c:\perl\bin\"
When I try to run perl script, I figure out I don't know how to start.
I don't know what I should write at the first line. I know in UNIX
perl script might start with #!/usr/bin/perl <- where perl is installed.
But I don't know how to start on windows machine.
Please let me know.
Thanks.
------------------------------
Date: Fri, 28 Apr 2000 08:23:41 GMT
From: anursalim@my-deja.com
Subject: Re: perl and CGI on Win32
Message-Id: <8ebhq3$6nk$1@nnrp1.deja.com>
In article <8ebft2$15q$1@charm.magnus.acs.ohio-state.edu>,
"Youngsoo Kim" <sunvale@hotmail.com> wrote:
> Hey...
>
> I just start to write perl script. I got a problem to execute
> scripts on my machine.
>
> I have windows 98, and apache server installed.
> Perl is installed on directory "c:\perl\bin\"
> When I try to run perl script, I figure out I don't know how to start.
> I don't know what I should write at the first line. I know in UNIX
> perl script might start with #!/usr/bin/perl <- where perl is
installed.
>
> But I don't know how to start on windows machine.
> Please let me know.
>
> Thanks.
>
Look at www.perl.com or the ActiveState website for help on WIN32 Perl
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 28 Apr 2000 02:08:42 -0700
From: Peter <peter_gonnissenNOpeSPAM@euroseek.com.invalid>
Subject: Re: perl and CGI on Win32
Message-Id: <01bff17c.79bdf522@usw-ex0102-084.remarq.com>
In article <8ebft2$15q$1@charm.magnus.acs.ohio-state.edu>,
"Youngsoo Kim" <sunvale@hotmail.com> wrote:
>Hey...
>
>I just start to write perl script. I got a problem to execute
>scripts on my machine.
>
>I have windows 98, and apache server installed.
>Perl is installed on directory "c:\perl\bin\"
>When I try to run perl script, I figure out I don't know how to
start.
>I don't know what I should write at the first line. I know in
UNIX
>perl script might start with #!/usr/bin/perl <- where perl is
installed.
>
>But I don't know how to start on windows machine.
>Please let me know.
>
>Thanks.
>
>
>
>
Hi Youngsoo,
if your perl is located in c:\perl\bin\, the first line of the
cgi should be :
#!C:\perl\bin\perl
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!
------------------------------
Date: Fri, 28 Apr 2000 09:24:19 GMT
From: bbrelin@my-deja.com
Subject: Perl can't find specific XML::DOM package
Message-Id: <8eblbq$aa8$1@nnrp1.deja.com>
Hello,
I'm creating a perl program using perl5.6.0 on Mandrake Linux 7.0.
The program does the following:
$doctype = $Document->getDoctype;
.
.
.
$doctype = $tmp->createDocumentType("CIM","cim.dtd");
Document is an instance of a parsed XML file created via the XML::DOM
module.
This is the error I get...
Undefined subroutine &XML::DOM::DocumentType called at
/usr/lib/perl5/site_perl/5.6.0/XML/DOM.pm line 3475, <GEN2> line 18.
Yet in looking at the DOM.pm file, there is a package called
DocumentType.
Anybody have any ideas?
Thanks,
Braun Brelin
bbrelin@my-deja.com
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 28 Apr 2000 10:46:36 +0100
From: Steve Kemp <skx@tardis.ed.ac.uk>
Subject: Re: perl in NT .BAT files Question
Message-Id: <Pine.GSO.4.10.10004281041470.13822-100000@tardis.tardis.ed.ac.uk>
On Fri, 28 Apr 2000, David Ness wrote:
> I believe the code relies on a pun which lets the first line of the file
> mean different things to the windows .BAT processor and to perl. Windows
> can execute the beginning of the file and then skip the perl content while
> the perl processor skips the .BAT (Windows) part and sees only the perl content.
> Thus I guess it allows a sort of logical equivalent of Unix's `#!', in that
> it makes an `executable' which can conveniently mix Windows work with
> perl.
That is actually one of the funkiest pieces of code that I've seen
for a long time.
> The fragment looks like this:
> @REM='<$MyName Demonstration File - Ver DN-1A(2) - [BKX-LUSZ]$>
> @Echo Off
> perl %PerlFlag% %BIN%\MyName.BAT %*
I'd change that line, so that you don't have to specify the name
of the batch file each time:
perl %PerlFlag% %0 %*
> GoTo EndPerl
> @REM=';
> ...
> #Body of perl program appears here
> ...
To get rid of the warning just put something here:
@REM='';
> __END__
> :EndPerl
>
> This has worked fine for a long time, but now that I am processing my
> files with a `-w' I get a `used only once' on `@REM'. I can't use the
> my() structure to avoid this because, while it works well other places,
> here the `@REM' has to be the first thing encountered. I find I can
> avoid the diagnostic by including a `@REM=@REM;' as the first line
> of executable perl code, but I don't know if that is good practice or if
> there is some better way.
Ahh, thats what I said really, I cannot think of another way to do
this, except to assign a dummy value to the @REM in your perl.
> Alternatively, is there some better way to handle this whole problem in
> Windows/perl?
The way that I normally do things is to have two files:
a.pl
a.bat
With a.bat containing :
@echo off
perl %~d0%~p0a.pl %0
Your solution is neater as it only has one file, but mine's probably
simpler to understand.
Steve
---
http://GNUSoftware.com/ -- GNU Software for Windows Users
http://steve.org.uk/ -- All about Steve
------------------------------
Date: Fri, 28 Apr 2000 00:39:48 -0700
From: Anthony Argyriou <anthony@alphageo.com>
Subject: Re: Posting MIME articles from scripts
Message-Id: <2rfigsc0vkofoi58a1nnmfppl6p3ns56la@4ax.com>
On 27 Apr 2000 17:00:44 GMT, jcuesta@tid.es (CUESTA CUESTA) wrote:
> I only want to write an article using several formats at a same time. I don't
>know what news reader use most of you. I'm using an old version of tin (1.2)
>and it supports mime. I've posted articles with netscape messenger and tin
>detects that it has mime format and show me the text part. Thats all I want to
>do, post an article with two parts: text and html.
I'd much rather have heard you were proposing to post binaries to a
*.binaries.* group than that you want to post HTML to usenet. There _is_ a
place in usenet for MIME-encoded files, but the place in usenet for HTML was
best described by Dante.
If you're interested in legitimate uses of MIME in usenet, like posting
binaries, I'll post the location to a perl autoposter program.
Anthony Argyriou
Unix _is_ user-friendly. It's just selective about its friends.
------------------------------
Date: 27 Apr 2000 22:18:14 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Posting MIME articles from scripts
Message-Id: <8eaaqm$33u$1@orpheus.gellyfish.com>
On 27 Apr 2000 06:54:05 GMT CUESTA CUESTA wrote:
>>> I want to post an article with MIME format (containing the article in text
>>> mode and in HTML format from a perl script. I've tryed with News::NNTPClient
>>> and Net::NNTP but the don't seem to allow this.
>>
>>I hope that's true. MIME isn't for usenet. At least, it didn't used to
>>be. Text only, please.
>>
>
> But most news readers support reading and posting mime articles. SMTP didn't
> used to be MIME till it was.
>
But most readers of news dont want to see it. There is no point to it.
/J\
--
Marge! Look at all this great stuff I found at the Marina. It was just
sitting in some guy's boat!
--
fortune oscar homer
------------------------------
Date: 28 Apr 2000 08:14:04 GMT
From: vek@pharmnl.ohout.pharmapartners.nl (Villy Kruse)
Subject: Re: Posting MIME articles from scripts
Message-Id: <slrn8gii2b.cse.vek@pharmnl.ohout.pharmapartners.nl>
On 27 Apr 2000 17:00:44 GMT, CUESTA CUESTA <jcuesta@tid.es> wrote:
> I only want to write an article using several formats at a same time. I don't
>know what news reader use most of you. I'm using an old version of tin (1.2)
>and it supports mime. I've posted articles with netscape messenger and tin
>detects that it has mime format and show me the text part. Thats all I want to
>do, post an article with two parts: text and html.
>
Which means that your html formatting gets lost when displayd by some
mail readers, which means that you can't use any formatting to convay
any meaning, which means that the HTML part is a waist of effort,
which means that text/plain would be sufficient to convay what you
have to say.
--
Villy
------------------------------
Date: Fri, 28 Apr 2000 10:23:03 +0200
From: Johannes Feiner <john.feiner@gmx.at>
Subject: PPM bricht beim installieren ab
Message-Id: <39094A67.DC181055@gmx.at>
searching for help on installation of CGI-perl module with PPM:
PPM (vers. 1.1.2) with WinNT4 stops whten installing the CGI module
"PPM> install CGI"
Install package 'CGI?' (y/N): y
Retrieving package 'CGI'...
error message displayed:
mismatched tag at line9, column2, byte 612 at
c:/Programme/perl/site/lib/XML/Parser.pm line 183
thanx
john
ps.: installation of other modules worked well, just two hours ago i did
an verify /upgrade for all modules without any trouble...
------------------------------
Date: 27 Apr 2000 21:44:34 -0700
From: Andrew Perrin - Demography <aperrin@davis.DEMOG.Berkeley.EDU>
Subject: Re: Printing integers from array
Message-Id: <u5kya5y6dhp.fsf@davis.DEMOG.Berkeley.EDU>
"Gordon Sadler" <gbsadler1@sprynet.com> writes:
> Thank you very much, had no idea it was that particular.
> All docs I read said %xx would be hash so I was confused by output.
>
> Again thanks for quick replies.
No problem. Yes, perl is very particular - and therefore very
powerful. Every punctuation mark means something (well, almost), and
each is different in important ways. You'll find the documentation
for how {} creates a hash in perlref, which deals with references.
But you should certainly never assume that {} could be substituted for
() with impunity.
Cheers,
Andy
--
---------------------------------------------------------------------
Andrew J. Perrin - aperrin@demog.berkeley.edu - NT/Unix Admin/Support
Department of Demography - University of California at Berkeley
2232 Piedmont Avenue #2120 - Berkeley, California, 94720-2120 USA
http://demog.berkeley.edu/~aperrin --------------------------SEIU1199
------------------------------
Date: 28 Apr 2000 07:04:45 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: prob installing DBI / DBD
Message-Id: <8eb9lt$sgm$1@orpheus.gellyfish.com>
In comp.lang.perl.misc Digiwyrm <digiwyrm@linuxnet.net> wrote:
> I am using the automatic CPAN process to install the informix DBD driver
> & DBI. I get the following error message. Please advise how ot fix.
>
> CPAN.pm: Going to build JOHNL/DBD-Informix-1.00.PC1.tar.gz
>
> Can't locate loadable object for module DBI in @INC (@INC contains:
> /usr/lib/per
> l5/5.00503/i386-linux /usr/lib/perl5/5.00503
> /usr/lib/perl5/site_perl/5.005/i386
> -linux /usr/lib/perl5/site_perl/5.005 .) at
> /usr/lib/perl5/5.00503/DBI.pm line 1
> 58
> BEGIN failed--compilation aborted at /usr/lib/perl5/5.00503/DBI.pm line
> 158.
> BEGIN failed--compilation aborted at Makefile.PL line 23.
> Running make test
> Make had some problems, maybe interrupted? Won't test
> Running make install
> Make had some problems, maybe interrupted? Won't install
You havent previously properly installed DBI If you have a good network
connection you should try :
perl -MCPAN -e 'install Bundle::DBD::Informix'
from some command line - being careful to ensure you have a working Informix
environment before you kick it off.
/J\
--
We'll die together, like a father and son should.
--
fortune oscar homer
------------------------------
Date: Fri, 28 Apr 2000 10:45:27 +0200
From: Penpal International <ppi@searchy.net>
Subject: Remove all empty spaces at the end of a string
Message-Id: <39094FA7.B663BF65@searchy.net>
How can I remove all spaces at the the end of string?
--
Penpal International
http://ppi.searchy.net/
ppi@searchy.net
------------------------------
Date: Fri, 28 Apr 2000 11:13:38 +0200
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: Remove all empty spaces at the end of a string
Message-Id: <39095642.C1A3BD30@ife.ee.ethz.ch>
Penpal International wrote:
>
> How can I remove all spaces at the the end of string?
Strange. This question comes up about every two weeks in this ng. One
might think that this is often enough to warrant a faq entry.
probably in perlfaq4?
- Alex
------------------------------
Date: 28 Apr 2000 07:43:04 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Security: why no '.' in path?
Message-Id: <8ebbto$3v8$1@orpheus.gellyfish.com>
On Wed, 26 Apr 2000 13:38:54 -0700 Larry Rosler wrote:
> In article <Pine.GHP.4.21.0004262106520.10315-100000@hpplus01.cern.ch>
> on Wed, 26 Apr 2000 21:15:27 +0200, Alan J. Flavell
> <flavell@mail.cern.ch> says...
>
> ...
>
>> However, the Internet Draft at
>> http://www.golux.com/~coar/cgi/draft-coar-cgi-v11-03-clean.html
>>
>> 8.2 Recommendations for Servers
>>
>> Where applicable, servers SHOULD set the current working directory to
>> the directory in which the script is located before invoking it.
>>
>> So nobody could say your idea wasn't at least plausible; but it would
>> seem a mistake to rely on it.
>
> So that recommendation is useless, and absurd from the Standards point
> of view. Why state what SHOULD be done 'where applicable'? No one can
> rely on it, so who cares?
>
> s/.*SHOULD/A server SHALL/
>
True but there are servers where the 'directory in which the script is
located' is not a meaningful concept and I guess the looseness came from
trying to deal with them.
/J\
--
Lisa, if the Bible has taught us nothing else, and it hasn't, it's that
girls should stick to girls sports, such as hot oil wrestling and foxy
boxing and such and such.
--
fortune oscar homer
------------------------------
Date: 28 Apr 2000 05:24:41 GMT
From: admin2@palo2.pacific.net.in (PSG)
Subject: sigrand.pl generated sig file not used by pine...
Message-Id: <8eb7ap$gaf$1@newton.pacific.net.sg>
hello,
Well, I have started the sigrand.pl prog which runs as daemon and provides
random sigs for tin posted mails, or normal mails etc. It works fine when
I mail from tin, as you can see for this mail :) But pine doesn't somehow
read the .signature file. I checked the script, it creates the .signature
as 'named pipe' file, which when cat'ed gives every time gives a diff sig.
But the file size is 0 as a special file (well sort of), maybe this causes
a problem for pine.
Another strage thing is that, when I go to sig file modfn feature of pine,
It does show the random sig file, and if saved replaces the pipe file with
a normal file. However if not saved, 'compose' doesn't bring up the editor
with .sig file included.
Any way to solve this?
--
/psg (se-mumbai)
"Never explain. Your friends do not need it and your enemies will
not believe you anyway. -Elbert Hubbard
------------------------------
Date: Fri, 28 Apr 2000 07:24:25 GMT
From: "Chello" <stephane@siw.ch>
Subject: SQL & win32::ODBC
Message-Id: <J0bO4.54570$6X3.1319758@news.chello.at>
Hi,
I'm using win32::ODBC to retrieve informations from a database. Now I'm
looking to put some informations in my database, I read the doc but I didn't
find any mention about it. Can I use that module to do it? If yes, does
someone can help me? If not, what's the module do I have to use or install?
I currently use IIS4 & PWS and MS SQL 6 & Access97.
Thanks in advance
Stéphane
------------------------------
Date: Fri, 28 Apr 2000 08:22:40 GMT
From: anursalim@my-deja.com
Subject: Re: SQL & win32::ODBC
Message-Id: <8ebho7$6gb$1@nnrp1.deja.com>
In article <J0bO4.54570$6X3.1319758@news.chello.at>,
"Chello" <stephane@siw.ch> wrote:
> Hi,
>
> I'm using win32::ODBC to retrieve informations from a database. Now
I'm
> looking to put some informations in my database, I read the doc but I
didn't
> find any mention about it. Can I use that module to do it? If yes,
does
> someone can help me? If not, what's the module do I have to use or
install?
>
> I currently use IIS4 & PWS and MS SQL 6 & Access97.
>
> Thanks in advance
>
> Stéphane
Read the SQL documentation.
To insert into database (commonly) : "INSERT INTO tablename VALUES
('a',3,'etc')";
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Fri, 28 Apr 2000 09:07:39 GMT
From: "Chello" <stephane@siw.ch>
Subject: Re: SQL & win32::ODBC
Message-Id: <vxcO4.54848$6X3.1324653@news.chello.at>
Hi,
Thanks for your answer, but my problem insn't SQL... My problem is the
command in perl, do you have an example?
<anursalim@my-deja.com> wrote in message news:8ebho7$6gb$1@nnrp1.deja.com...
> In article <J0bO4.54570$6X3.1319758@news.chello.at>,
> "Chello" <stephane@siw.ch> wrote:
> > Hi,
> >
> > I'm using win32::ODBC to retrieve informations from a database. Now
> I'm
> > looking to put some informations in my database, I read the doc but I
> didn't
> > find any mention about it. Can I use that module to do it? If yes,
> does
> > someone can help me? If not, what's the module do I have to use or
> install?
> >
> > I currently use IIS4 & PWS and MS SQL 6 & Access97.
> >
> > Thanks in advance
> >
> > Stéphane
>
> Read the SQL documentation.
> To insert into database (commonly) : "INSERT INTO tablename VALUES
> ('a',3,'etc')";
>
> >
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: 28 Apr 2000 07:54:38 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: system commands failing on Windows NT
Message-Id: <8ebcje$63o$1@orpheus.gellyfish.com>
On Thu, 27 Apr 2000 09:23:19 -0400 David Stiff wrote:
> "David Stiff" <dstiff@delanotech.com> wrote in message
> news:u4HN4.1171$pb6.1241@client...
>> I have installed Active Perl 516 but "system" commands are failing. Do I
>> need to install an older build of Perl. (I had this working at a previous
>> job).
>
> Thanks. I installed an older build of Perl and now the system commands are
> working.
>
Yes but that is not really the appropriate solution. The version you
had already would be considered 'older' by any objective criteria when the
last of the 500 series builds was 522. You could at least try to install
a later version to see if what you are experiencing is not a bug in the
particular build you have.
Show us your code and explain to us what you mean by 'failing'.
/J\
--
A subject that is beautiful in itself gives no suggestion to the
artist. It lacks imperfection.
--
fortune oscar homer
------------------------------
Date: 28 Apr 2000 10:10:28 +0100
From: nobull@mail.com
Subject: Re: Testing for require/use vs. execution?
Message-Id: <u9ln1y1th7.fsf@wcl-l.bham.ac.uk>
"Brian Landers" <brian@bluecoat93.org> writes:
> I'm looking for a way to determine (in a standard manner) if a file of Perl
> is being executed from the command-line vs. being pulled in as a require or
> use. The functionality I want is like the
>
> if __name__ == "__main__": go()
>
> syntax in Python - being able to insert testing or other code into a module
> or library that is executed only if the file is run from the command line.
go() unless caller;
Obviously you have to do this outside of any subroutines or provide
an approriate argument to caller() to compensate. Probably you should
put at the top of the script:
my $just_testing = ! caller;
--
\\ ( )
. _\\__[oo
.__/ \\ /\@
. l___\\
# ll l\\
###LL LL\\
------------------------------
Date: Fri, 28 Apr 2000 06:14:51 GMT
From: borg <borg@aborg.com>
Subject: using unix grep in a perl prog
Message-Id: <39092C79.82A5C9AC@aborg.com>
Is it possible to get the line breaks when using UNIX grep in a perl
program? I have this in a program but I cannot seem to get the line
breaks when returned through a CGI:
$result=`grep -l $variable_name *.txt `;
Is there a way I can use this and return to a variable or an array so
that there are line breaks after each positive match?
thanks,
Peter
------------------------------
Date: 28 Apr 2000 08:17:58 GMT
From: efflandt@xnet.com (David Efflandt)
Subject: Re: using unix grep in a perl prog
Message-Id: <slrn8gii84.nq8.efflandt@efflandt.xnet.com>
On Fri, 28 Apr 2000 06:14:51 GMT, borg <borg@aborg.com> wrote:
>Is it possible to get the line breaks when using UNIX grep in a perl
>program? I have this in a program but I cannot seem to get the line
>breaks when returned through a CGI:
>
>$result=`grep -l $variable_name *.txt `;
>
>Is there a way I can use this and return to a variable or an array so
>that there are line breaks after each positive match?
This has nothing to do with Perl. In html any whitespace (including \n)
is interpretted as a single space. Try:
$result = "<pre>$result</pre>";
Or perhaps $result =~ s/\n/<br>\n/g;
--
David Efflandt efflandt@xnet.com http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://hammer.prohosting.com/~cgi-wiz/ http://cgi-help.virtualave.net/
------------------------------
Date: Fri, 28 Apr 2000 09:29:04 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: using unix grep in a perl prog
Message-Id: <390a58ca.4694989@news.skynet.be>
borg wrote:
>$result=`grep -l $variable_name *.txt `;
>
>Is there a way I can use this and return to a variable or an array so
>that there are line breaks after each positive match?
Er... All you can do is split the lines that you get back from the
external command. I hope that's what you want. Assign the result of
`...` to an array instead of a scalar, and you're set.
From the entry for `STRING` in perlop:
In list context, returns a list of
lines (however you've defined lines with $/ or
$INPUT_RECORD_SEPARATOR).
--
Bart.
------------------------------
Date: 27 Apr 2000 22:16:57 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Weird locale error opening file
Message-Id: <8eaao9$2s9$1@orpheus.gellyfish.com>
On Thu, 27 Apr 2000 15:01:20 +0200 Frank van Wensveen wrote:
>
> So the question remains: WHY is the opening of locale files related to
> the tied file being shared?
It hasnt anything to do with it. If you dont understand what you are
seeing from strace just ignore.
/J\
--
One should never listen. To listen is a sign of indifference to one's
hearers.
--
fortune oscar homer
------------------------------
Date: Fri, 28 Apr 2000 10:27:29 +0200
From: Johannes Feiner <john.feiner@gmx.at>
Subject: where can i find CGI::Pretty for installation
Message-Id: <39094B71.46DD7C75@gmx.at>
i am searching for CGI::Pretty module for installation
(why can't it be found at:
http://www.ActiveState.com/ppmpackages/5.005/zips/ for example)
platform WinNT4 perl version 5.003_03 (ppm version 1.1.2)
thanx john
ps.:
ppm verify /upgrade did not install that (sub-) module of CGI
(just CGI::Apache, Carp,CGI,Cookie,Fast,Push,Switch,XMLForm are
available for me now)
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V9 Issue 2888
**************************************