[8636] in Perl-Users-Digest
Perl-Users Digest, Issue: 2253 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 5 14:07:29 1998
Date: Sun, 5 Apr 98 11:00:34 -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 Sun, 5 Apr 1998 Volume: 8 Number: 2253
Today's topics:
Re: Can perl open text files? (Abigail)
Re: changing perms w/CHMOD. (Andrew M. Langmead)
Re: chdir in UNIX: problem with the ~ (Abigail)
Re: chdir in UNIX: problem with the ~ <sneaker@mediaone.net>
Re: chdir in UNIX: problem with the ~ (Jason Gloudon)
Re: chdir in UNIX: problem with the ~ <sneaker@mediaone.net>
Re: Conversion of Excel file to Text file <matt@whiterabbit.co.uk>
Re: Conversion of Excel file to Text file (Jonathan Stowe)
Re: Getting the PATH Correct When Running Perl in a Win (Jonathan Stowe)
Re: Hangman <jdf@pobox.com>
Re: How do I strip newlines from a var gwynne@utkux.utk.edu
Re: How do I strip newlines from a var (Joergen W. Lang)
Re: How do you put a string into a array? (Jason Gloudon)
how to precompile scripts or speed them up? <captain@pirate.de>
Re: how to precompile scripts or speed them up? <sfarrell+usenet@farrell.org>
How to Upgrade Perl? (M.EFE)
Re: How to Upgrade Perl? (Jonathan Stowe)
Re: Increment [++] ne Assignment-add [+=] (Mark-Jason Dominus)
Re: perl linux database program? (John Armsby)
Re: Please Help me with print data in HTML mode..CGI (Abigail)
Re: Purify Run on Perl5.004_04 Solaris 2.5.1(sparc) (Andrew E Page)
Re: reading file permissions (Jonathan Stowe)
Re: RMS should be invited to O'Reilly's "Free Software <shutkoa@ug.eds.com>
Re: RMS should be invited to O'Reilly's "Free Software (Nathan V. Patwardhan)
Re: RMS should be invited to O'Reilly's "Free Software <kevin@parsley.faxinter.com>
Running a perl script with root privilges <ct@tschirky.ch>
Re: Running a perl script with root privilges (Jonathan Stowe)
Re: Urgent: Perl Win32 vs Unix Perl (J. Probert)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Apr 1998 10:56:11 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Can perl open text files?
Message-Id: <6g7o0b$54d$1@client3.news.psi.net>
Skyward Communications (skyward@frognet.net) wrote on MDCLXXVIII
September MCMXCIII in <URL: news:6g6th2$jm4@netaxs.com>:
++ The perl aspect is this.
++
++ <form action="/cgi-bin/program.pl" method="POST">
++ <input type="Radio" name="document" value="textfile1.txt">
++ <input type="Radio" name="document" value="textfile2.txt">
That is not Perl, that's HTML.
++ What is returned to the user is this:
++ <html>
That is not Perl, that's HTML.
++ I hope this make clear what I need. I know the HTML code to be returned to
++ the user would be written by the perl program. I can do that. What I need
++ to know is how to get perl to open the text file requested and read it into
++ the HTML that I will print via the perl program (in this case "program.pl")
Let me repeat what I said:
++ >So, what's the perl aspect of this question? How to open a file?
++ >RFTM. How to write to a file? RTFM. How to write to standard
++ >output? RTFM.
Or is there anything else you want to do?
Abigail
--
perl -wle 'print "Prime" if (1 x shift) !~ /^1?$|^(11+?)\1+$/'
------------------------------
Date: Sun, 5 Apr 1998 15:26:18 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: changing perms w/CHMOD.
Message-Id: <Eqy5Ju.21q@world.std.com>
Larry Rosler <lr@hpl.hp.com> writes:
>M.J.T. Guy wrote:
>> (assuming a Unix platform - otherwise set the path separator accordingly).
>>
>...
>This is not sound advice. The forward-slash directory separator works
>fine using Perl on all platforms. The back-slash works on some
>platforms only, and requires noise-polluting extra escapes.
It does not work on _all_ platforms. Just the operating systems that
allow a forward slash as a directory separator. (Unix, MS-DOS
(including the MS-DOS that is supplied with Windows '95,) and Windows
NT)
Perl does no interpretation of pathnames, and leaves it to the
underlying operating system. The most obvious example is the Macintosh
in which the ":" character is the path separator and a leading ":"
signifies a relative, not an absolute path.
Yes, in most cases it is easier to use the alternate path separator
("/", the forward slash) on MS-DOS and Windows platforms, but
interaction with the filesystem is inherently a non-portable task.
--
Andrew Langmead
------------------------------
Date: 5 Apr 1998 10:59:20 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <6g7o68$54d$2@client3.news.psi.net>
Sergey Alexandrov (serge1@eden.rutgers.edu) wrote on MDCLXXVII September
MCMXCIII in <URL: news:35265C09.1ACC@eden.rutgers.edu>:
++ I can't get the chdir funciton to work when the expression starts with
++ the ~ used in UNIX for home directories (ex. chdir("~bob/home))
~ is not a unix thing. ~ is expanded by the _shell_.
chdir doesn't use the shell.
Abigail
--
perl -wle\$_=\<\<EOT\;y/\\n/\ /\;print\; -eJust -eanother -ePerl -eHacker -eEOT
------------------------------
Date: Sun, 05 Apr 1998 14:59:49 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <35279AEC.3996@mediaone.net>
Russ Allbery wrote:
> Yes. ~-expansion is done by your shell for you, and Perl doesn't send
> chdir() calls through a shell. You'll need to do ~-expansion yourself.
>
> Something along the lines of the following should be approximately correct
> (but is mostly untested, so use at your own risk):
>
> sub untwiddle {
> my $path = shift;
> return $path unless (index ($path, '~') == 0);
> $path =~ s%^~([^/]*)%%;
> my $user = $1;
> my $home;
> if ($user) {
> $home = (getpwnam $user)[7];
> } else {
> $home = $ENV{HOME} || (getpwuid $<)[7];
> }
> defined $home ? $home . $path : undef;
> }
>
> I'm sure that there are also modules on CPAN that will do that sort of
> thing for you.
>
> --
> #!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
> $^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
> 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
> rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
That was very nice of you :-) You could have blasted the poster out of
existence, but you choose not too
I send thanks from Newbies everywhere :-)
Bill
(aka Sneex :-)
------------------------------
Date: Sun, 05 Apr 1998 15:44:11 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <slrn6if9hb.j1n.jgloudon@manitoba.bbn.com>
Sneaker's Nest <sneaker@mediaone.net> wrote:
.
.
>That was very nice of you :-) You could have blasted the poster out of
>existence, but you choose not too
>
>I send thanks from Newbies everywhere :-)
>
>Bill
>(aka Sneex :-)
*Sigh*. Why haven't I been thanked for my charity ?
Unless you're going to followup on charitable responses to _every_ FAQ
post, this is really just a bit ridiculous.
--
Jason Gloudon
------------------------------
Date: Sun, 05 Apr 1998 15:59:14 GMT
From: Sneaker's Nest <sneaker@mediaone.net>
Subject: Re: chdir in UNIX: problem with the ~
Message-Id: <3527A8D7.58EE@mediaone.net>
Jason Gloudon wrote:
>
> Sneaker's Nest <sneaker@mediaone.net> wrote:
> .
> .
> >That was very nice of you :-) You could have blasted the poster out of
> >existence, but you choose not too
> >
> >I send thanks from Newbies everywhere :-)
> >
> >Bill
> >(aka Sneex :-)
>
> *Sigh*. Why haven't I been thanked for my charity ?
> Unless you're going to followup on charitable responses to _every_ FAQ
> post, this is really just a bit ridiculous.
>
> --
> Jason Gloudon
I am sorry, you're absolutely right!
I will refrain from thanking everyone.
OK, for all who will not flame a newbie during April,
THANK YOU! :-)
PS - Jason deserves special thanks for not
blasting me for my Thank You post :-)
I appreciate it :-)
------------------------------
Date: Sun, 05 Apr 1998 17:34:13 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
Subject: Re: Conversion of Excel file to Text file
Message-Id: <3527B285.5320BD8@whiterabbit.co.uk>
Try saving the important bit of the file as a .csv file (Comma
delimited), and working with that.
M Shakeel Qureshi wrote:
>
> Hello guys,
>
> If it is possible to convert excel file to plain text file using perl.
> If yes then How ?
>
> Regards,
> *Shakeel
--
Best Wishes
Matt Pryor
White Rabbit Promotions
Visit us at http://www.whiterabbit.co.uk today!
------------------------------
Date: Sun, 05 Apr 1998 05:51:03 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Conversion of Excel file to Text file
Message-Id: <3527181b.106241537@news.btinternet.com>
On Sun, 05 Apr 1998 17:34:13 +0100, Matt Pryor
<matt@whiterabbit.co.uk> wrote:
>Try saving the important bit of the file as a .csv file (Comma
>delimited), and working with that.
>
An interesting thought occurred to me over this. I was thinking about
replying regarding the use of VBA to make such an export easier
(precluding any discussion of Win32::OLE which is probably the most
popular solution), then my thoughts turned back to Perl.
Given that ActiveState have got a Perl Scripting engine for MicroScoff
Internet products would it be possible to ShoeHorn in an altered
version of this into the Office products as a replacement for VBA and
then Hey replace the language engine in the full Visual Basic and
then.... aargh gurgle
Forget I spoke
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sun, 05 Apr 1998 05:08:40 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Getting the PATH Correct When Running Perl in a Windows Environment Part II..
Message-Id: <3526e600.93669589@news.btinternet.com>
On 5 Apr 1998 01:54:53 GMT, "Sam Garten"
<GartenGroup@worldnet.att.net> wrote:
>
>
>4/4/98
>
>Friends - so far no one has responded to my initial concern..
>
> I'm reading "Programming Perl" by Larry Wall, et. al. and in
>the preface it
> is written, "Perl folks are, frankly, some of the most
>helpful folks on earth.".
>
Err, quite so. But hey, Sam, can't you fix this terrible wrapping:
its giving me a headache.
> So where's the help... As stated in my previous message I now
>have Perl installed
> on my machine but can not run any programs because I can't
>get the PATH right.
> How do you point to both my program (source code) and the
>Perl interpreter so the
> job will run successfully??
([Aside to crowd] The word *job* betrays your mainframe sensibility
:-))
>
First step is to check your PATH environment setting by typing (err)
PATH at the MS-DOS Prompt you may get something like :
PATH=.;C:\DEVELOP\BIN;C:\OPENDOS;C:\BIN;C:\WINDOWS;C:\DIAMOND;C:\WATCOM\BINW;C:\;C:\BTINTNET
The first item points to the current working directory, the second is
where my perl executable is. And so on.
Now in the file C:\autoexec.bat you may have a line that looks a bit
like the above. You need to establish the directory where *your* perl
executable is (I cant help you here I'm afraid). Once you have done
that you need to edit your autoexec.bat to add that directory to your
PATH. You can add a line like:
PATH=C:\PERL\BIN;%PATH%
to the file after any other PATH statement. You might also want to
add "." (dot: the current directory) as the first entry or another
directory where your scripts might be. This will not take effect
until you have reloaded (sorry, rebooted: too much hanging around with
mainframe types) your machine.
You might be tempted (or advised) to do a similar procedure within a
command prompt - this will work for that command prompt only as the
changes to that command prompt's environment will not be reflected in
any others.
Now if you happen to be in a Novell Network all bets on the above are
off because the network gauleiter may well set the path with the
system login script without any regard for what you may have set. If
this is is the case you can if you are allowed add directories to your
path in your Personal Login script ( I Leave it as an exercise how to
get that - partially because it is different between NW 3.1* and 4.* )
with something like:
MAP INS S6:=C:\perl\bin
; The path where perl lives
MAP INS S7:=C:\develop
; The path where your scripts reside
In all of the above I have assumed that your perl executable and
libraries are installed in a path which has a sensible name without
any of those annoying spaces so prevalent in recent windows. If you
have installed in such a path then you really need to reinstall in a
sensible path..
Once you have got your path sorted and if you have the "Standard"
distribution of perl for Win32 you can use the script perl2bat to
encapsulate your perl scripts within a .BAT file which can be run from
the command line.
Having said all of that of course there must be a rub. Aye.
The hapless command interpreter that comes with win/95 is as they say
a bunch of crap. I have in recent days advocated the use of the
Cygnus port of the GNU shell several times and I will again. Using
this shell you can create your environment exactly as you wish and
also use the #! "shebang" line to run your scripts by name.
You might also want check out the wealth of excellent information that
can be found at www.perl.com ;-}
> Your help would be greatly appreciated.. I want to become a
>Perl Nik also...
>
"Perl Nik" Hmm. Perhaps that should be a separate thread...
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 05 Apr 1998 13:48:24 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: star@sonic.net
Subject: Re: Hangman
Message-Id: <ogyg9n2v.fsf@mailhost.panix.com>
~arthur <star@sonic.net> writes:
[posted and mailed]
> I am trying to find (or write) a hangman program. Not a cgi - just a
> perl hangman program. Can anyone help me. I am bringing it to a juvenile
> detention hall where there is no access to the web but they have
> computers in school.
Oh, why not?
#!/c/perl/bin/perl -w
use strict;
$|++;
use constant MAX_MISSES => 6;
my $words_file = shift or die "Please specify words file on command line.\n";
GAMES:
while (1) {
open(WORDS, "<$words_file") or die "Can't open $words_file: $!";
my $word;
rand($.) < 1 && ($word = $_) while <WORDS>;
close WORDS or die "Can't close $words_file: $!";
chomp $word;
my $misses_left = MAX_MISSES;
my %letters = map {$_ => 1} split //, $word;;
my %guesses = ();
GUESSES:
while ($misses_left) {
print "\n\n\nYou have guessed: ", join(' ', sort keys %guesses), "\n";
print "You have $misses_left misses left.\n\n";
print join(' ', map {exists $guesses{$_} ? $_ : '_'} split //, $word), "\n";
my $guess;
GET_GUESS:
{
print "\nGuess a letter: ";
chop($guess = lc <STDIN>);
if ($guess !~ /^[a-z]$/) {
print "Please enter a single letter guess.\n";
redo GET_GUESS;
}
if (exists $guesses{$guess}) {
print qq(You\'ve already guessed "$guess".\n);
redo GET_GUESS;
}
}
$guesses{$guess}++;
if (exists $letters{$guess}) {
delete $letters{$guess};
keys %letters or last GUESSES;
} else {
--$misses_left;
}
}
if ($misses_left) {
print "\nYou guessed it: $word!";
} else {
print qq(\nOops... you\'re hanged. The word was "$word.");
}
print "\n\n\nPlay again? (Y/N): ";
chop (my $again = <STDIN>);
last GAMES unless $again =~ /^y/i;
}
__END__
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
------------------------------
Date: Sun, 05 Apr 1998 09:05:03 -0600
From: gwynne@utkux.utk.edu
Subject: Re: How do I strip newlines from a var
Message-Id: <6g832g$egd$1@nnrp1.dejanews.com>
In article <6g141i$9cs$1@client3.news.psi.net>,
abigail@fnx.com wrote:
> Removing new lines is very tricky, as the manual tells you so.
> Ignore the complicated things in the manual, and put in this
> neat little trick:
>
> $var=join+q,,,grep{ord${qq$\137$}<10 or+10<ord}split+q,,,$var;
>
> If you're old enough not to read the manual, you won't have a
> problem understanding the above line.
>
> Abigail
> --
Dear Abby:
I'm going on 60, but I don' know enough about Perl to readily understand
your wizardry. I can understand tr/\n//d; it's straight-forward. So, in the
interest of serving the Greater Perl Community (which, inspite of your
protestations) includes us stupid, uninformed, illiterate newbies, you could
do us a great service by explaining the above obfuscation bit by bit. All of
us low-lifes would be much obliged and perhaps someday may be able to
approach the Perly Gates, perhaps even enter, and (forbid the thought) maybe
even sit at your feet. In other words, please explain what the hell it is all
about. We want enlightenment--NOW!!!
Bob Gwynne
**************
In the country of the blind, the one-eyed man is king.
Since I have only one eye, I think that's kinda cool. --me
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Sun, 5 Apr 1998 19:37:10 +0200
From: joergen.lang@schwaben.de (Joergen W. Lang)
Subject: Re: How do I strip newlines from a var
Message-Id: <1d70uis.1kogmen1s7pd9aN@host037-206.seicom.net>
<gwynne@utkux.utk.edu> wrote:
> We want enlightenment--NOW!!!
I've heard of a special offer at K-Mart. They have enlightenments in all
sizes and colors. Some even come in sixpacks. ;-)
The other way consists of years of practice and study...
Joergen
--
-------------------------------------------------------------------
"Everything is possible - even sometimes the impossible"
HOELDERLIN EXPRESS - "Touch the void"
-------------------------------------------------------------------
------------------------------
Date: Sun, 05 Apr 1998 15:39:09 GMT
From: jgloudon@manitoba.bbn.com (Jason Gloudon)
Subject: Re: How do you put a string into a array?
Message-Id: <slrn6if97t.j1n.jgloudon@manitoba.bbn.com>
Bob Gwynne <gwynne@utkux.utk.edu> wrote:
.
.
.
>@array = <FILE>;
>$string = join(' ', @array);
>$string =~ s/\n//g; #zap the newlines
>$string =~ s/[.',?]//g; #stuff you don't want
You could have used the tr operator you mentioned in a previous post,
$string =~ tr[.',?\n][]d;
>@array = split(/ /, $string);
>foreach $array (@array) { #just to check it out
> print $array, "\n";
>}
--
Jason Gloudon
------------------------------
Date: Sun, 05 Apr 1998 15:27:10 +0200
From: Mark Seuffert <captain@pirate.de>
Subject: how to precompile scripts or speed them up?
Message-Id: <352786AE.17B6@pirate.de>
Hi,
I would like to pre-compile perl scrips, to speed startup for a
specific CGI script (or another possibility: make the CGI build
into the Apache web server, how?).
Questions:
1. Is this a good solution, or is a perl compiler available
(making executables)?
2. Where do I find 'undump' (as mentioned in man perlrun) for my
Linux system?
>From 'man perlrun':
-u causes Perl to dump core after compiling your script.
You can then take this core dump and turn it into an
executable file by using the undump program (not
supplied). This speeds startup at the expense of
some disk space (which you can minimize by stripping
the executable). (Still, a "hello world" executable
comes out to about 200K on my machine.) If you want
to execute a portion of your script before dumping,
use the dump() operator instead. Note: availability
of undump is platform specific and may not be
available for a specific port of Perl.
--
/Mark (please email also)
------------------------------
Date: Sun, 5 Apr 1998 14:19:07 GMT
From: stephen farrell <sfarrell+usenet@farrell.org>
To: Mark Seuffert <captain@pirate.de>
Subject: Re: how to precompile scripts or speed them up?
Message-Id: <874t084ahw.fsf@phaedrus.uchicago.edu>
Mark Seuffert <captain@pirate.de> writes:
> I would like to pre-compile perl scrips, to speed startup for a
> specific CGI script (or another possibility: make the CGI build
> into the Apache web server, how?).
You want mod_perl. http://www.apache.org/perl/
--sf
------------------------------
Date: Sun, 05 Apr 1998 09:22:05 GMT
From: mefe@usa.net (M.EFE)
Subject: How to Upgrade Perl?
Message-Id: <35274d2b.37657683@news.earthlink.net>
Hello,
I was using perl4, than I installed perl5.003. (I didnot uninstall
perl4, coz I dont know how. Also I have some scripts which are working
with it.)
Now I want to upgrade to the latest version. I downloaded it. but I
dont know how to upgrade. Should I just just install it? Will it
replace the old one? (I am using a virtual server. And my space is
limited as you know. )
I would apreciate any advice...
Thanks again,
Good luck on all your works,
Sincerely
"Let Information Be Free..."
------------------------------
Date: Sun, 05 Apr 1998 05:08:48 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: How to Upgrade Perl?
Message-Id: <3526fb2d.99049273@news.btinternet.com>
On Sun, 05 Apr 1998 09:22:05 GMT, mefe@usa.net (M.EFE) wrote:
>
>Hello,
>
>I was using perl4, than I installed perl5.003. (I didnot uninstall
>perl4, coz I dont know how. Also I have some scripts which are working
>with it.)
You *probably* overwrote your perl4 anyhow (unless you have a [eg]
/usr/bin/perl4 and /usr/bin/perl5 or whatever). But most perl4 scripts
should continue to work given a couple of warnings with -w.
>Now I want to upgrade to the latest version. I downloaded it. but I
>dont know how to upgrade. Should I just just install it? Will it
>replace the old one? (I am using a virtual server. And my space is
>limited as you know. )
Dunno about the virtual server thang 'cause all those that I have set
up still use the same binaries but however. As long as you answer the
same questions about the paths as you did when you installed Perl
5.003 then it will overwrite it ( and I would recommend that most
strongly as you will get very confused some time if you have more than
one perl executable with the same name hanging around in different
directories). You may find that you have some extra version specific
library directories but these are fairly self evident and the old ones
can be deleted if you have got rid of your older version.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 5 Apr 1998 13:13:26 -0400
From: mjd@op.net (Mark-Jason Dominus)
Subject: Re: Increment [++] ne Assignment-add [+=]
Message-Id: <6g8e3m$1ag$1@monet.op.net>
In article <3520B3CC.EA7481C5@hpl.hp.com>, Larry Rosler <lr@hpl.hp.com> wrote:
>Ronald J Kimball wrote:
>People who provide *services* tend to be quite
>conservative about perceived risk/benefit decisions in areas such as
>compilers and libraries, where many users might be affected. So my code
>reads "require 5.002;" -- sigh...)
Tell them that 5.002 has a buffer overrun problem which could be used
to comproimse security on their machines, that there is a CERT
advisory out about it, and that they should immediately upgrade to
5.004_04 to fix this problem.
------------------------------
Date: Sun, 05 Apr 1998 03:01:45 GMT
From: jaws@atl.mindspring.com (John Armsby)
Subject: Re: perl linux database program?
Message-Id: <6g86mc$ffq@camel21.mindspring.com>
try:http://www.hermetica.com/technologia/perl/DBI/drivers.html#Pg
john
Russ Allbery <rra@stanford.edu> wrote:
>Greg Waters <gwaters@dorsai.org> writes:
>> Does anybody know resource information and help files on how to create
>> perl databases for linux? Did someone write a program?
>Lots of them. What exactly are you looking for? "Perl databases" doesn't
>make a lot of sense, nor does "Perl Linux database program" because there
>really isn't anything Linux-specific about it.
>Perl comes with modules capable of reading and writing to SDBM, NDBM, and
>Berkeley DB (version 1) databases, and those libraries should have come
>with your system. (If not, they're easy to obtain.) Examples of usage
>are in the perlfunc database under tie.
>If you have a more specific question, could you try to rephrase?
>--
>#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
>$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
> 00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
>rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 5 Apr 1998 11:04:30 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Please Help me with print data in HTML mode..CGI
Message-Id: <6g7ofu$54d$3@client3.news.psi.net>
Tom Vilaikam (ai3x@jps.net) wrote on MDCLXXVIII September MCMXCIII in
<URL: news:352728BD.583D1C29@jps.net>:
++ I need source to print data on HTML mode ..
The manual is an excellent source on how to use print.
And there is no such thing as HTML mode.
++ The error I have is:
++
++ "CGIwrap Error: System Error: execv() failed"
++ "Error: No such file or directory (2)"
That is not a Perl error. Perhaps you need to find a group dealing with cgi?
++ Here my example:open(FILE, "wcc.dat");
^
|
That's an "end of statement" marker.
Since you choose not to check the
return value of your open, all bets
are off.
Don't bother asking this group if
you prefer to ignore the information
Perl gives you.
Abigail
--
perl -wleprint -eqq-@{[ -eqw\\- -eJust -eanother -ePerl -eHacker -e\\-]}-
------------------------------
Date: Sun, 5 Apr 1998 17:05:51 GMT
From: aep@world.std.com (Andrew E Page)
Subject: Re: Purify Run on Perl5.004_04 Solaris 2.5.1(sparc)
Message-Id: <EqyA5r.50p@world.std.com>
Sorry...made a mistake on the URL.
In article <Equr8s.6wv@world.std.com>, Andrew E Page <aep@world.std.com> wrote:
> Perl5.00463
>
> I've put the result of this run in the following URL:
>
>http://world.std.com/~aep/pure_make_test.log.gz
>
>--
>Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
>Mac Consultant | The difference between what we are
>Macintosh and DSP Technology | and what we want to be.
--
Andrew E. Page (Warrior Poet) | Decision and Effort The Archer and Arrow
Mac Consultant | The difference between what we are
Macintosh and DSP Technology | and what we want to be.
------------------------------
Date: Sun, 05 Apr 1998 05:08:38 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: reading file permissions
Message-Id: <3526c1b3.84376773@news.btinternet.com>
On Sat, 04 Apr 1998 18:00:08 -0800, Larry Rosler <lr@hpl.hp.com>
wrote:
>Jonathan Stowe wrote:
>>
>...
>>
>> if ( 0400 && $mode)
>> {
>> print "readable by owner\n";
>> }
>>
>
>if ( 0400 & $mode) ...
>
>&& is a logical test operator, and 0400 is always "true" so the result
>is $mode.
>& is a bit-wise arithmetic operator.
>
Err, Yes. Mea Culpa. (SFX : keyboard clattering around head ).
That should be the bit-wise operator.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: 03 Apr 1998 10:15:04 -0600
From: Alan Shutko <shutkoa@ug.eds.com>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <ydura3e51br.fsf@stlhp65.ug.eds.com>
>>>>> "F" == Frangois Pinard <pinard@iro.umontreal.ca> writes:
F> For this reason, he does not want that people (would they be total
F> outsiders to ORA) mention ORA books on GNU lists, even when about
F> GNU software.
No, he doesn't want people to mention the books in preference to
improving the manual. Different thing entirely. When this came up,
it was because he didn't want people to say "Well, we don't have to
cover this because an ORA book does."
In other words, free software should have free, complete manuals.
There will always be opportunities for others to write other books,
since there's always room for another take on things, but that
shouldn't mean that we're allowed to skimp on the real manual.
--
Alan Shutko <shutkoa@ugsolutions.com> - (314) 344-5214
------------------------------
Date: 5 Apr 1998 14:18:18 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <6g83ra$svf@fridge.shore.net>
=?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@iro.umontreal.ca) wrote:
: One known thing is that Richard does not praise the fact that O'Reilly sells
: books for which the real sources are not available. For this reason, he
Whatever do you mean? Most of the books have the examples available
online. Perhaps I misunderstood what you meant, but ...
I can name at least a dozen ORA books that cover subject matter where
sources are available. Most of these books tell you where to get it,
too.
--
Nathan V. Patwardhan
------------------------------
Date: 5 Apr 1998 15:55:42 GMT
From: Kevin Lyda <kevin@parsley.faxinter.com>
Subject: Re: RMS should be invited to O'Reilly's "Free Software Summit"
Message-Id: <6g89hu$69v$1@bombay.ziplink.net>
In gnu.misc.discuss Nathan V. Patwardhan <nvp@shore.net> wrote:
: =?ISO-8859-1?Q?Fran=E7ois_Pinard?= (pinard@iro.umontreal.ca) wrote:
: : One known thing is that Richard does not praise the fact that O'Reilly sells
: : books for which the real sources are not available. For this reason, he
: Whatever do you mean? Most of the books have the examples available
: online. Perhaps I misunderstood what you meant, but ...
: I can name at least a dozen ORA books that cover subject matter where
: sources are available. Most of these books tell you where to get it,
: too.
it appears "pinard" is yet another person spreading misinformation about
rms' quotes and/or the gpl. o'reilly's been very good to the unix
community, and to the gpl'ed community. they gpl'ed their mh book
for example.
i should note that i know several people that work(ed) there, so i might
be biased.
kevin
ps hi nate!
------------------------------
Date: Sun, 5 Apr 1998 17:29:33 +0200
From: "Crispin Tschirky" <ct@tschirky.ch>
Subject: Running a perl script with root privilges
Message-Id: <6g885l$24j$1@ubnnews.unisource.ch>
I don't know if this is the right group for my posting.
I have the problem that i should run a perlscript with root privilges from
an unprivilged user (wwwrun I know this is a potential security hole....).
I tried to run it with the owner set to root and then set the filemode s
(chmod u+s blabla) but while starting the script I always got the error:
Can't do setuid.
Does anyone have an idea how to manage this?
Crispin
------------------------------
Date: Sun, 05 Apr 1998 05:51:01 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: Running a perl script with root privilges
Message-Id: <352714c5.105422166@news.btinternet.com>
On Sun, 5 Apr 1998 17:29:33 +0200, "Crispin Tschirky" <ct@tschirky.ch>
wrote:
>I don't know if this is the right group for my posting.
>I have the problem that i should run a perlscript with root privilges from
>an unprivilged user (wwwrun I know this is a potential security hole....).
>I tried to run it with the owner set to root and then set the filemode s
>(chmod u+s blabla) but while starting the script I always got the error:
>Can't do setuid.
I would take a look at the perlsec manpage which offers a number of
possible causes for this type of problem and solutions for said.
Without knowing your situation (OS/Perl Release etc etc) it would be
difficult to give a more positive answer. The above mentioned
manpage gives the code for a C-Wrapper program which may solve your
problem.
/J\
Jonathan Stowe
See the MetaFaq at http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm
------------------------------
Date: Sun, 05 Apr 1998 08:46:15 GMT
From: probe@hotmail.com (J. Probert)
Subject: Re: Urgent: Perl Win32 vs Unix Perl
Message-Id: <35273eb5.2720837@news.saix.net>
On Sat, 04 Apr 1998 14:55:04 +0300, Yair Schaffer <yairs@actcom.co.il>
wrote:
>HI Justin,
> Your question is very interseting I have the same dilema.
> I'd be very happy to informed if you find something interseting.
>
> Now, I also have the perl running on my pc but I don't know how to make
>my
> Personal web server run perl CGI's could you advise me ?
>
> Thank you
> yair.
Yair-
To make PWS run Perl CGI, you need to have perl for win32 installed,
and then also Perl W32 ISAPI.
The two files you need are respectively:
(1) Pw32i313.exe (Perl for Win32) and
(2) PlISi313.exe (Perl ISAPI).
You may also want to install Perl ASP, this is
(3) PlSEi313.exe.
These are self-extracting bat files, accept all the defaults and you
can't go wrong. They must be installed in the order above -- after
installing PWS.
(The perl files above are of course ver. 5.003_07 build 313 -- You
might find a later version at www.activeware.com)
Once you have installed the above, you need to configure a folder to
execute scripts.
If you have frontpage, create a new folder called say "cgi-bin". Or if
you don't have frontpage, do this in the PWS Administration, and make
sure the alias is "/yourcgi-bin", and check the "Execute" label.
In frontpage, right click the new folder in explorer, then properties,
then check "allow scripts to run".
You should be ready to go now.
Call your script like this:
<form action="/yourcgi-bin/yourscript.pl">
or
<a href="/yourcgi-bin/yourscript.pl?parameter1=x¶m2=y&etc">Click
Here</a>
Good luck. I will be happy to help further if you require.
Justin.
------------------------------
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 2253
**************************************