[8948] in Perl-Users-Digest
Perl-Users Digest, Issue: 2566 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 12 12:09:56 1998
Date: Tue, 12 May 98 09:00:25 -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 Tue, 12 May 1998 Volume: 8 Number: 2566
Today's topics:
Re: A regex teaser that ALMOST works! (Kevin Reid)
Re: chdir-command <eike.grote@theo.phy.uni-bayreuth.de>
Re: Did 'do' find it's file.... <rootbeer@teleport.com>
Re: Does Perl have a IDE?I don't like command line. (Kevin Reid)
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Re: Does Perl have a IDE?I don't like command line. <keithmur@mindspring.com>
Help! Launching Perl from C <jzenyuh@mindspring.com>
Re: Help! Can't Pipe Runaway Error Messages <due@murray.fordham.edu>
Re: How to export constants in modules without C code (Ken Fox)
mo' url_param in CGI.pm <frankie@etsetb.upc.es>
newbie question <info@atig.fr>
Re: newbie question (Tina Marie Holmboe)
Re: password <rootbeer@teleport.com>
Re: Perl CGI problem... <rootbeer@teleport.com>
Perl for Non-programmers (was Re: Does Perl have a IDE? <upsetter@shore.net>
Perl for Non-programmers (was Re: Does Perl have a IDE? <upsetter@shore.net>
Re: Perl for Non-programmers (was Re: Does Perl have a (Mark Maurer)
Re: Perl script on Internet Information Server <rootbeer@teleport.com>
sourcing a file in Perl <brhess@email.msn.com>
Re: sourcing a file in Perl (Brian Wheeler)
Re: tip for Solaris in PERL <steves@wco.com>
Re: What happenned to all the 1's. <rootbeer@teleport.com>
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 12 May 1998 11:26:59 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: A regex teaser that ALMOST works!
Message-Id: <1d8wx5l.rq2osj12ks9bqN@slip-32-100-246-98.ny.us.ibm.net>
Greg Bacon <gbacon@cs.uah.edu> wrote:
> Pointers aren't only efficient speedwise; they're also notationally
> efficient. Consider the difference between code like
>
> bump $pointer, $offset;
> $c = dereference $pointer;
>
> and code like
>
> *dst++ = *src++;
My pointer code does that!
$ostr = "ABCD";
$ptr = new CharPtr $ostr;
$ptr++;
print "2nd char is ", $ptr;
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Tue, 12 May 1998 17:00:45 +0200
From: Eike Grote <eike.grote@theo.phy.uni-bayreuth.de>
Subject: Re: chdir-command
Message-Id: <3558641C.41C6@theo.phy.uni-bayreuth.de>
Hi,
Annette Preissner wrote:
>
> Eike Grote wrote:
>
> > Hi,
> >
> > wizard wrote:
> > >
> > > Hi, can anybody tell me what's wrong with the following
> > > command in a perl program:
> > >
> > > chdir "$newsdir_alt" or die "Can't cd to $newsdir_alt: $!\n";
> > > $newsdir_alt is set correctly (I have its value printed
> > > just before the above command ... ), and if I type
> > > cd <value> on the shell, everything works just fine,
> > > but when I use the above command in my script, it
> > > keeps telling me that the value of $newsdir_alt does
> > > not exist ...
> >
> > You should check in which directory your script actually
> > runs. Insert
> >
> > print `pwd`."\n";
> >
> > just before your failing chdir. If the mentioned script
> > is to be run under UNIX check the permissions of the
> > sub-directory ("Are you allowed to go into the desired
> > directory?").
>
> Hi Eike, I checked this out ... actually, this doesn't seem
> to be the problem. print `pwd`."\n"; gives me the actual
> working directory (from where I call the script ... I don't
> change this directory in the code before calling chdir), and
> I DO have the permissions to go to the desired directory,
> and as I wrote in my first posting I CAN type cd <desired
> directory> on the shell and it works ...
Hmm... let's see what else can be done ... try out the
following (using opendir(),...):
#!/usr/local/bin/perl -w
$newsdir = 'testdir'; ### replace with your dir name
print `pwd`."\n";
opendir(DIR,'.') or die "Cannot open '.': $!\n";
@files = readdir(DIR);
closedir(DIR);
foreach $file (@files) {
if(-d $file) { print "Directory: $file\n" }
}
closedir(DIR);
opendir(DIR,$newsdir) or die "Cannot open $newsdir: $!\n";
@files = readdir(DIR);
closedir(DIR);
print "\@files = @files\n";
This shows all the files Perl can "see" in the current directory
(check if the desired one is being printed), and afterwards tries
to read the contents of $newsdir. Maybe this gets you one step
further ... if you still have problems you should post the real
output (error messages) of your code.
Bye, Eike
--
=======================================================================
>>--->> Eike Grote <eike.grote@theo.phy.uni-bayreuth.de> <<---<<
-----------------------------------------------------------------------
Home Page, Address, PGP,...: http://www.phy.uni-bayreuth.de/~btpa25/
-----------------------------------------------------------------------
PGP fingerprint: 1F F4 AB CF 1B 5F 4B 1D 75 A1 F9 C5 7B 3F 37 06
=======================================================================
------------------------------
Date: Tue, 12 May 1998 15:49:45 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Sarah Hluchan <hluchan@csi.com>
Subject: Re: Did 'do' find it's file....
Message-Id: <Pine.GSO.3.96.980512084710.21974r-100000@user2.teleport.com>
On Mon, 11 May 1998, Sarah Hluchan wrote:
> do "bogus filename";
> die $@ if $@;
You probably want 'require' instead of 'do', since the former will do
error checking for you. But if you can ensure that the file you will 'do'
returns a true value, you can check it yourself:
die "Didn't get a true value" unless do "bogus filename";
> I like that "do" will search @INC for me, and I may want to "do"
> the same file a few times & have it parsed each time.
You can still use 'require' for that, if you fix %INC when you want to
re-do a file. Of course, you still need to ensure that the file will
return a true value. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 12 May 1998 11:24:50 -0400
From: kpreid@ibm.net (Kevin Reid)
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <1d8vlqy.e1xil01v1oakcN@slip-32-100-246-98.ny.us.ibm.net>
Matthias Neeracher <neeri@iis.ee.ethz.ch> wrote:
> My own experience with MacPerl has been rather mixed. It seems to me that
> an IDE would consist mainly of three components:
>
> a) A text editor optimized toward perl.
> b) A graphical debugger frontend.
> c) An integrated help system.
>
> My experience was that (a) is essentially impossible. People are going to
> prefer their normal editor over any editor written "for perl", especially
> since the difficulty of parsing perl makes any possibility of value added
> service quite limited.
While I agree that syntax coloring is not something that can be done
well for Perl, I think that you've already done a lot by simply having a
text editor built into MacPerl.
However, it would be nice if either:
1. The Jump To... item, when no text is selected, would bring up a
dialog box asking for a line number to jump to, OR
2. The editor window optionally showed line numbers.
Also, it woulld be nice if there was some way of adding to the items
that Cmd-H recognizes so that, say, if I wrote a module I can set it up
so that if I select the module's name and press Cmd-H, the module's POD
comes up in Shuck, like it does for the standard modules.
--
Kevin Reid. | Macintosh.
"I'm me." | Think different.
------------------------------
Date: Tue, 12 May 1998 10:55:22 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <355870EA.33A305D8@mindspring.com>
I R A Aggie wrote:
[cut]
>
> And I've come around to the point of view that perl is a miserable for
> people who've never programmed before.
>
Oh, I thought maybe that *helped*, given Perl's idiosyncrasies. :-)
------------------------------
Date: Tue, 12 May 1998 10:53:16 -0500
From: "Keith G. Murphy" <keithmur@mindspring.com>
Subject: Re: Does Perl have a IDE?I don't like command line.
Message-Id: <3558706C.75FCE844@mindspring.com>
Ken Williams wrote:
>
> In article <8csomg9whr.fsf@gadget.cscaper.com>, Randal Schwartz
> <merlyn@stonehenge.com> wrote:
>
> >>>>>> "Ken" == Ken Williams <ken@forum.swarthmore.edu> writes:
> >
> >Ken> The point is that beginners often lack some basic concepts that never
> >Ken> would have occurred to the people that wrote the man pages. Check out the
> >Ken> beginning of the LLama book, it has a quote by Randal (I think) saying
> >Ken> something like "I didn't learn English by reading the dictionary, and
> >Ken> likewise I didn't learn to program by reading books and man pages." Or
> >Ken> something like that.
> >
> >That's not the llama book... that's in the preface I wrote to
> >"Effective Perl Programming", full text available online at
> >
> > http://www.effectiveperl.com/preface.html
>
> Oops... sorry, my mistake. I actually bought those two books together
> last week. An unlikely combination, I know... =)
Not very unlikely, apparently, as I have it too (well, Gecko rather than
Llama; I'm one of those nasty Windows programmers). Seems like the
Gecko got me started pretty well and I needed something for a little
added insight. And the Camel seems to overlap a lot with the man/html
pages, so I skipped that. Am I missing a lot?
By the way, I *love* Effective Perl Programming, though I've noticed a
couple of errors so far...
------------------------------
Date: Tue, 12 May 1998 11:04:02 -0400
From: "John Zenyuh" <jzenyuh@mindspring.com>
Subject: Help! Launching Perl from C
Message-Id: <6j9od5$rri$1@camel19.mindspring.com>
[Disclaimer: I've read O'Reilly, man pages (perlembed,
perlxs, and perlguts), and FAQ page and I'm still at a
loss......]
I'm trying to launch a Perl file validation routine from a
'C' process. My 'C' process is initiated via cron daemon to
automatically ftp files to the local server, check security
codes, and decrypt them before calling the file validation
routine.
I can launch the Perl script as long as I start the 'C' process
via command line with the Perl script filename included. I
can't write a straight "int main(void)" because proto.h has
prototyped main() to be "int main(int argc, char ** argv,
char **env)".
Even if I get around this problem, perl_parse() is expecting
a char **. Is there a way to identify the script::module via
perl_call_pv()?
I appreciate any suggestions you might have.
John Zenyuh
------------------------------
Date: 12 May 1998 15:32:36 GMT
From: "Allan M. Due" <due@murray.fordham.edu>
Subject: Re: Help! Can't Pipe Runaway Error Messages
Message-Id: <6j9q2k$36$0@206.165.146.175>
Easy answer use: >. At the prompt type perl script.pl > filename.ext
and your output will be written to the file.
A less simple but, to my way of thinking, preferable answer: Some
editors allow you to run commands internally. I use Ultraedit which allows
you to run Perl from within the editor and then capture the output to either
a new file or a listbox. I find it much easier to edit my scripts this way
as I don't have to keep opening and closing files or move back and forth
between windows. UE also lets you run your default browser from within the
editor so you can check how your CGI scripts are working all from within the
same environment. You can even add a run Perl button to your UE task bar so
you just click the button and check the output. Either the listbox or new
file option lets you scroll through the output from Perl very easily.
HTH
Allan M. Due
Due@discovernet.net
Admin@WhiteCrow.net
The beginning of wisdom is the definitions of terms.
- Socrates
------------------------------
Date: 12 May 1998 15:46:36 GMT
From: kfox@pt0204.pto.ford.com (Ken Fox)
Subject: Re: How to export constants in modules without C code
Message-Id: <6j9qss$cgu1@eccws1.dearborn.ford.com>
"Keith G. Murphy" <keithmur@mindspring.com> writes:
> Ken Fox wrote:
> > Use @EXPORT and prototyped subroutines:
> >
> > package my_module;
> > require Exporter;
> > @ISA = qw(Exporter);
> > @EXPORT = qw(ERR_NOT_FOUND);
> > sub ERR_NOT_FOUND () { 47 }
> >
>
> Or, if you don't mind the "$", and would like to avoid the subroutine
> call, try:
>
> > package my_module;
> > require Exporter;
> > @ISA = qw(Exporter);
> > @EXPORT = qw($ERR_NOT_FOUND);
> > $ERR_NOT_FOUND = 47;
Careful with the quotes please! I didn't write that second quote...
You almost always want to use contant-valued subroutines for
constants. Perl in-lines them so they're very efficient. Lots of
people think they look cleaner than variables too.
You do raise a good point though -- there are lots of ways to
implement constants. The POSIX module uses AUTOLOAD with a trie
lookup to dynamically create "constant" subroutines. I think this
technique defeats Perl's subroutine in-lining capability though.
Using regular scalar variables (or hash entries) isn't a good
technique IMHO. It's too easy to "accidentally" over-write the
constant from user code:
if ($my_module::ERR_NOT_FOUND = $return_code) {
...
}
That's a pretty common syntactic error that can be eliminated if
(non-lvalue!) subroutines are used for constants.
- Ken
--
Ken Fox (kfox@ford.com) | My opinions or statements do
| not represent those of, nor are
Ford Motor Company, Powertrain | endorsed by, Ford Motor Company.
Analytical Powertrain Methods Department |
Software Development Section | "Is this some sort of trick
| question or what?" -- Calvin
------------------------------
Date: Tue, 12 May 1998 17:10:42 +0200
From: Francesc Guasch <frankie@etsetb.upc.es>
Subject: mo' url_param in CGI.pm
Message-Id: <35586672.F7AFEDDE@etsetb.upc.es>
I'm using CGI.pm and I have a cgi that displays a form
and accepts its input using the
if (param()) clause
I wanted to pass some parameters to that cgi , so I
tried url/cgi.pl?param=value
I read the param with url_param('name')
but I thought the if (param()) wouldn't notice the one
I put in the url. I saw in the docs that url_params and
params never mix.
I solved it doing :
if (param('one param I use) ne '') {
instead of
if (param())
but I wonder if there is a better way because that fails when
someone doesn't put anything int the 'one param I use'
--
^-^.-----, mailto:frankie@etsetb.upc.es
o o _ ) http://www.etsetb.upc.es/~frankie
Y (_, (__(Ssss
------------------------------
Date: Tue, 12 May 1998 17:21:19 +0200
From: "sg" <info@atig.fr>
Subject: newbie question
Message-Id: <6j9plk$bu6$1@minus.oleane.net>
hello everybody :)
* a newbie question :
is it possible to make an array of words which are separated with "," (for
example) in a string ??
ex :
$string="word1,word2,word3,word4";
i want to do the following thing :
@words=(word1,word2,word3,word4);
* another question : where could i found a complete documentation about the
"split" fonction???
thanks you very much to answer me
sg
info@atig.fr
------------------------------
Date: 12 May 1998 15:33:49 GMT
From: tina@scandinaviaonline.se (Tina Marie Holmboe)
Subject: Re: newbie question
Message-Id: <6j9q4t$9kk$1@news1.sol.no>
In article <6j9plk$bu6$1@minus.oleane.net>,
"sg" <info@atig.fr> writes:
> is it possible to make an array of words which are separated with "," (for
> example) in a string ??
>
> ex :
> $string="word1,word2,word3,word4";
>
> i want to do the following thing :
> @words=(word1,word2,word3,word4);
You want, in other words, to take string $string and split the contents of
it into an array, using "," as the character to split on ?
Well, then
@words = split(/,/, $string) ;
is what you are looking for - given that no word contains a ",", that is.
If it is, it gets a wee bit more complex.
> * another question : where could i found a complete documentation about the
> "split" fonction???
The perlfunc man-page is a good place for that. Good luck!
--
Tina Marie Holmboe
Application Developer (Geeks'R'Us) [tina@tech.scandinaviaonline.se]
Scandinavia Online AB Development Dept. (+46) 08 587 81000 (switchboard)
(+46) 08 587 81189 (direct)
------------------------------
Date: Tue, 12 May 1998 15:41:55 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Miu Alex Wong <miuwong@blue.seas.upenn.edu>
Subject: Re: password
Message-Id: <Pine.GSO.3.96.980512083918.21974p-100000@user2.teleport.com>
On 12 May 1998, Miu Alex Wong wrote:
> Subject: password
Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.
http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
> I need to have users type in their telnet account login name and passwd
> on the web and check them against the master password file see whether
> they have typed in the correct one, is there any way to do that.
If your server's docs can't help you to answer this question, people in a
newsgroup about your server may be able to. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 12 May 1998 15:54:49 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: bentzen@forum.dk
Subject: Re: Perl CGI problem...
Message-Id: <Pine.GSO.3.96.980512085324.21974t-100000@user2.teleport.com>
On Tue, 12 May 1998 bentzen@forum.dk wrote:
> my $insert_this = "This is the new line of text to be inserted";
>
> What if $insert_this should be a variabel I have earlier in the code
> (from a form)????
Then you should use that other value instead. (Are you asking something
else? With all of those question marks, it would certainly seem so! :-)
Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 May 1998 15:02:15 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6j9o9n$meh@fridge.shore.net>
I R A Aggie <fl_aggie@thepentagon.com> wrote:
: And I've come around to the point of view that perl is a miserable for
: people who've never programmed before.
I think you may have a point here. Last fall I taught a course in "CGI
Programming in Perl" to a bunch of experienced programmers (mostly
database programmers from a big bank). They picked it up very quickly --
for example, once I explained what a hash was, they could (as programmers)
immediately think of uses for them.
By contrast, I taught the same course recently to a bunch of
non-programmers (the fault of the school; I didn't realize the
prerequisites for the course had changed) and they were pretty lost. I
think that part of the problem is that Perl gives you all sorts of useful
shortcuts that programmers tend to want (e.g. <command> if <condition>
stynax, the $_ variable, the @_ variable) but which might overwhelm a
non-programmer. A programmer will understand intuitively what a foreach
loop is, so it makes sense that you could have a temporary variable to
store each value, but throwing it all at a non-programmer at once is a
little too much.
Truth be told, I was unprepared myself because I didn't realize until I
showed up the first day that the composition of the class was going to be
markedly different from the first class I taught, but nonetheless, I think
there may be some validity in the view that Perl is hard for
non-programmers to grasp.
--Art
National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html
------------------------------
Date: 12 May 1998 15:01:54 GMT
From: Art Cohen <upsetter@shore.net>
Subject: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6j9o92$lat@fridge.shore.net>
I R A Aggie <fl_aggie@thepentagon.com> wrote:
: And I've come around to the point of view that perl is a miserable for
: people who've never programmed before.
I think you may have a point here. Last fall I taught a course in "CGI
Programming in Perl" to a bunch of experienced programmers (mostly
database programmers from a big bank). They picked it up very quickly --
for example, once I explained what a hash was, they could (as programmers)
immediately think of uses for them.
By contrast, I taught the same course recently to a bunch of
non-programmers (the fault of the school; I didn't realize the
prerequisites for the course had changed) and they were pretty lost. I
think that part of the problem is that Perl gives you all sorts of useful
shortcuts that programmers tend to want (e.g. <command> if <condition>
stynax, the $_ variable, the @_ variable) but which might overwhelm a
non-programmer. A programmer will understand intuitively what a foreach
loop is, so it makes sense that you could have a temporary variable to
store each value, but throwing it all at a non-programmer at once is a
little too much.
Truth be told, I was unprepared myself because I didn't realize until I
showed up the first day that the composition of the class was going to be
markedly different from the first class I taught, but nonetheless, I think
there may be some validity in the view that Perl is hard for
non-programmers to grasp.
--Art
National Ska/Reggae Calendar: www.ziplink.net/~upsetter/ska/calendar.html
Boston Ska Home Page: www.ziplink.net/~upsetter/ska/index.html
------------------------------
Date: 12 May 1998 11:48:41 -0400
From: mwmaurer@mtu.edu (Mark Maurer)
Subject: Re: Perl for Non-programmers (was Re: Does Perl have a IDE?I don't like command line.
Message-Id: <6j9r0p$8ni$1@pace1.cts.mtu.edu>
Art Cohen (upsetter@shore.net) wrote:
: I R A Aggie <fl_aggie@thepentagon.com> wrote:
:
: : And I've come around to the point of view that perl is a miserable for
: : people who've never programmed before.
:
: I think you may have a point here. Last fall I taught a course in "CGI
: Programming in Perl" to a bunch of experienced programmers (mostly
: database programmers from a big bank). They picked it up very quickly --
: for example, once I explained what a hash was, they could (as programmers)
: immediately think of uses for them.
:
: By contrast, I taught the same course recently to a bunch of
: non-programmers (the fault of the school; I didn't realize the
: prerequisites for the course had changed) and they were pretty lost. I
: think that part of the problem is that Perl gives you all sorts of useful
: shortcuts that programmers tend to want (e.g. <command> if <condition>
: stynax, the $_ variable, the @_ variable) but which might overwhelm a
: non-programmer. A programmer will understand intuitively what a foreach
: loop is, so it makes sense that you could have a temporary variable to
: store each value, but throwing it all at a non-programmer at once is a
: little too much.
:
: Truth be told, I was unprepared myself because I didn't realize until I
: showed up the first day that the composition of the class was going to be
: markedly different from the first class I taught, but nonetheless, I think
: there may be some validity in the view that Perl is hard for
: non-programmers to grasp.
To this I would have to say -- "No kidding." I think any programming
language would be hard to grasp if the would be programmer doesn't know the
first thing about for loops and such...
I think it could be wise to throw Perl in with C as a language NOT to teach
to an aspiring programmer first...
--
Mark Maurer markm@dct.com mwmaurer@mtu.edu
Programmer, Digital Magic Interactive http://www.dminteractive.com
Senior, Michigan Technological University Houghton, MI
-- Views do not represent those of my employer or school
------------------------------
Date: Tue, 12 May 1998 15:53:08 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Silvana Gsmez <silvana@ptg.es>
Subject: Re: Perl script on Internet Information Server
Message-Id: <Pine.GSO.3.96.980512085205.21974s-100000@user2.teleport.com>
On Tue, 12 May 1998, Silvana G=F3mez wrote:
> I have NT 4.O and IIS v. 2.0 and I want executing perl scripts from my
> html pages but I can=B4t. I don=B4t know how to do it. Do I have to
> configure IIS to execute perl scripts?
If the manual for your server doesn't help you to answer this question,
you should get a new one. But the people in a newsgroup about your server
(or that newsgroup's FAQ) may be able to help. Good luck!
--=20
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Tue, 12 May 1998 11:39:45 -0400
From: "Bill Hess" <brhess@email.msn.com>
Subject: sourcing a file in Perl
Message-Id: <e33Lu0bf9GA.328@upnetnews03>
How does one 'source' a file in Perl?
I have tried to use Shell(source); and that has not worked.
Bill Hess
brhess@msn.com
------------------------------
Date: 12 May 1998 15:52:39 GMT
From: bdwheele@indiana.edu (Brian Wheeler)
Subject: Re: sourcing a file in Perl
Message-Id: <6j9r87$kkj$1@flotsam.uits.indiana.edu>
In article <e33Lu0bf9GA.328@upnetnews03>,
"Bill Hess" <brhess@email.msn.com> writes:
> How does one 'source' a file in Perl?
> I have tried to use Shell(source); and that has not worked.
>
> Bill Hess
> brhess@msn.com
>
>
'require' will do what you want (its in the docs...)
Brian Wheeler
bdwheele@indiana.edu
------------------------------
Date: Tue, 12 May 1998 08:37:08 -0700
From: Steven Smith <steves@wco.com>
Subject: Re: tip for Solaris in PERL
Message-Id: <35586CA3.8DF95E00@wco.com>
Thanks Jim! I'm logging onto your web page right now.
Steve S.
jim@buttafuoco.mv.comNOSPAM wrote:
> Steven,
>
> Check out my web page at http://www.mv.com/ipusers/buttafuoco/perl. I have written a 'tip' like program call perlterm. Let me know if you need any help with it.
>
> Jim
>
> Steven Smith <steves@wco.com> wrote:
> : Does anyone know of a version of tip written in perl??
>
> : Thanks
> : Steve Smith
> : DSC Communications
> : Petaluma, CA 95404
>
> --
> ****************************************************************************
> Jim Buttafuoco Senior Unix Consultant
> Perl Hacker email: jim@buttafuoco.mv.com
> Linux Fan web: http://www.mv.com/ipusers/buttafuoco
> ****************************************************************************
------------------------------
Date: Tue, 12 May 1998 15:45:29 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Leon Stepanian <info@purco.qc.ca>
Subject: Re: What happenned to all the 1's.
Message-Id: <Pine.GSO.3.96.980512084415.21974q-100000@user2.teleport.com>
On Tue, 12 May 1998, Leon Stepanian wrote:
> open(MAINFILE, "$basedir/accespage.txt");
Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
> @mainpage=split(s/SCBDOPL/$FORM{accesscode}/, $_);
I don't think that's what you want. Check the docs for split. Hope this
helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
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 2566
**************************************