[16020] in Perl-Users-Digest
Perl-Users Digest, Issue: 3432 Volume: 9
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Jun 20 18:06:05 2000
Date: Tue, 20 Jun 2000 15:05:25 -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: <961538723-v9-i3432@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Tue, 20 Jun 2000 Volume: 9 Number: 3432
Today's topics:
[ String ] How to divide a string into equal string <TheEx0rcist@fanclub.org>
Re: [ String ] How to divide a string into equal string <thoren@southern-division.com>
Re: [ String ] How to divide a string into equal string (Matt Knecht)
Re: [ String ] How to divide a string into equal string <lauren_smith13@hotmail.com>
Re: [ String ] How to divide a string into equal string <TheEx0rcist@fanclub.org>
Re: [ String ] How to divide a string into equal string <TheEx0rcist@fanclub.org>
Re: A Computer Programmers Profile <smerr612@mailandnews.com>
Re: A Computer Programmers Profile <mike.solomon@eps.ltd.uk>
Re: A Computer Programmers Profile (Jerome O'Neil)
Accessing database on the web <rossyt@thehornets.net>
BIG BUG in CGI.pm on Internet Explorer !! <makau@multimania.com>
Re: bug with arrays? (Decklin Foster)
Building perl 5.6 on Linux Mandrake <jboes@eoexchange.com>
clone serial port data stream tony_barratt@my-deja.com
Re: Crazy enough that it might just work... <peter.sundstrom@eds.com>
creating a file that doesn't exist <jbdowney@students.uiuc.edu>
Re: creating a file that doesn't exist <lauren_smith13@hotmail.com>
Re: creating a file that doesn't exist <jbdowney@students.uiuc.edu>
Re: curious databse of webhosting like geocities reptilexxviii@my-deja.com
Data Source Name <wcrites@cis.ctc.edu>
Re: Data Source Name <care227@attglobal.net>
Datedness of CPAN [Was: Re: Where to get CPAN CD? lvirden@cas.org
Re: debugging an already running program (Andrew E Page)
Re: Formatting question? <godzilla@stomp.stomp.tokyo>
Re: Getting current working directory in perl script aaronp243@my-deja.com
Re: I need to get better at Perl (Bart Lateur)
Re: IDE for perl? felrodian@my-deja.com
Re: IDE for perl? felrodian@my-deja.com
Re: Is there a dos htm enviroment for perl ? <care227@attglobal.net>
Re: Is there a dos htm enviroment for perl ? <smile773@bigfoot.com>
Re: Is there a dos htm enviroment for perl ? <care227@attglobal.net>
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 20 Jun 2000 22:45:02 +0200
From: "TheEx0rcist" <TheEx0rcist@fanclub.org>
Subject: [ String ] How to divide a string into equal string
Message-Id: <8iol58$u1m$1@news5.isdnet.net>
Basically, here is what I want to do :
--
my $n = 7;
my $string = 'abcdefghijmnopqrstuvwxyz';
my @strings = ÷($string,$n);
print join("\n",@strings);
--
abcdefg # 7 characters
hijklmn # 7 characters
opqrstu # 7 characters
vwyz # 4 characters
--
I'd like a _simple_ way to do this.
Any ideas?
Thanks
------------------------------
Date: Tue, 20 Jun 2000 23:10:36 +0200
From: "Thoren Johne" <thoren@southern-division.com>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8iomlh$3hn$11$1@news.t-online.com>
TheEx0rcist <TheEx0rcist@fanclub.org> wrote in message
news:8iol58$u1m$1@news5.isdnet.net...
> my $n = 7;
> my $string = 'abcdefghijmnopqrstuvwxyz';
> my @strings = ÷($string,$n);
> print join("\n",@strings);
> --
> abcdefg # 7 characters
> hijklmn # 7 characters
> opqrstu # 7 characters
> vwyz # 4 characters
#!/usr/local/bin/perl -w
use strict;
my $n = 7;
my $string = 'abcdefghijklmnopqrstuvwxyz';
my @strings = $string =~ /.{1,$n}/g;
print join("\n",@strings);
cheers!
thoren
8#X
--
----------------------------------------------------------------------
Thoren Johne - 8#X - thoren@southern-division.com
Southern Division Classic Bikes - www.southern-division.com
------------------------------
Date: Tue, 20 Jun 2000 21:38:22 GMT
From: hex@voicenet.com (Matt Knecht)
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <ivR35.38$6J5.7385@news2.voicenet.com>
TheEx0rcist <TheEx0rcist@fanclub.org> wrote:
>
>my $n = 7;
>my $string = 'abcdefghijmnopqrstuvwxyz';
>my @strings = ÷($string,$n);
>print join("\n",@strings);
>--
>abcdefg # 7 characters
>hijklmn # 7 characters
>opqrstu # 7 characters
>vwyz # 4 characters
>--
Here's One Way:
my @strings = unpack("a$n" x (length($string) / $n + (length($string)
% $n ? 1 : 0)), $string);
--
Matt Knecht <hex@voicenet.com>
------------------------------
Date: Tue, 20 Jun 2000 14:25:46 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8iong0$oek$1@brokaw.wa.com>
TheEx0rcist <TheEx0rcist@fanclub.org> wrote in message
news:8iol58$u1m$1@news5.isdnet.net...
> Basically, here is what I want to do :
>
> --
> my $n = 7;
> my $string = 'abcdefghijmnopqrstuvwxyz';
> my @strings = ÷($string,$n);
> print join("\n",@strings);
> --
> abcdefg # 7 characters
> hijklmn # 7 characters
> opqrstu # 7 characters
> vwyz # 4 characters
> --
>
> I'd like a _simple_ way to do this.
> Any ideas?
What have you tried? Have you looked at the split() function?
Lauren (who also notes that the American alphabet has 26 letters, not 25 :-)
------------------------------
Date: Tue, 20 Jun 2000 23:54:29 +0200
From: "TheEx0rcist" <TheEx0rcist@fanclub.org>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8iop7e$1bjp$1@news4.isdnet.net>
> > my $n = 7;
> > my $string = 'abcdefghijmnopqrstuvwxyz';
> > my @strings = ÷($string,$n);
> > print join("\n",@strings);
> > --
> > abcdefg # 7 characters
> > hijklmn # 7 characters
> > opqrstu # 7 characters
> > vwyz # 4 characters
>
> #!/usr/local/bin/perl -w
> use strict;
>
> my $n = 7;
> my $string = 'abcdefghijklmnopqrstuvwxyz';
> my @strings = $string =~ /.{1,$n}/g;
>
> print join("\n",@strings);
That Simple ?
Damn you are great !!
Thank you !!
------------------------------
Date: Tue, 20 Jun 2000 23:55:51 +0200
From: "TheEx0rcist" <TheEx0rcist@fanclub.org>
Subject: Re: [ String ] How to divide a string into equal string
Message-Id: <8iopa7$ivh$1@news3.isdnet.net>
> : 0))
Is it that funny?
Hehe, thanks for the help dude ! :o)
------------------------------
Date: Tue, 20 Jun 2000 19:14:01 GMT
From: Steven Merritt <smerr612@mailandnews.com>
Subject: Re: A Computer Programmers Profile
Message-Id: <8iofpa$n3o$1@nnrp1.deja.com>
In article <sqd25.150$lY4.7673@news.uswest.net>,
"Ferk Da Jerk" <shawnball@uswest.net> wrote:
>
> I'd like to see you try to kill the children. It seems these days the
> children are out numbering the adults, the killers are the children,
and the
> children are more stronger than the adults.
Children have always thought this. When you're growing up you seem to
catch on to things very quickly, typically because your mind is still
forming and you are in your prime as far as your learning potential is
concerned. This often leads to the false thought that the children are
smarter and stronger than the adults.
When I was in high school I was in the Technical side of the Theatre.
We rigged the lighting, built the sets, etc. There was a guy there who
was one grade level advanced of me and we were talking one day and I
mentioned that I liked the Electrical shop teacher because he really
knew what he was talking about. It was obvious to me that he had tons
of experience and he didn't put up with crap in his classroom. He
replied that he had had the class last year and thought the man was an
idiot and remarked that he knew "so much more than Mr Knox." This same
young man nearly killed himself a few days later when he was up on the
catwalk(about 60 feet above hard wooden auditorium seats and concrete
floor) and short-circuted a lighting bank by trying to pry the plug out
of the socket with a screwdriver.
Knowledge is no substitue for wisdom and wisdom cannot be gained by the
arrogant.
Steven
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 22:47:08 +0100
From: "mike solomon" <mike.solomon@eps.ltd.uk>
Subject: Re: A Computer Programmers Profile
Message-Id: <8iooq3$4vak0$1@fu-berlin.de>
if its not a stupid question
what has this to do with perl
Mike Solomon
Steven Merritt <smerr612@mailandnews.com> wrote in message
news:8iofpa$n3o$1@nnrp1.deja.com...
> In article <sqd25.150$lY4.7673@news.uswest.net>,
> "Ferk Da Jerk" <shawnball@uswest.net> wrote:
> >
> > I'd like to see you try to kill the children. It seems these days the
> > children are out numbering the adults, the killers are the children,
> and the
> > children are more stronger than the adults.
>
> Children have always thought this. When you're growing up you seem to
> catch on to things very quickly, typically because your mind is still
> forming and you are in your prime as far as your learning potential is
> concerned. This often leads to the false thought that the children are
> smarter and stronger than the adults.
>
> When I was in high school I was in the Technical side of the Theatre.
> We rigged the lighting, built the sets, etc. There was a guy there who
> was one grade level advanced of me and we were talking one day and I
> mentioned that I liked the Electrical shop teacher because he really
> knew what he was talking about. It was obvious to me that he had tons
> of experience and he didn't put up with crap in his classroom. He
> replied that he had had the class last year and thought the man was an
> idiot and remarked that he knew "so much more than Mr Knox." This same
> young man nearly killed himself a few days later when he was up on the
> catwalk(about 60 feet above hard wooden auditorium seats and concrete
> floor) and short-circuted a lighting bank by trying to pry the plug out
> of the socket with a screwdriver.
>
> Knowledge is no substitue for wisdom and wisdom cannot be gained by the
> arrogant.
>
> Steven
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 22:02:11 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: A Computer Programmers Profile
Message-Id: <DRR35.318$j51.5682@news.uswest.net>
"mike solomon" <mike.solomon@eps.ltd.uk> elucidates:
> if its not a stupid question
>
> what has this to do with perl
Killing your children is oft accomplished in Perl.
------------------------------
Date: Tue, 20 Jun 2000 19:18:30 +0100
From: Ross Taylor <rossyt@thehornets.net>
Subject: Accessing database on the web
Message-Id: <394FB575.8D014097@thehornets.net>
Hello,
I have read several tutorials on using DBI to access an MS Access
database. I Can do this simply on my local machine by setting up a data
source which I can refer to in my program.
How can I use the same program on my website as the data source will not
exist there??
Do I need to contact my ISP?? If so, what do I tell them?!?!?!?
Thanks in advance for any help,
Ross Taylor
------------------------------
Date: Tue, 20 Jun 2000 21:53:25 GMT
From: Makau Divangamene <makau@multimania.com>
Subject: BIG BUG in CGI.pm on Internet Explorer !!
Message-Id: <8iop4e$u9t$1@nnrp1.deja.com>
That thing is driving me crazy !!!
CGI.pm keeps omitting parameters of $ENV{QUERY_STRING} randomly on
IE5 !! In the beginning when my code was rather simple, there was
absolutely no problem. But I soon as my code grew up more and more, up
to using 10 different modules, I noticed that CGI.pm suddenly started
omitting parameters on IE5 (no problem with Netscape). Sometimes it
even drops the hole query string !! What's weird is that ENV
{QUERY_STRING} is correct but as soon as I try retrieving variables
with the param($key) method of CGI.pm, it simply doesn't work
(sometimes) !!
I would really be happy to know if someone has encountered the same
problem. If so, how they solved it.
Thank you very very much !! This is a crictical problem !!
: Using Perl 5.005_02 on Linux RH
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: 20 Jun 2000 19:12:53 GMT
From: fosterd@hartwick.edu (Decklin Foster)
Subject: Re: bug with arrays?
Message-Id: <slrn8kvghq.5dq.fosterd@photek.dhs.org>
Csaba Raduly <csaba_r@my-deja.com> writes:
> As in "He zeroeth the array":-)
<silly>
Shouldn't that be "And yea, he did zeroeth the array, and it came to
pass that all the elements didst evaluate as false in a boolean
context"?
</silly>
--
There is no TRUTH. There is no REALITY. There is no CONSISTENCY. There
are no ABSOLUTE STATEMENTS. I'm very probably wrong. -- BSD fortune(6)
------------------------------
Date: Tue, 20 Jun 2000 14:44:18 -0400
From: Jeff Boes <jboes@eoexchange.com>
Subject: Building perl 5.6 on Linux Mandrake
Message-Id: <394fbcd9$0$1500$44a10c7e@news.net-link.net>
I'm trying to build perl 5.6 on my Linux workstation (Mandrake 7.0),
while preserving perl 5.005_03 which is already there as my "main" perl.
So I run the Configure script, and tell it where I want to install the
new version (/usr/local/perl56). Somewhere in the midst of things it
complains
/usr/include/linux/param.h:4: asm/param.h: No such file or directory
and so on for about 4 different other files (but dozens of occurances).
I seem to have copies of all the appropriate missing '.h' files, but
they're not where the Makefile is expecting them. Has anyone
successfully built 5.6 on such a configuration? Is there an appropriate
response to the configuration process that will tell 'make' where to
look?
--
Jeff Boes |perl -e 'print map(substr(" acehjk|jboes@eoexhange.com
Sr. S/W Engineer |lnoprstu,\n",$i+=$_,1),(5,9,-2,1, |616-381-9889 ext 18
Change Technology|-13,1,7,1,4,-9,-1,8,-11,10,-7,8,-4|616-381-4823 fax
EoExchange, Inc. |,-7,4,-3,1,4,-3,8,4,1));' |www.eoexchange.com
------------------------------
Date: Tue, 20 Jun 2000 21:00:51 GMT
From: tony_barratt@my-deja.com
Subject: clone serial port data stream
Message-Id: <8iom1p$s4d$1@nnrp1.deja.com>
Hi Perl Experts..
I've got a problem with an rs232 serial data stream. Actually it's the
alert messages from a voice switch, and that's what I need to acquire
and parse and you know, sort the wheat from the chaff, the info from
the data. Just what perl's for i'm thinking.
But before I get the data, i shud note that there is already a printer-
type thing hanging off the port.
So I was wondering if I snarf this connection, can I use a low level
serial port perl module to grab the data from serial port A and copy it
the port B, transparently, on a sparc Solaris?
TIA
tony
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Wed, 21 Jun 2000 09:31:42 +1200
From: "Peter Sundstrom" <peter.sundstrom@eds.com>
Subject: Re: Crazy enough that it might just work...
Message-Id: <8ioo0g$377$1@hermes.nz.eds.com>
Agentkhaki wrote in message <0c991c4d.93addc40@usw-ex0105-035.remarq.com>...
>The reason that I still feel that HTML is a programming language
>in some senses is this: If I sit down and write an actual
>program in C, I've written something that's pretty much useless
>in and of itself. That is to say, that original file, complied
>in (G)Notepad doesn't stand up by itself. Just like an HTML
>file. However, when I run that little file through a compiler,
>poof, I've suddenly got an output that's useable.
>
>HTML doesn't exactly run through a compiler, but it does get
>read by a browser. What it contains is interpreted and then a
>finished product is spewed forth. Granted the output won't look
>the same on every browser, but I think that the argument that
>HTML isn't a programming language because of this is fairly
>weak. Furthermore, HTML is about 'do this.' Without it, web
>browsers are useless. I think it is pretty clear that HTML tells
>a browser 'do this' and, after some complaining and perhaps a
>little modification, it does pretty much that. The point that
>programming languages are not flexible like this is a very good
>one. (I have a feeling Kira explained that much better than I
>just did...).
If you extend this logic a little futher, you could claim MS Word, PDF, XML,
troff etc are programming languages.
------------------------------
Date: Tue, 20 Jun 2000 15:54:59 -0500
From: jonas benjamin downey <jbdowney@students.uiuc.edu>
Subject: creating a file that doesn't exist
Message-Id: <Pine.GSO.4.10.10006201550340.9492-100000@ux12.cso.uiuc.edu>
I'm trying to figure out how to create a file that doesn't already exist
from a script on an apache web server. I've tried the method in the perl
faq, which is (roughly):
$FILE = '(path of nonexistent file)';
use Fcntl;
sysopen(FH, $FILE, O_WRONLY|O_EXCL|O_CREAT, 0755) or die "can't open
$FILE: $!":
But every time I run the script I get a compilation error. Is there an
alternative way to do this?
Thanks,
jonas
------------------------------
Date: Tue, 20 Jun 2000 14:19:21 -0700
From: "Lauren Smith" <lauren_smith13@hotmail.com>
Subject: Re: creating a file that doesn't exist
Message-Id: <8ion3v$s33$1@brokaw.wa.com>
jonas benjamin downey <jbdowney@students.uiuc.edu> wrote in message
news:Pine.GSO.4.10.10006201550340.9492-100000@ux12.cso.uiuc.edu...
>
> I'm trying to figure out how to create a file that doesn't already exist
> from a script on an apache web server. I've tried the method in the perl
> faq, which is (roughly):
$file = 'path/to/file';
unless (-e $file) {
open FILEHANDLE, ">$file" or die "Can't open $file: $!";
}
>
> $FILE = '(path of nonexistent file)';
> use Fcntl;
> sysopen(FH, $FILE, O_WRONLY|O_EXCL|O_CREAT, 0755) or die "can't open
> $FILE: $!":
Did you mean to put a ":" at the end, or did you want a ";"?
>
> But every time I run the script I get a compilation error.
Please tell us what the error is.
Lauren
------------------------------
Date: Tue, 20 Jun 2000 16:26:34 -0500
From: jonas benjamin downey <jbdowney@students.uiuc.edu>
Subject: Re: creating a file that doesn't exist
Message-Id: <Pine.GSO.4.10.10006201625540.24993-100000@ux11.cso.uiuc.edu>
I hate the never mind post, but never mind...It was the colon instead of a
semi-colon at the end of the line. :)
bah,
jonas
On Tue, 20 Jun 2000, jonas benjamin downey wrote:
>
> I'm trying to figure out how to create a file that doesn't already exist
> from a script on an apache web server. I've tried the method in the perl
> faq, which is (roughly):
>
> $FILE = '(path of nonexistent file)';
> use Fcntl;
> sysopen(FH, $FILE, O_WRONLY|O_EXCL|O_CREAT, 0755) or die "can't open
> $FILE: $!":
>
> But every time I run the script I get a compilation error. Is there an
> alternative way to do this?
>
> Thanks,
> jonas
>
>
>
------------------------------
Date: Tue, 20 Jun 2000 20:00:28 GMT
From: reptilexxviii@my-deja.com
Subject: Re: curious databse of webhosting like geocities
Message-Id: <8ioigt$707$1@nnrp2.deja.com>
> > The best, of course, is MySQL running on Red
Hat 6.1+
> >
>
> In what way best ? Is it going to be faster or
more robust than Oracle
> or Informix running under Solaris on a Sun
E10000 ?
>
> /J\
maybe not as robust or as fast (i have no idea to
be honest), but it certainly wins the speed to
price ratio ;-)
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 11:30:06 -0700
From: William Crites <wcrites@cis.ctc.edu>
Subject: Data Source Name
Message-Id: <394FB82E.DD97A11B@cis.ctc.edu>
Do you think it is possible to get names (DSN) from ODBC on NT Server? I
want to have all name for records.
Thanks
NT Administrator
Wm. Crites
------------------------------
Date: Tue, 20 Jun 2000 14:55:14 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Data Source Name
Message-Id: <394FBE12.5770F93C@attglobal.net>
William Crites wrote:
>
> Do you think it is possible to get names (DSN) from ODBC on NT Server? I
> want to have all name for records.
> Thanks
>
What is your Perl question?
------------------------------
Date: 20 Jun 2000 18:21:47 GMT
From: lvirden@cas.org
Subject: Datedness of CPAN [Was: Re: Where to get CPAN CD?
Message-Id: <8iocnr$gtv$2@srv38.cas.org>
:>>I don't mind if the CD is a few months behind.
:> Walnut Creek: http://www.cdrom.com/
:> Looks like they cut a new CPAN disk 2 or 3 times a year. The latest
:> is dated May, 2000.
:Which will have been outdated the day after they took the snapshot though.
Okay, anyone have stats on the percentage of unique CPAN entries which
change a quarter? Are we talking generally about 25% of the library changing
every 3 months? Or 75% of the library?
If it is 25% of the library, then it seems likely that the segment of
perl users who pay either per kilobyte or per hour charges to download
could likely benefit from a low cost subscription which would create
a CPAN mirror containing only the most recent version of each source
package on CPAN.
--
<URL: https://secure.paypal.com/refer/pal=lvirden%40yahoo.com>
<URL: mailto:lvirden@cas.org> <URL: http://www.purl.org/NET/lvirden/>
Unless explicitly stated to the contrary, nothing in this posting
should be construed as representing my employer's opinions.
------------------------------
Date: Tue, 20 Jun 2000 19:15:54 GMT
From: aep@world.std.com (Andrew E Page)
Subject: Re: debugging an already running program
Message-Id: <FwGw6I.L1K@world.std.com>
Is perl itself hanging, or is the script hanging? A perl program
that does not have the -d option set(perl -d myscript.pl) can't
be stopped and debugged.
You might try this approach...
The ptkdb debugger can be configured such that it will not stop
at the first line, but continue on and not create a window.
If the script hangs, you can send it a 'kill -QUIT' signal, which,
provided it is the script that is hanging and not perl itself, will
force the script to enter the debugger. From there you can see where
you've stopped and see what conditions are causing the script to hang.
--
Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
Software Engineering Consultant | The difference between what we are
Unix, Mac, C/C++/Java, Perl, NT | and what we want to be.
------------------------------
Date: Tue, 20 Jun 2000 12:07:55 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Formatting question?
Message-Id: <394FC10B.E5117DD9@stomp.stomp.tokyo>
Jim Cook wrote:
(Kira wrote somewhere:)
(snippage)
> I hope I did this correctly.
> I'm trying to learn how to use the benchmark.pm
> that Larry so nicely pointed out.
You know more about benchmark than myself!
I've never used benchmark!
> It looks like your first (index, substr) method
> is faster than your second (sprintf).
> > $s1 = '$_ = ${\substr ($string, 0, (index ($string, ".") + 3))}';
> > $s2 = '$_ = ${\sprintf \'%.2f\' => $string}';
> > $string = "1234.56789";
> Benchmark: timing 400000 iterations of n1, n2...
> n1: 7 wallclock secs ( 7.54 usr + 0.00 sys = 7.54 CPU) @
> 53036.33/s (n=400000)
> n2: 15 wallclock secs (14.85 usr + 0.00 sys = 14.85 CPU) @
> 26932.40/s (n=400000)
This is a surprise to me! I truly expected my
substring and index method compared to sprintf
to be somewhat slower, not twice as fast! I made
a presumption running two functions, one nested
within another, would be slower than running
one function, sprintf.
Thank you Mr. Cook for testing this for me.
This is sincerely appreciated. I have learned
as others have learned. This is of good benefit,
thanks to your efforts.
Godzilla!
------------------------------
Date: Tue, 20 Jun 2000 20:52:11 GMT
From: aaronp243@my-deja.com
Subject: Re: Getting current working directory in perl script
Message-Id: <8iolhk$rmn$1@nnrp1.deja.com>
How about:
unshift(@INC, `pwd`);
Of course that is platform dependant.
In article <121d1f18.9981ce59@usw-ex0106-045.remarq.com>,
glchy <glchyNOglSPAM@cc21.com.sg.invalid> wrote:
> Hi,
>
> this is a simple question. I would like to get the current
> working directory in my perl script and unshift it in my @INC.
> Was thrown those codes:
>
> eval {
> ($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1");
> }
>
> Which does NOT seem to work as $0 contains only the name of the
> file.
>
> Im using Perl version 5.005_03 built for i386-linux and am on
> Linux.
>
> Thanks,
>
> GC.
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 18:56:23 GMT
From: bart.lateur@skynet.be (Bart Lateur)
Subject: Re: I need to get better at Perl
Message-Id: <394fbe33.7726903@news.skynet.be>
Drew Simonis wrote:
>2. If this group is so _un_helpfull_, why are ya here? It must have
> at least one good point, eh?
It exists.
You won't improve the atmosphere in a newsgroup by staying away.
--
Bart.
------------------------------
Date: Tue, 20 Jun 2000 19:40:58 GMT
From: felrodian@my-deja.com
Subject: Re: IDE for perl?
Message-Id: <8iohc7$oec$1@nnrp1.deja.com>
I
> >Can anyone recommend me a good integrated development environment
(i.e.
> >editor+debugger)for perl? I am interested in both commercial and
shereware products.
>
> It's a shame that you're only interested in commercial or shareware
> products, as that stops me from recommending Emacs (or Xemacs) which,
> IMO, is the best editor/debugger for Perl (or most other languages).
> Unfortunately for you, it's neither a commercial product nor
> shareware, but open source (or free) software.
>
> If you get over your requirement to pay for your software then I would
> suggest you check it out at <http://www.gnu.org> or
> <http://www.xemacs.org>.
Nicely put, Dave. I thought the same thing when I saw "shareware".
Nick Finzer,
Defender of Freedom.
In response to the orignal question, if you plan on using a real OS
(Linux) and want to use perl to make graphical programs usint GTK+,
glade is a nice IDE for making the GUI and can work with perl, C, and
others.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 19:46:28 GMT
From: felrodian@my-deja.com
Subject: Re: IDE for perl?
Message-Id: <8iohme$oj0$1@nnrp1.deja.com>
> Can anyone recommend me a good integrated development environment
The best environment for developing (and everything else) would be
Linux. For the integration part, true perl (none of that `Active' crap)
is included, and you have great editors like emacs. Unfortunately for
you it is niether commercial (assuming you meant proprietary, because it
is commercial in certain distros, www.redhat.com, also my distro of
choice. Check gnu.org and build your vocab better.) nor shareware. It is
free. http://www.gnu.org
Nick Finzer
Defender of Freedom
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
Date: Tue, 20 Jun 2000 14:10:43 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Is there a dos htm enviroment for perl ?
Message-Id: <394FB3A3.2B99B879@attglobal.net>
smile773 wrote:
>
> Is there a dos html enviroment that I can input data from ?
>
> I would like to use cgi dynamic htm to get info from so that
> the perl script writes the info.dat ?
Start over cookie. What exactly are you trying to accomplish.
Speak slowly so the peanut gallery won't miss a word. Gather
your thoughts first.
Then, think... is this a Perl question, or a CGI question or
an HTML question or a question about web servers.
There are distinct groups for each of these categories, so make
your choice carefully. Once you decide, look through that news-
group and see if there is an FAQ posted. There often is. If
you find one, read it _carefully_. Check Deja or another search
engine for news and see if this question has already been answered.
So many tools available _may_ boggle your mind. If so, sit back
and relax. Then resume your effort. You will find that so much
of what you seek has already been sought, and you can gleen from
previous efforst much more quickly than if you embarked upon an
effort of your own.
Now go, little bird. And have a nice trip.
------------------------------
Date: Tue, 20 Jun 2000 20:55:03 GMT
From: "smile773" <smile773@bigfoot.com>
Subject: Re: Is there a dos htm enviroment for perl ?
Message-Id: <HSQ35.10658$Uw3.697561@bgtnsc04-news.ops.worldnet.att.net>
Drew Simonis
I am offended by your comment:
Now go, little bird. And have a nice trip.
You have an inflated opinion about yourself
tweak tweak
------------------------------
Date: Tue, 20 Jun 2000 17:04:06 -0400
From: Drew Simonis <care227@attglobal.net>
Subject: Re: Is there a dos htm enviroment for perl ?
Message-Id: <394FDC46.3C15B3F7@attglobal.net>
smile773 wrote:
>
> Drew Simonis
> I am offended by your comment:
> Now go, little bird. And have a nice trip.
>
> You have an inflated opinion about yourself
> tweak tweak
I do not. I was being bored. Sorry to offend.
------------------------------
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 3432
**************************************