[7628] in Perl-Users-Digest
Perl-Users Digest, Issue: 1254 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Oct 31 12:15:05 1997
Date: Fri, 31 Oct 97 09:00:35 -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 Fri, 31 Oct 1997 Volume: 8 Number: 1254
Today's topics:
Re: 'A$#%i$#*>*:071d*>CQ (Keith Willis)
Re: +>> should work, why doesn't it. :-( (Erik Y. Adams)
Re: [repost] File handle attached to a function? <rootbeer@teleport.com>
Re: [repost] File handle attached to a function? (Jason Gloudon)
Accessing perl libraries <c.forde@qub.ac.uk>
ADO->PERL->SQL <NoSPAMa-jackg@microsoft.com>
Re: Agrep for perl ? (Honza Pazdziora)
calendar <afan@elnet.msk.ru>
Re: calendar (Toutatis)
Re: calendar (brian d foy)
Re: Editing Passwords <jgrubb@gte.net>
Re: fetch url data <webadmin@prestel.net>
Graphical Perl Debugger gmpieri@carroll.com
Re: How do I do multiple require's in different package (Chris Sherman)
Re: How do I do multiple require's in different package (Andrew M. Langmead)
Re: how do I save an array into a file? (Honza Pazdziora)
Re: if (0<= $hun < 250) doesn't compile <baileya@cs.man.ac.uk>
Re: Internal Server Error <jgrubb@gte.net>
Re: log with base 10? <rootbeer@teleport.com>
multi-line text replacement (Bill Moseley)
New version when? (Casper K. Clausen)
no enough memory with perl for win32 <Christel.Veltrup@gmd.de>
Re: no enough memory with perl for win32 (Mike Stok)
Re: Perl for OS/2 (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Perl2Exe with Tk? (Paul Murray)
Problems compiling for Solaris 2.4 (Casper K. Clausen)
Re: Stating File Systems in Perl <rootbeer@teleport.com>
Re: stdin/stdout pipes to a program (Jason Gloudon)
Re: Use DB_FILE? <Harald.Joerg@mch.sni.de>
Using the split command ( Dan Bissetsmith)
Re: Using the split command (Honza Pazdziora)
Re: Using the split command (Toutatis)
Re: Using the split command <nnyxcu@ny.ubs.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 31 Oct 1997 09:38:24 GMT
From: keith_willis.junk@non-hp-unitedkingdom-om1.om.hp.com (Keith Willis)
Subject: Re: 'A$#%i$#*>*:071d*>CQ
Message-Id: <3463a6ae.342922987@elf.bri.hp.com>
On Mon, 27 Oct 1997 16:08:38 +0800, jf5102 <jf5102@ms18.hinet.net>
wrote:
> %;$e:K&[$K$Q$;&~$K$k$T$Q$@$iAp&X1_3x2D"6*)!y071d$H!z=g
>
> $p$@BI 5u$@BI 7S<K0m.<
>
That's easy for _you_ to say...
8-)
----------------------------------------------------------------------
The above message reflects my own views, not those of Hewlett Packard.
When emailing me, please note that there is no '.junk' in my address.
------------------------------
Date: Fri, 31 Oct 1997 07:07:12 -0800
From: erik@earthlink.net (Erik Y. Adams)
Subject: Re: +>> should work, why doesn't it. :-(
Message-Id: <erik-3110970707120001@pool030-max3.pasadena.ca.us.dialup.earthlink.net>
In article <345916AB.32063B01@lp-llc.com>, raven@lp-llc.com wrote:
>Trying to access a list and append (add to) it.
>
>When I access it from my SHELL, it works great.
>
>When I access it from the web "can't open list to append Permission
>denied"
>
>Isn't "+>>" supposed to give anyone permission? or am I just reading the
>blue camel wrong
>
>Here's how the code looks:
>
>open (LIST, "+>>$LIST")|| print "Content-type: text\/html\n\n can't open
>list to append $!";
>
> print LIST "$you";
>
>close(LIST);
Do you do much Unix programming?
+>> tells Perl you want to append to the file, but doesn't do anything
about permissions. Just because you, the user, have read and write access
to the doesn't mean the user your web server runs as (often "nobody").
Try reading the man pages on chmod.
Erik
--
----------------------------------------------------------
Erik Y. Adams erik@earthlink.net
Information Systems Consultant 626/795-2701
Internet and Intranet Specialist
------------------------------
Date: Fri, 31 Oct 1997 07:58:00 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Lloyd Zusman <ljz@asfast.com>
Subject: Re: [repost] File handle attached to a function?
Message-Id: <Pine.GSO.3.96.971031075647.1216J-100000@usertest.teleport.com>
On 31 Oct 1997, Lloyd Zusman wrote:
> Given some of the newer file-handle functionality in Perl, is it
> possible to somehow attach a file handle to a function,
You can do something like that with a tied filehandle in 5.004. It's new
functionality, though, and you're likely to discover the bugs when you use
it. :-)
--
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: 31 Oct 1997 16:46:28 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: Re: [repost] File handle attached to a function?
Message-Id: <63d214$13k$1@daily.bbnplanet.com>
Lloyd Zusman (ljz@asfast.com) wrote:
: [Note: This is a repost of an article I attempted to post a few days
: ago. Apparently the posting failed, as I have no record of it.
: This is a paraphrase of what I originally wrote. ]
: Given some of the newer file-handle functionality in Perl, is it
: possible to somehow attach a file handle to a function, as follows? ...
: sub myfunc {
: my $line = shift;
: # do something or other to '$line'
: }
:
: ### ??? somehow attach file handle 'F' to 'myfunc' ???
: print F "abc\n";
: print F "def\n";
: This would cause 'myfunc' to be called once with "abc\n" as its
: argument, and again with "def\n" as its argument.
With object oriented code, you can "attach a file handle to" methods.
By overriding the print method of the IO::File class in your own subclass,
you could then do whatever manipulation you wanted in your print method.
You could also do this by eval'ing a subroutine like this:
sub myprint(@) {
my(@printlist) = @_;
foreach(@printlist){
# Munge $_
print T $_;
}
}
CODE
&myprint ('try');
However you can't duplicate the exact look of a regular print this way.
Jason Gloudon
------------------------------
Date: Fri, 31 Oct 1997 11:50:42 +0000
From: Colin Forde <c.forde@qub.ac.uk>
Subject: Accessing perl libraries
Message-Id: <3459C612.5A73@qub.ac.uk>
Hi all, I tried to build some inn usenet software to include perl
filtering and it complains about some undefined symbols. Could someone
tell me which library these things are found in so that i can perhaps
trace back to what ive not got right.
I have installed perl5.00403 recently.
## 17. Perl Configuration
## Do you want Perl support? Pick DO or DONT
#### =()<PERL_SUPPORT @<PERL_SUPPORT>@>()=
PERL_SUPPORT DO
## How do you get the PERL libraries? Probably -lperl -lm, blank if no
PERL
#### =()<PERL_LIB @<PERL_LIB>@>()=
PERL_LIB -L/usr/local/lib/perl5/sun4-solaris/5.00403/CORE -lperl
-lm
## Core directory (includes, libs). See perlembed(1)
#### =()<PERL_INC @<PERL_INC>@()=
PERL_INC -I/usr/local/lib/perl5/sun4-solaris/5.00403/CORE
## Perl Filter Files
#### =()<_PATH_PERL_STARTUP_INND @<_PATH_PERL_STARTUP_INND>@>()=
_PATH_PERL_STARTUP_INND /usr/news/bin/control/startup_innd.pl
#### =()<_PATH_PERL_FILTER_INND @<_PATH_PERL_FILTER_INND>@>()=
_PATH_PERL_FILTER_INND /usr/news/bin/control/filter_innd.pl
#### =()<_PATH_PERL_FILTER_NNRPD @<_PATH_PERL_FILTER_NNRPD>@>()=
_PATH_PERL_FILTER_NNRPD /usr/news/bin/control/filter_nnrpd.pl
Compiling inn
gcc -g -o innd art.o cc.o chan.o his.o icd.o innd.o lc.o nc.o
newsfeeds.o ng.o p
roc.o rc.o site.o tcl.o perl.o ../libinn.a
-L/usr/local/lib/perl5/sun4-solaris/5.00403/CORE -lperl -lm -lsocket
-lnsl -lelf -lresolv
Undefined first referenced
symbol in file
PerlFilter cc.o
PerlClose innd.o
perl_filter_cv cc.o
PerlFilterActive cc.o
PERLsetup innd.o
PERLreadfilter cc.o
ld: fatal: Symbol referencing errors. No output written to innd
make: *** [innd] Error 1
Any ideas on where these symbols contacted in the perl system?
thanks
Colin
c.forde@qub.ac.uk
PS Please email me if u can come up with something.
------------------------------
Date: 31 Oct 1997 16:05:36 GMT
From: "Jack" <NoSPAMa-jackg@microsoft.com>
Subject: ADO->PERL->SQL
Message-Id: <01bce616$eec5a310$a0e4369d@jackg>
Does anyone have any sample code for calling an MS SQL stored procedure
that allows you to capture the return value of an sp RETURN.
The parameters append command below fails.
$param = $oCmd->CreateParameter("Return", $adInteger, $adParamReturnValue,
, 0) or warn "Create Param error";
# Cmd.Parameters.Append param
$oCmd->Parameters->Append($param) or warn "Append error";
Example proc)
create proc zSysError as
set nocount on
select 1
--raiserror (60001, 16, -1, 'zSysError')
return 3
------------------------------
Date: Fri, 31 Oct 1997 13:10:45 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Agrep for perl ?
Message-Id: <adelton.878303445@aisa.fi.muni.cz>
Petr Matousek <matousek@sunman.cern.ch> writes:
> Hi,
> I am looking for perl module/package which contains agrep (grep for
> approximate matching). Has anybody heard about it?
man String::Approx:
match and substitute approximately (aka fuzzy matching)
can be found of CPAN.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Fri, 31 Oct 1997 17:57:42 +0300
From: Vladimir Afanasiev <afan@elnet.msk.ru>
Subject: calendar
Message-Id: <3459F1E6.75F548C@elnet.msk.ru>
Have anybody PERL program, which detect, how many days is between date1
to date2? Format of date is mm/dd/yy.
--
Vladimir
http://www.ipclub.ru
------------------------------
Date: 31 Oct 1997 16:17:09 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: calendar
Message-Id: <toutatis-ya023180003110971717110001@news.euro.net>
Vladimir Afanasiev <afan@elnet.msk.ru> wrote:
> Have anybody PERL program, which detect, how many days is between date1
> to date2? Format of date is mm/dd/yy.
Get Time::JulianDay from CPAN, and merrily type:
#!/usr/bin/perl -w
use Time::JulianDay;
my $date1 = julian_day(2048,12,31); #year,month,day
my $date2 = julian_day(2049,1,1);#
my $difference = $date2 - $date1;
#millennium- and 2038-bug free
--
Toutatis
------------------------------
Date: Fri, 31 Oct 1997 11:43:15 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: calendar
Message-Id: <comdog-ya02408000R3110971143150001@news.panix.com>
In article <3459F1E6.75F548C@elnet.msk.ru>, Vladimir Afanasiev <afan@elnet.msk.ru> wrote:
>Have anybody PERL program, which detect, how many days is between date1
>to date2? Format of date is mm/dd/yy.
CPAN [1] has some really nifty Date::* modules.
[1]
Comprehensive Perl Archive Network
find one near you at <URL:http://www.perl.com>
--
brian d foy <comdog@computerdog.com>
NY.pm - New York Perl M((o|u)ngers|aniacs)* <URL:http://ny.pm.org/>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
------------------------------
Date: 31 Oct 1997 12:28:12 GMT
From: John Grubb <jgrubb@gte.net>
Subject: Re: Editing Passwords
Message-Id: <63ciss$phd$1@gte1.gte.net>
mark@pla.to wrote:
> Tom Phoenix <rootbeer@teleport.com> wrote in article
> <Pine.GSO.3.96.971025062944.8796D-100000@usertest.teleport.com>...
> > On Sat, 25 Oct 1997, Mic wrote:
> >
> > > Does anyone know where I can find a program that with add, change
> &
> > > delete passwords from the file .htpasswd.
> >
> > If there's a module which does what you want, it should be listed in
>
> > the module list on CPAN. If you don't find one to your liking,
> you're
> > welcome and encouraged to submit one! :-) Hope this helps!
> >
> > http://www.perl.org/CPAN/
> > http://www.perl.com/CPAN/
>
> You really should try Selena Sol's Home Page at
> http://www.extropia.com/. Eric provides just what you are looking for.
John
------------------------------
Date: Fri, 31 Oct 1997 10:04:49 +0000
From: webadmin <webadmin@prestel.net>
Subject: Re: fetch url data
Message-Id: <3459AD41.7095A929@prestel.net>
Shawn Wagner wrote:
>
> In article <3458ADF5.9625D8E1@prestel.net>,
> webadmin <webadmin@prestel.net> wrote:
> >Hi
> >
> >I would like to go to a particular web page from a cron job, and
> retrive
> >the data, and place it into a file.
> This has nothing to do with perl, so really should have gone to a
> different newsgroup.
>
> It can be done with perl, true. It can also be done with a number of
> other programs (Hint: 'man -k web' listed a few on the system I use).
>
> But unless your questions have something specific to do with perl,
> please ask them elsewhere.
>
> --
> Shawn Wagner - shawnw@wpi.edu
> http://mycroft.res.wpi.net/shawnw/
> Narf!
It did, because I would like to do it using perl
Iqbal
------------------------------
Date: Fri, 31 Oct 1997 10:31:49 GMT
From: gmpieri@carroll.com
Subject: Graphical Perl Debugger
Message-Id: <EIww2r.6H7@nonexistent.com>
Is there a full grapical perl debugger available vs. the command line
debugger for the Win32 environment that will let you set breakpoints
examine variables, step in/out,etc ??
Thanks in advance!
------------------------------
Date: Fri, 31 Oct 1997 05:51:16 -0600
From: sherman@unx.sas.com (Chris Sherman)
Subject: Re: How do I do multiple require's in different packages
Message-Id: <878298324.7054@dejanews.com>
In article <adelton.878243980@aisa.fi.muni.cz>,
adelton@fi.muni.cz (Honza Pazdziora) wrote:
> Use use. It's not a typo ;-) According to perlfunc it's equivalent to
>
> BEGIN { require Module; import Module LIST; }
>
> and even if the require will only take place once (because of %INC),
> the import will occure in all you packages. Also, it's compile time
> thing, so it should be faster.
I'm afraid this didn't work, unfortunately... (Unless I was doing
something wrong).
>From the blue camel:
use
use Module LIST
use Module
The _use_ declaration imports some semantics into the current package from
the named module.
<...>
The key here is "current package". I'm guessing this means that all
the other packages won't see it.
I tried replacing require's with use's in the sample code I posted
in my last message (and adding 1;'s to the end of the *.pm files)--no
change.
One idea I came up with was to put "local(%INC)" at the top of all
the files in front of the "require constants". This seemed to do
the trick, but there is probably still a better way.
Thanx for the response...
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Fri, 31 Oct 1997 14:52:15 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: How do I do multiple require's in different packages
Message-Id: <EIx7z3.CA5@world.std.com>
sherman@unx.sas.com (Chris Sherman) writes:
>I'm afraid this didn't work, unfortunately... (Unless I was doing
>something wrong).
If you call your file of constants as a module, you need to make some
alterations to it as well. If you are going to call it as a module,
you need to make it a module. Since you quote the camel book, I'd
suggest you take a look at what it says about making modules.
As a minimum, you probably want to add the following:
package Constants;
require Exporter;
@EXPORT = qw(constant1, constant2);
where constant1 and constant2 are the constants you want to use. (I'm
sorry, I can't brink myself to declare "true" and "false" as constants
like your example.)
The Exporter module defines an subroutine named "import", which will
alter the symbol table of the calling package, making the exported
symbols visible. Otherwise you are just doing a "require".
On the other hand, another solution would be to use the less often
seen "do FILE" construct instead of the "require" or "use".
--
Andrew Langmead
------------------------------
Date: Wed, 29 Oct 1997 21:08:47 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: how do I save an array into a file?
Message-Id: <adelton.878159327@aisa.fi.muni.cz>
sylvain.juneau@ec.gc.ca (Sylvain Juneau) writes:
> how do I save an array into a file?
for (@list)
{ print OUT $_; }
if it's an array of lines, otherwise check modules Data::Dumper or
Storable.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 31 Oct 1997 15:06:57 +0000
From: Anthony Bailey <baileya@cs.man.ac.uk>
Subject: Re: if (0<= $hun < 250) doesn't compile
Message-Id: <t0yvhyeas4u.fsf@cs.man.ac.uk>
Damian Conway (damian@cs.monash.edu.au) writes:
> "GRAIL" ... handles multiple comparisons because novices _expect_
> those semantics, and there's no compelling reason for a modern
> programming language _not_ to support them.
And since Perl currently gives an error message for such syntax, and
so the extension shouldn't cause old code to break, is it possibly
worth considering adding multiple comparisons to Perl?
It's an unambiguous short-hand, and an easily readable idiom which
seems to be in keeping with the Perl style.
I've been programming in languages that don't allow this syntax for as
long as I can remember and I still find myself writing it
occasionally. (c:
--
@*-.,_,.-`'-=*@@*=-`'-.,_,.-*@ For my contact details, and information on the
| Anthony. | bands Pulp, Saint Etienne, and the Kitchens OD,
@*-.,_,.-`'-=*@@*=-'`-.,_,.-*@ home's <URL:http://WWW.CS.Man.ac.UK/~baileya/>.
Anthony Bailey studies for a CompSci/Maths PhD at the University of Manchester
------------------------------
Date: 31 Oct 1997 12:53:27 GMT
From: John Grubb <jgrubb@gte.net>
Subject: Re: Internal Server Error
Message-Id: <63ckc7$o6c$1@gte2.gte.net>
Toutatis wrote:
> GEBiernat@bauwesen.de wrote:
>
> > The "Internal Server Error" is what you'll get from the HTTP server
> > whenever a script fails to give a _correct_ and _complete_ result.
>
> Could you unveil the manufacturer of such a server, that checks output
> for
> being correct and complete?
>
> --
> Toutatis
The specific error is actually output from Perl to the web server, the
web server records it in it's error log (assuming logging is enabled),
then the web server outputs a generic error message to the browser.
Instead of "Internal Server Error", I usually have my web servers output
a "The script failed" message to the browser.
The prvevious tip was true, but it may also help to check the web
server's error log for a more specific error, especially if the problem
is not syntax related and only occurs when input is provided to the
script.
This is often the case where form data is input from a web page, in that
command line arguments will be ignored and will be useless for
debugging. It is often much easier to read the error log and deduce the
cause than to edit your script to accept command line input.
I hope this is of some use.
John Grubb
"Just Me"
------------------------------
Date: Fri, 31 Oct 1997 08:02:21 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Lee Shin Jae <sjlee@nnlab.postech.ac.kr>
Subject: Re: log with base 10?
Message-Id: <Pine.GSO.3.96.971031080052.1216L-100000@usertest.teleport.com>
On 31 Oct 1997, Lee Shin Jae wrote:
> Could you tell me how can I use log_10?
sub log_10 ($) { log($_[0])/log(10) }
Hope this helps!
--
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: 31 Oct 1997 16:07:10 GMT
From: moseley@netcom.com (Bill Moseley)
Subject: multi-line text replacement
Message-Id: <63cvne$qqi$1@nnrp3.snfc21.pbi.net>
I'm new at all this...
There must be a bunch of ways to do this, but I'm wondering what is a good
(or common) way to replace a block of text in a text file with another block of
text.
All I know about the block is that is starts and ends with unique strings, but
I'm not sure where on the line these unique strings start (may be at the start
of the line, maybe indented with white space, or may follow other text). There
may be a number of newlines within the block of text, too.
Should I slurp the entire file into one long scalar and use s// or read
line-by-line and substr the beginning and ending lines with the unique strings
and then zap all lines inbetween? This just seems like a common task, and
there must be an elegant way to do this.
Thanks,
--
Bill Moseley
mailto:moseley@netcom.com
------------------------------
Date: 31 Oct 1997 12:59:01 +0100
From: ckc@dmi.min.dk (Casper K. Clausen)
Subject: New version when?
Message-Id: <wvpiuuegn3t.fsf@hobbes.dmi.min.dk>
Hi all.
I'm contemplating installing 5.004_3 on our system. However, we do not
currently use Perl in any way which an upgrade from our 5.002 version
would impact.
Thus my question is:
Is a new release imminent (imminent meaning 'coming out within a month
or thereabouts')?
I would feel pretty stupid installing 5.004_3 if _4 or .005 came out a
couple of weeks later.
Regards,
Kvan.
--
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- | unattempted is impossible.'
Lokal 544 |
I do not speak for DMI, just me. | - Lord Mhoram, Son of Variol.
------------------------------
Date: Fri, 31 Oct 1997 11:09:56 +0100
From: Christel Veltrup <Christel.Veltrup@gmd.de>
Subject: no enough memory with perl for win32
Message-Id: <3459AE6F.2B7B60D6@gmd.de>
hi,
I4m new in perl and wrote a program that compare two arrays. Each array
has about 2000 entries. The perl interpreter tells Not Enough Memory.
What kann I do to prevent this Message?
Thanks
Juergen
email: s95119@fh-telekom-leipzig.de
------------------------------
Date: 31 Oct 1997 14:40:06 GMT
From: mike@stok.co.uk (Mike Stok)
Subject: Re: no enough memory with perl for win32
Message-Id: <63cqk6$1iu@news-central.tiac.net>
In article <3459AE6F.2B7B60D6@gmd.de>,
Christel Veltrup <Christel.Veltrup@gmd.de> wrote:
>hi,
>I4m new in perl and wrote a program that compare two arrays. Each array
>has about 2000 entries. The perl interpreter tells Not Enough Memory.
>What kann I do to prevent this Message?
It depends on what your code does. If you post a sample of the code it
will be a lot easier to see where things might be consuming memory. Also
the version of perl which you're using may be of help.
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Fri, 31 Oct 97 09:32:11 -0500
From: bsa@void.apk.net (Brandon S. Allbery KF8NH; to reply, change "void" to "kf8nh")
Subject: Re: Perl for OS/2
Message-Id: <3459ec7f$5$ofn$mr2ice@speaker>
In <3458455B.15CEB364@absyss.fr>, on 10/30/97 at 09:29 AM,
Doug Seay <seay@absyss.fr> said:
+-----
| > Where can I find a version of perl for OS/2?
| Doesn't the standard perl5.004 package work for OS/2 too? The
| README.os2 says (in the BUILD section)
+--->8
It works fine, although most people don't want to build from source themselves
(and considering that you have to d*mned near download the entire Leo EMX
archive onto your computer to build it, it's hard to blame them :-)
If CPAN doesn't keep binary distributions any more, I have no idea where to
get one. (No, I can't make mine available.)
--
brandon s. allbery [Team OS/2][Linux] bsa@void.apk.net
cleveland, ohio mr/2 ice's "rfc guru" :-) KF8NH
Memo to MLS: End The Burn Scam --- Doug Logan MUST GO! FORZA CREW!
------------------------------
Date: 31 Oct 1997 14:25:33 GMT
From: murray-paul@usa.net (Paul Murray)
Subject: Perl2Exe with Tk?
Message-Id: <63cpot$5ca@tmp.boc.com>
I am looking to build a few small support programs to distribute
alongside an existing package. A graphical user-interface is required,
and I would like to be able to pre-compile the script into a single file
I can ship out to the computers, rather than have a complete perl
installation on each.
Now I can use the standard perl distribution and get Tk, or I
can use the ActiveWare build together with Perl2Exe to get a single
executable, my question is whether I can do both at once?
I tried mangling the standard perl directory structure to
enable perl2exe to find the modules I am including, but although it
compiles ok, it fails at runtimes in autoloads.
Is there either a perl2exe for standard perl (preferred), or a
version of Tk for Activeware perl?
-Paul Murray
------------------------------
Date: 31 Oct 1997 16:47:37 +0100
From: ckc@dmi.min.dk (Casper K. Clausen)
Subject: Problems compiling for Solaris 2.4
Message-Id: <wvphg9ygciu.fsf@hobbes.dmi.min.dk>
Greetings, all.
Having found that I was mistaken in assuming .004_03 was the most
recent release (yes, I will be writing "always check CPAN, even if you
think you know" a couple of thousand times over), I set forth on a
quest to compile .004_04.
Of course, as on all quests, there were trials; mistakes were made and
learnt from. Now, however, I find myself at a very strange obstacle:
,----- Output from make depend, as run by Configure.
| Run make depend now? [y]
| sh ./makedepend MAKE=make
| make: Warning: Both `makefile' and `Makefile' exist
| Current working directory /dmi/src/perl5.004_04
| make depend MAKEDEPEND=
| make: Warning: Both `makefile' and `Makefile' exist
| Current working directory /dmi/src/perl5.004_04
| sh ./makedepend MAKE=make
| make: Warning: Both `makefile' and `Makefile' exist
| Current working directory /dmi/src/perl5.004_04
`-----
This patter will repeat for as long as I can stand to watch. No
difference is apparent when running GNU make.
Any hints for a battle-weary knight?
Regards,
Sir Kvan, on a quest for the Holy Perl.
--
-------Casper Kvan Clausen------ | 'Ah, Warmark, everything that passes
----------<ckc@dmi.dk>---------- | unattempted is impossible.'
Lokal 544 |
I do not speak for DMI, just me. | - Lord Mhoram, Son of Variol.
------------------------------
Date: Fri, 31 Oct 1997 07:59:40 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: IGuthrie <iguthrie@aol.com>
Subject: Re: Stating File Systems in Perl
Message-Id: <Pine.GSO.3.96.971031075918.1216K-100000@usertest.teleport.com>
On 31 Oct 1997, IGuthrie wrote:
> Is there any way to stat a filesystem in perl?
If there's a module which does what you want, it should be listed in
the module list on CPAN. If you don't find one to your liking, you're
welcome and encouraged to submit one! :-) Hope this helps!
http://www.perl.org/CPAN/
http://www.perl.com/CPAN/
--
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: 31 Oct 1997 16:03:19 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: Re: stdin/stdout pipes to a program
Message-Id: <63cvg7$poj$1@daily.bbnplanet.com>
brian d foy (comdog@computerdog.com) wrote:
: In article <63b5s3$r7c$1@sloth.swcp.com>, aaron@swcp.com (Aaron Birenboim) wrote:
: >I would like to have a perl program have a "conversation" with a program
: >that uses interractive text questions & responses. (All keyboard
: >and text output interface)
: >
: >What would be the easiest way to do this in perl?
The Comm.pl module is.
Jason Gloudon
------------------------------
Date: Fri, 31 Oct 1997 12:01:51 +0100
From: Harald Joerg <Harald.Joerg@mch.sni.de>
To: Morten Simonsen <mortensi@idt.ntnu.no>
Subject: Re: Use DB_FILE?
Message-Id: <3459BA9F.1578@mch.sni.de>
[mailed and posted]
Morten Simonsen wrote:
> I wrote this little test-program:
> ----------------------
> #!/usr/local/bin/perl
> use DB_FILE;
> tie %hash, "DB_FILE", "database", 0644;
> ----------------------
> and I get this error-message when trying to "compile" it:
> ----------------------
> Can't locate DB_FILE.pm in @INC at ././miniDB.pl line 3.
> BEGIN failed--compilation aborted at ././miniDB.pl line 3.
DB_File is not part of the "standard" Perl distribution.
You can get it from CPAN and and install it (or have it
installed if you're not root).
AnyDBM_File and dbmopen() work because SDBM_File *is*
bundled with Perl. If you just need any DBM, sdbm should
work.
--
Oook,
--haj--
------------------------------
Date: Fri, 31 Oct 1997 13:17:31 GMT
From: danhb@nortel.ca ( Dan Bissetsmith)
Subject: Using the split command
Message-Id: <3459da68.154995595@carnews0>
I have a line of data that I am trying to extract the number from:
Total Call Elapsed Time : 3323 seconds.
I only the number out of the line.
I tried some code as follows:
#find total call elapsed time:
@tot = grep(/(Total Call Elapsed Time)/,$line);
if(@tot)
{
print "total call found\n";
print "line in match tot: @tot\n";
#($text1, $remainder) = split(/(.*)":"(.*)/, @tot, 3);
($t1,$t2,$t3,$t4,$t5,$remainder,$t6) = split(/\s+/, @tot);
print "remainder: $remainder\n";
}
The number is not being extracted. How do I extract only the
number from the line?
Dan Bissetsmith
Public Data Network Technologies
Nortel
Dept. 5b52 MS 241
Box 3511 Stn C.
Ottawa ON K1Y 4H7
(613) 763-8951
danhb@nortel.ca
------------------------------
Date: Fri, 31 Oct 1997 13:54:24 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Using the split command
Message-Id: <adelton.878306064@aisa.fi.muni.cz>
danhb@nortel.ca ( Dan Bissetsmith) writes:
> I have a line of data that I am trying to extract the number from:
> Total Call Elapsed Time : 3323 seconds.
> I only the number out of the line.
>
> I tried some code as follows:
> #find total call elapsed time:
> @tot = grep(/(Total Call Elapsed Time)/,$line);
> if(@tot)
> {
> print "total call found\n";
> print "line in match tot: @tot\n";
> #($text1, $remainder) = split(/(.*)":"(.*)/, @tot, 3);
> ($t1,$t2,$t3,$t4,$t5,$remainder,$t6) = split(/\s+/, @tot);
>
> print "remainder: $remainder\n";
>
> }
>
> The number is not being extracted. How do I extract only the
> number from the line?
There is more than one way to do it and it really depends on how your
other lines look like, whether they have the same number of spaces and
so. This might be the easiest
my $line = shift @tot;
my ($seconds) = ($line =~ /\s(\d+)\sseconds/);
It uses () in match in list context, see manpage for why it works.
Hope this works,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 31 Oct 1997 14:11:31 GMT
From: toutatis@_SPAMTRAP_toutatis.net (Toutatis)
Subject: Re: Using the split command
Message-Id: <toutatis-ya023180003110971511310001@news.euro.net>
danhb@nortel.ca wrote:
> I have a line of data that I am trying to extract the number from:
> Total Call Elapsed Time : 3323 seconds.
> I only the number out of the line.
>
> I tried some code as follows:
> #find total call elapsed time:
> @tot = grep(/(Total Call Elapsed Time)/,$line);
> if(@tot)
> {
> print "total call found\n";
> print "line in match tot: @tot\n";
> #($text1, $remainder) = split(/(.*)":"(.*)/, @tot, 3);
> ($t1,$t2,$t3,$t4,$t5,$remainder,$t6) = split(/\s+/, @tot);
>
> print "remainder: $remainder\n";
>
> }
>
> The number is not being extracted. How do I extract only the
> number from the line?
I guess something like:
while(<F>){
if (($time) = /Total Call Elapsed Time.*?(\d+).*?/){
print $time,"\n";
}
}
--
Toutatis
------------------------------
Date: Fri, 31 Oct 1997 10:46:21 -0500
From: Glen Culbertson <nnyxcu@ny.ubs.com>
To: danhb@nortel.ca
Subject: Re: Using the split command
Message-Id: <3459FD4D.6E5B@ny.ubs.com>
Dan Bissetsmith wrote:
>
> I have a line of data that I am trying to extract the number from:
> Total Call Elapsed Time : 3323 seconds.
> I only the number out of the line.
>
> I tried some code as follows:
> #find total call elapsed time:
> @tot = grep(/(Total Call Elapsed Time)/,$line);
> if(@tot)
> {
> print "total call found\n";
> print "line in match tot: @tot\n";
> #($text1, $remainder) = split(/(.*)":"(.*)/, @tot, 3);
> ($t1,$t2,$t3,$t4,$t5,$remainder,$t6) = split(/\s+/, @tot);
>
An array in a scalar context returns the number of elements in it,
and split is looking for a string on which to work, not an array (i.e.,
it provides a scalar context). So here, @tot having one element, your
split command is equivalent to "split(/\s+/, 1)". Assuming no white
space
at the start of your line, the result will be that $t1 is "1" and the
rest
of the lh values empty.
If you just replace "@tot", with "$line", you will probably get what you
want.
In the TMTOWTDI spirit, you might consider something like:
print "remainder: $1\n" if $line =~ /Total Call Elapsed Time\D*(\d+)/;
i.e., print what you match in ()'s if $line has "Total Call Elapsed
Time"
followed by 0 or more things that are not digits, followed by 1 or more
things that are digits.
> print "remainder: $remainder\n";
>
> }
>
> The number is not being extracted. How do I extract only the
> number from the line?
> Dan Bissetsmith
> Public Data Network Technologies
> Nortel
> Dept. 5b52 MS 241
> Box 3511 Stn C.
> Ottawa ON K1Y 4H7
> (613) 763-8951
> danhb@nortel.ca
------------------------------
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 1254
**************************************