[7621] in Perl-Users-Digest
Perl-Users Digest, Issue: 1247 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 30 01:15:12 1997
Date: Wed, 29 Oct 97 22:00:22 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 29 Oct 1997 Volume: 8 Number: 1247
Today's topics:
Re: AUTOLOAD and sort <rootbeer@teleport.com>
Re: crypt on NT (Danny Aldham)
Re: detection of first execution since login <rjk@coos.dartmouth.edu>
File Locking? <VikR@aol.com>
Getting Different Behavior from Perl Script and Unix Co (Kevin M Simonson)
Re: Getting Different Behavior from Perl Script and Uni <rootbeer@teleport.com>
Re: insecure dependency error (Bill Mitchell)
Re: Interesting PERL command - need help <rra@stanford.edu>
Learning Perl <dmcgrat@earthlink.net>
Re: Learning Perl <rjk@coos.dartmouth.edu>
Re: Learning Perl (Danny Aldham)
Re: Learning Perl <tarkus@dim.ANTISPAM.com>
Looking for Contractors <cyberswat@tmri.com>
Re: Net::Ftp on solaris 2.6 (John D Groenveld)
Perl for OS/2 <bboone@lexmark.com>
Re: perl newbie needs help (Martien Verbruggen)
Re: Perl Suffix (Was: Can perl be maken to Compiler ins <dformosa@st.nepean.uws.edu.au>
Perl's Gurus and Alfa geeks <ramon@ramonc.icix.net>
Problems complileing Perl and some Modules. <arsen@erg.sri.com>
Sockets & Perl310/NT ? (C Carr)
Re: Sockets & Perl310/NT ? (Danny Aldham)
Symbol not found error when using Curses module <rick.delaney@shaw.wave.ca>
Re: tcp/ip connecttions <ramon@ramonc.icix.net>
Re: Useless use of sort in void context <rootbeer@teleport.com>
Re: Useless use of sort in void context (Honza Pazdziora)
Re: Userid and passwords (Honza Pazdziora)
Re: using -s to get file size (JoyDivisin)
Re: using -s to get file size (Honza Pazdziora)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 29 Oct 1997 17:43:23 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Leonard Megliola <lmegliol@inertia.acs.uci.edu>
Subject: Re: AUTOLOAD and sort
Message-Id: <Pine.GSO.3.96.971029174142.5351F-100000@usertest.teleport.com>
On 29 Oct 1997, Leonard Megliola wrote:
> I have a program which makes a call to sort such as the
> following:
>
> sort _sort_subroutine ... ;
>
> _sort_subroutine is an AutoLoaded routine, and because "the normal
> calling code for subroutines [used in sort] is bypassed", the
> _sort_subroutine is not loaded. An error is printed that
> explains that the routine cannot be found.
> What is the best possible solution?
File a bug report so that the Perl developers will make sort subs
autoloadable. :-) (Hint: It's at least three times more likely that this
will be fixed if you enclose a patch in the bug report. :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 29 Oct 1997 20:28:36 -0800
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: crypt on NT
Message-Id: <6392dk$fd5$1@lennon.postino.com>
Brian Wheeler (bdwheele@indiana.edu) wrote:
: How do I get the crypt function to work on NT? I'm using the 5.00402 binary
: distribution.
I am using the 5.003_07 binary from www.activestate.com , and crypt
seems to work for me.
--
Danny Aldham SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm
------------------------------
Date: Wed, 29 Oct 1997 22:46:59 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: detection of first execution since login
Message-Id: <34580334.7AF6@coos.dartmouth.edu>
Steve Grantz wrote:
>
> Why not have the login script write to a file called lastday
> and put in today's date, or some such thing. Then have the message script
> check the date in lastday to determine whether is should execute?
>
> This would make midnight logins annoying, but it is some kind of
> workaround.
That would also fail if you logged off completely and then logged back
on in the same day.
I use this, in my .logout, to execute a command when I'm logging out
from my last session:
if (`who | grep ^username | wc -l` == 1) ...
Chipmunk
------------------------------
Date: Wed, 29 Oct 1997 17:05:56 -0800
From: Vik Rubenfeld <VikR@aol.com>
Subject: File Locking?
Message-Id: <3457DD70.748B9129@aol.com>
I have both camel books, and I've read the PERl faq and lots of on-line PERL
info, but I haven't yet found a complete discussion of file locking.
Here's the LOCK subroutine from one of the on-line PERL manuals.
sub lock {
flock(MBOX,$LOCK_EX);
# and, in case someone appended
# while we were waiting...
seek(MBOX, 0, 2);
}
What heppens if someone calls this on a file that is already locked? Does the
call to FLOCK wait forever until the file becomes unlocked? If so is there any
way to do a timeout? If it returns an error, what are the error messages?
Similarly,
- What happens if someone tries to open an Flocked file?
- What happens if someone tries to write to an Flocked file?
- Does closing a file unlock a file, or is it necessary to unlock the file
before closing it?
Thanks very much in advance to all for any info.
- Vik
------------------------------
Date: 30 Oct 1997 01:16:12 GMT
From: simonsen_nospam@skopen.dseg.ti.com (Kevin M Simonson)
Subject: Getting Different Behavior from Perl Script and Unix Command
Message-Id: <638n4s$fki@sf18.dseg.ti.com>
Keywords: unix sed grep
I'm trying to build an application that will take a listing of all
files at a certain depth in a subtree, replace each filename in the listing
with one of its substrings (to be defined below), and do a "sort -u" on
these substrings to see how many unique ones there are.
The substring is the one that begins with an "xy_", and proceeds to
the only time in each filename that a digit precedes another underscore.
The substring includes the digit but does not include the underscore.
I thought I could achieve the desired result by the following "perl"
script:
#!/usr/local/bin/perl
print `ls -1 /ab/cd/??_e/*/*.f | head -2 | sed "s=.*xy_\(.*[0-9]\)_.*=xy_\1="`;
but it doesn't work. Interestingly enough, I get the desired results sim-
ply by executing:
ls -1 /ab/cd/??_e/*/*.f | head -2 | sed "s=.*xy_\(.*[0-9]\)_.*=xy_\1="
but apparently "perl" has some kind of problem when I copy that phrase ver-
batim into the "perl" script.
I appear to have captured the problem in smaller form as follows. If
I execute line:
echo "abcdefghijklmnopq" | sed "s=.*fgh\(.*[jkl]\)l.*=gh\1="
I get result:
ghijk
But when I execute script:
,-----------------------------------------------------------------------.
| #!/usr/local/bin/perl |
| print `echo "abcdefghijklmnopq" | sed "s=.*fgh\(.*[jkl]\)l.*=gh\1="`; |
`-----------------------------------------------------------------------'
I get result:
abcdefghijklmnopq
Anybody know why this is happening to me? Can anybody give me sugges-
tions as to how I can write the print statement I specified above, where I
want to sort filename substrings? Any information on this would be appre-
ciated.
---Kevin Simonson
-------------------------------------------------------------------------
Reverence To send me mail, remove "_nospam" and
the eternal. all the vowels from my login name.
------------------------------
Date: Wed, 29 Oct 1997 17:56:27 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Kevin M Simonson <simonsen_nospam@skopen.dseg.ti.com>
Subject: Re: Getting Different Behavior from Perl Script and Unix Command
Message-Id: <Pine.GSO.3.96.971029174818.5351G-100000@usertest.teleport.com>
On 30 Oct 1997, Kevin M Simonson wrote:
> print `ls -1 /ab/cd/??_e/*/*.f | head -2 | sed "s=.*xy_\(.*[0-9]\)_.*=xy_\1="`;
Backtick commands are double-quote interpolated. Among other things, that
means that the backslashes in your statement are being gobbled up long
before the shell sees them. (Before you complain about that, remember that
you need backslashes to be treated specially there. Without that feature,
backtick commands would be much less useful.)
So, as always in Perl, if you mean a real backslash, put in two.
Of course, what you're doing in those backticks could be done more easily
by a powerful scripting language which you're already running, but I won't
bug you about that. :-)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: 30 Oct 1997 01:59:21 GMT
From: mitchell@leadbelly.math.ufl.edu (Bill Mitchell)
Subject: Re: insecure dependency error
Message-Id: <MITCHELL.97Oct29205921@leadbelly.math.ufl.edu>
In article <6380pi$kvu$1@ug2.plk.af.mil> rokosz@ug2.plk.af.mil (Randy Rokosz) writes:
> $home_part = "/home/";
> $username <--- is input from keyboard
> $home_dir = $home_part.$username;
> if ($homedir = /^([-\@\w.]+)$/) {
You check whether the input has any illegal characters.
> $homedir = $1;
If not, then you untaint the variable.
> }
> system "/usr/bin/mkdir $home_dir";
And then you use it--untainted if it was safe to start with, and
still tainted if it was unsafe.
--
Bill Mitchell
Dept of Mathematics, The University of Florida
PO Box 118105, Gainesville, FL 32611--8105
mitchell@math.ufl.edu (352) 392-0281 x284
------------------------------
Date: 29 Oct 1997 19:02:07 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: Interesting PERL command - need help
Message-Id: <m390vckl74.fsf@windlord.Stanford.EDU>
Jason Gloudon <jgloudon@bbn.remove.com> writes:
> and to check whether or not the child process is actually created by
> adding this as well:
> local $SIG{PIPE} = sub { die "spooler pipe broke" };
Be aware that currently Perl has problems with its signal handling and
this could well cause a core dump depending on how things collided with
each other and where in the code stream the signal came.
About the only safe thing to do with signals right now, unfortunately, is
to ignore them. This is a high priority to be fixed in future versions of
Perl.
--
#!/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: 30 Oct 1997 01:37:47 GMT
From: "David McGrath" <dmcgrat@earthlink.net>
Subject: Learning Perl
Message-Id: <01bce4d4$8ba24b00$5fc02399@dmcgrat.earthlink.net>
I've been working my way thru the examples in the O'Reilly & Assoc. book.
I've run into what appears to be two editorial errors and I've tried to get
around them but with no luck. I've checked the doc and messed around with
the code and I'm stuck :(. I really don't want to continue too much further
without understanding this very simple concept.
I'm dealing with a simple if-elseif-else and Perl is telling me of syntax
errors. Tonight I went out and purchased Programming Perl ( since I was
getting nowhere in the Linux man pages ). I must be blind 'cause I just
don't see the error. Please review
the folowing block of code and assist a visually impaired wanna-be.
Thanks to all.
sub good_word {
my($somename,$someguess) =@_; # name the parameters
$somename =~ s/\W.*//; # get rid of everything after
# the first word
$somename =~ tr/A-Z/a-z/; # translate to lower case
if ($somename eq "dave") { # should not need guess
return 1; # return value is true
}
elseif (($words{$somename} || "groucho") eq $someguess) {
return 1; # correct guess is true
} <<=== COMPILER SAYS THIS IS WRONG
else {
return 0; # guess is wrong return false
}
} # end of subroutine
--
David McGrath
dmcgrat@earthlink.net
------------------------------
Date: Wed, 29 Oct 1997 23:39:37 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: Learning Perl
Message-Id: <34580F8A.6BC0@coos.dartmouth.edu>
> sub good_word {
> my($somename,$someguess) =@_; # name the parameters
> $somename =~ s/\W.*//; # get rid of everything after
> # the first word
> $somename =~ tr/A-Z/a-z/; # translate to lower case
> if ($somename eq "dave") { # should not need guess
> return 1; # return value is true
> }
> elseif (($words{$somename} || "groucho") eq $someguess) {
^^^^^^
That should be elsif.
> return 1; # correct guess is true
> } <<=== COMPILER SAYS THIS IS WRONG
> else {
> return 0; # guess is wrong return false
> }
> } # end of subroutine
With that fixed, it works fine for me.
Chipmunk
------------------------------
Date: 29 Oct 1997 20:15:18 -0800
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: Learning Perl
Message-Id: <6391km$f8s$1@lennon.postino.com>
David McGrath (dmcgrat@earthlink.net) wrote:
: elseif (($words{$somename} || "groucho") eq $someguess) {
elsif , not elseif . It would be nice if there was a patch to
the source that would allow both.
--
Danny Aldham SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm
------------------------------
Date: Wed, 29 Oct 1997 22:19:03 -0700
From: Tarkus <tarkus@dim.ANTISPAM.com>
Subject: Re: Learning Perl
Message-Id: <345818C6.CB5EABA5@dim.ANTISPAM.com>
David McGrath wrote about an O'Reilly & Assoc. editorial error:
> [clippage]
>
> sub good_word {
> my($somename,$someguess) =@_; # name the parameters
> $somename =~ s/\W.*//; # get rid of everything after
> # the first word
> $somename =~ tr/A-Z/a-z/; # translate to lower case
> if ($somename eq "dave") { # should not need guess
> return 1; # return value is true
> }
> elseif (($words{$somename} || "groucho") eq $someguess) {
>
The correct syntax for an if - else if context is:
if ( $condition1 ) {
# do something
} elsif ( $condtion 2 ) {
# do something different
}
Notice that the "e" is missing from the else-if (elsif).
> return 1; # correct guess is true
> } <<=== COMPILER SAYS THIS IS WRONG
> else {
> return 0; # guess is wrong return false
> }
> } # end of subroutine
Hope that helps.
Kevin "Tarkus" Eson
------------------------------
Date: 30 Oct 1997 03:06:00 GMT
From: cyberswat <cyberswat@tmri.com>
Subject: Looking for Contractors
Message-Id: <3457B30C.FFF7F919@tmri.com>
My current project is the New Hire Reporting System for the Child
Support Enforcement Agencies for the States of Nebraska and Rhode
Island. I am looking for a competent programer or group experienced in
Perl (at a minimmum) to contract for assistance in this job and remain
on call for others.
Please contact me for further discussion.
Thank You
Kevin Bridges
------------------------------
Date: 30 Oct 1997 00:22:51 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Net::Ftp on solaris 2.6
Message-Id: <6395jb$jo6$1@tholian.cse.psu.edu>
In article <343bcc7e.2020815@snews.zippo.com>,
Simon Lee <simon_lee~NoSpam~@super.zippo.com> wrote:
>Anyway I did try a perl build using a leached gcc binary distribution
>(and you know what happened).
A working gcc is essential. http://www.dejanews.com with the query
"gcc AND 2.6 AND ~g comp.unix.solaris" will lead you to enlightenment.
I suggest you use a packaged gcc to build your own from the latest source.
You'll then be able to build Perl's and Perl modules to your hearts content.
John
groenvel@cse.psu.edu
------------------------------
Date: Wed, 29 Oct 1997 13:28:56 -0500
From: "Billy Boone" <bboone@lexmark.com>
Subject: Perl for OS/2
Message-Id: <3457806d.0@usenet.lexmark.com>
Where can I find a version of perl for OS/2?
We are currently using perl version 5.003.07 for Windows ... and we would
like to begin utilizing our perl scripts in an OS/2 environment.
Can you email me as well as posting the information.
Billy
------------------------------
Date: 30 Oct 1997 01:04:50 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: perl newbie needs help
Message-Id: <638mfi$lg3$1@comdyn.comdyn.com.au>
In article <3455005F.A61F111D@solution4u.com>,
Andy Sutorius <andy@solution4u.com> writes:
> I have looked at all the FAQ's I can possibly stand.
You obviously haven't done a search through past articles in this
newsgroup. Use www.dejanews.com.
> I need to download a "freeware" editor so that I may write and compile
> and debug Perl. I have Perl 4 and 5 but nothing is making sense in how
> to get the program up and running.
This question comes up about once every two weeks. There is no *one*
editor for perl. Any text editor will do. Please go to
www.dejanews.com, and use it to find some past answers to this. Or use
altavista.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | We are born naked, wet and hungry. Then
Commercial Dynamics Pty. Ltd. | things get worse.
NSW, Australia |
------------------------------
Date: 30 Oct 1997 01:54:14 GMT
From: ? the platypus {aka David Formosa} <dformosa@st.nepean.uws.edu.au>
Subject: Re: Perl Suffix (Was: Can perl be maken to Compiler instead of interpreter?)
Message-Id: <878176393.745606@cabal>
In <8c3elkbsa3.fsf@gadget.cscaper.com> Randal Schwartz <merlyn@stonehenge.com> writes:
>>>>>> "Andrew" == Andrew Johnson <ajohnson@gpu.srv.ualberta.ca> writes:
[...]
>I get a queasy feeling in my stomach whenever I see a Perl *script*
>that ends in ".pl".
I like it because it tells me what the things writton in. This way I know
weather to load it into my editor or hunt around for the sorce.
--
Please excuse my spelling as I suffer from agraphia see the url in my header.
Never trust a country with more peaple then sheep.
Save the ABC Is $0.08 per day too much to pay? ex-net.scum and proud
I'm sorry but I just don't consider 'because its yucky' a convincing argument
------------------------------
Date: Wed, 29 Oct 1997 14:03:43 -0500
From: Ramon Castillo <ramon@ramonc.icix.net>
Subject: Perl's Gurus and Alfa geeks
Message-Id: <3457888F.6AEA@ramonc.icix.net>
I wrote a Perl Script that takes a Config. file and declares constants
to any other caller script, it works very well so far, but I wondering
is is there a more efficient way.
Plataform Perl 5.000_01 Solaris 2.5
---------------------------------------------------
file name = config
content :
#######################################
#
# here goes any yada yada bla bla bla
#
######################################
foo: (anyvalue);
####notice the next is a multiline sentence
hash: (joe,
bill,
you,
and,
me);
---------------------------------------------------
sript name : parseconfig
#!/usr/local/bin/perl
{
open (CONFIG, "config") || die"Can't open Config. file: $!";
while (<CONFIG>){
next if (/^#/ || /^\s*$/ ) ;
chop ;
s/^\s+//g;
s/\s+$//g;
$strip = $strip.$_ ;
}
@strip = split (/;/, $strip);
foreach $line (@strip) {
$line =~ /^([^ ]*): * \(([^ ].*?)\)/;
@{$1} = split (/,/, $2);
if (!$#{$1}) {${$1} = $2};
}
};1
--------------------------------------------------------
Any caller script:
#/usr/loac/bin/perl
require "parseconfig";
print "$foo\n"; ####notice returns a scalar context also
print ("@hash","\n"); ### notice in this case returns a hash
------------------------------------------------------------------
running caller this is the result
>./caller
>anyvalue
>joebillyouandme
It works pretty good for me.
Have a nice hacking..
--
#!/usr/local/bin/perl
use Heart::WithBrain;
while ($god->bless == $Internet && $Perl == $Cool){
$Be = "Happy";
$Live = "Love";
$Hack = "Fun";
} # RC ray@icix.net
------------------------------
Date: Wed, 29 Oct 1997 18:35:38 -0800
From: Tom Arseneault <arsen@erg.sri.com>
Subject: Problems complileing Perl and some Modules.
Message-Id: <3457F27A.6CFF@erg.sri.com>
All,
I have a Sun running Solaris 2.5, gcc 2.7.2.3 and the sources for Perl
5.004_01 and when I try to compile it I get an error on the library
libdb.a that looks like this:
ld: fatal: file /usr/local/lib/libdb.a: unknown type, unable to process
using elf(3E) libraries
After a lot of digging (and I am only 95% sure I am right) I found that
this library belongs to Berkely DB. Since I also have GnuDB I renamed
the library and ran configure with -Ui_db and got Perl to compile just
fine and pass all its tests. However, later when I tried to compile the
PerlTk module I got the same type of error:
LD_RUN_PATH="/usr/openwin/lib:/lib" gcc -o blib/arch/auto/Tk/Tk.so
-R/usr/openwin/lib -R/lib -G -L/usr/local/lib Tk.o leak_util.o
tkGlue.o tkGlue_f.o pTk/libpTk.a -L/usr/openwin/lib -lX11 -lsocket
-lnsl -lm
ld: fatal: file /usr/local/lib/libX11.a: unknown type, unable to process
using elf(3E) libraries
ld: fatal: File processing errors. No output written to
blib/arch/auto/Tk/Tk.so
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/Tk/Tk.so'
I can only assume who libX11.a belongs to, either X11 (I don't think use
stright X, we use Openwindows from Sun) or TclTk (don't know what
version but do know it was updated recently to the latest). Is there a
compiler switch I should know about? A config option I am missing? A
demonic sacrifice I need to preform? A politition I need to pay off?
Any help would be ... a help.
Thanks in advance.
Tom Arseneault
Sr. System Admin.
SRI International
333 Ravenswood Ave.
------------------------------
Date: Thu, 30 Oct 1997 02:53:14 GMT
From: clint@netcom.com (C Carr)
Subject: Sockets & Perl310/NT ?
Message-Id: <clintEIuG0q.nB@netcom.com>
Keywords: sockets Win32
Sockets under Activeware's Win32 build 810 are not working. The 'socket'
command bombs. I even tried running the tcp-client-no-filehandles sample
that comes in the distribution.
Any clues as to why?
thanks
------------------------------
Date: 29 Oct 1997 20:55:06 -0800
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: Sockets & Perl310/NT ?
Message-Id: <6393va$fn4$1@lennon.postino.com>
C Carr (clint@netcom.com) wrote:
: Sockets under Activeware's Win32 build 810 are not working. The 'socket'
: command bombs. I even tried running the tcp-client-no-filehandles sample
: that comes in the distribution.
Build 810 doesn't sound right. I am using build 310 , which is just
about brand new. And sockets work fine, although I understand there
is a memory leak in the socket code somewhere. This code works on NT4:
#!/usr/bin/perl -w
use IO::Socket;
$host = "www.activestate.com";
$port = '80';
$sock = new IO::Socket::INET(LocalHost => $host,
LocalPort => $port,
Proto => 'tcp',
Listen => 5,
Reuse => 1,
);
if (!$sock) {
print "Site up.\n";
exit(0);
}
else {
print "Site not running";
close($sock);
}
--
Danny Aldham SCO Ace , MCSE , JAPH , DAD
I wak'd, she fled, and day brought back my night. jm
------------------------------
Date: Wed, 29 Oct 1997 21:53:20 -0500
From: Rick Delaney <rick.delaney@shaw.wave.ca>
Subject: Symbol not found error when using Curses module
Message-Id: <3457F6A0.33A46D5B@shaw.wave.ca>
Hi, can anyone help? I'm trying to use Curses-1.01 with perl 5.003
under
DG/UX, and all the demo program bombs out trying to find symbol
__stdoutb.
(Stuart Harris, please excuse my plagiarism of your previous post--I
found it in DejaNews but did not find a reply. The main difference is
the versions.)
I just installed Curses and had no compiler errors (just a couple of
warnings), but I can't run any curses perl programs.
The error message is:
Can't load 'blib/arch/auto/Curses/Curses.so' for module Curses: dynamic
linker:
perl5: relocation error: symbol not found: __stdoutb at
/usr/local/lib/perl5/Dyn
aLoader.pm line
140.
at blib/lib/Curses.pm line
8
BEGIN failed--compilation aborted at demo line 3.
line 3 is "use Curses;"
line 8 is bootstrap Curses;
line 140 is :
my $libref = dl_load_file($file)
or
Carp::croak("Can't load '$file' for module $module:
".dl_error()."\n");
What am I missing?
TIA
----
Rick
------------------------------
Date: Wed, 29 Oct 1997 13:29:20 -0500
From: Ramon Castillo <ramon@ramonc.icix.net>
To: Will <whs3@Ra.MsState.Edu>
Subject: Re: tcp/ip connecttions
Message-Id: <34578080.5F18@ramonc.icix.net>
Will wrote:
>
> I am trying to find a perl script that will connect to a remote host,
> rlogin as a particular user, execute a few commands and then close the
> connection. I've been looking for a while now and so far I have been
> unable to fine anything to do this. I'd appreciate any help anyone can
> give me. Thanks...
>
> ========================================================================
> Atheism is a non-prophet organization.
> ========================================================================
Check the Comm.pl library it works for me although I'm not using rlogin
but I'm using telnet running commands and taking the output and show
them in a web page.
I've been using Comm.pl since early Perl versions and still works on
5.004_1 also you can check Net::Telnet.
RC
--
#!/usr/local/bin/perl
use Heart::WithBrain;
while ($god->bless == $Internet && $Perl == $Cool){
$Be = "Happy";
$Live = "Love";
$Hack = "Fun";
} # RC ray@icix.net
------------------------------
Date: Wed, 29 Oct 1997 17:40:29 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Mike Heins <mheins@prairienet.org>
Subject: Re: Useless use of sort in void context
Message-Id: <Pine.GSO.3.96.971029173803.5351E-100000@usertest.teleport.com>
On 29 Oct 1997, Mike Heins wrote:
> @score = sort numerically @score;
>
> You should also probably place the subroutine above the
> call, or do a 'use subs qw(numerically)' as in some situations
> Perl may not know that 'numerically' is a subroutine.
I'm pretty sure that, when the word 'numerically' is just after 'sort' in
this line, Perl will know that it's a subroutine. :-) (Although defining
the sub earlier or using 'use subs' wouldn't hurt, they're not needed
here.)
--
Tom Phoenix http://www.teleport.com/~rootbeer/
rootbeer@teleport.com PGP Skribu al mi per Esperanto!
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
Ask me about Perl trainings!
------------------------------
Date: Wed, 29 Oct 1997 19:19:00 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Useless use of sort in void context
Message-Id: <adelton.878152740@aisa.fi.muni.cz>
Joseph Ryan <jfryan@mdbusiness.com> writes:
> With warnings turned on I am getting a sort warning that I do
> not understand.
>
> [--WARNING--]
> Useless use of sort in void context at ./web-blast.plx line 179
>
> [--PROGRAM EXCERPT--]
> 001> #!/usr/local/bin/perl -w
> ....
> 178> if (evaluateBlastResults($blast_type,\@p,\@percent)) {
> 179> sort numerically @score;
> 180> }
> ....
> 400> sub numerically {
> 401> $a <=> $b;
> 402> }
>
> Anybody seen this one before, or know why I'm getting it.
You probably want to assign the result of sort somewhere on line 179.
Here, you run sort on array @score but you should put the sorted
result somewhere. Remember, sort works on list and returns list, it
doesn't alter your @score. Maybe
179> @score = sort numerically @score;
is what you want.
Hope this helps,
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: Wed, 29 Oct 1997 18:28:14 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: Userid and passwords
Message-Id: <adelton.878149694@aisa.fi.muni.cz>
shailkumar@aol.com (SHAILKUMAR) writes:
> When going to certain webpages, a window pops up and prompts the user
> to enter his id and password.
> If the id and password is correct, another web page is loaded or else a
> server message is displayed.
>
> How do you implement this in perl ?
It's not implemented in perl, it's implemented in the http server.
Check your local documentation of the server.
Hope this helps.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
Date: 30 Oct 1997 01:31:26 GMT
From: joydivisin@aol.com (JoyDivisin)
Subject: Re: using -s to get file size
Message-Id: <19971030013100.UAA08748@ladder01.news.aol.com>
Ach! Shoot me now and put you out of my misery! ;-)
Thanks -- just the exact little bit of info I was hoping to get!
David Anderson
------------------------------
Date: Wed, 29 Oct 1997 18:07:39 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: using -s to get file size
Message-Id: <adelton.878148459@aisa.fi.muni.cz>
joydivisin@aol.com (JoyDivisin) writes:
> Hi -
>
> I'm working on a program to gather file sizes and I'm using -s. It works fine
> within the directory the program runs in but when trying other directories, it
> doesn't return the file size (but it does return the file name, though).
>
> Both directories are owned by nobody and the program runs as nobody. Even
> running the program as root returns the same result.
>
> I've tried stat as well. While it returns a different number (not the actual
> file size in bytes) within its own directory, it doesn't return the files
> sizes in other directories.
>
> Any clues?
Looks like you have found a bug in perl but before you use perlbug to
report it, you might want to send us a oneliner that shows the
problem, a probably also perl -V of you perl. The first so that we see
that there is not a problem with your script, the second to be able to
reproduce it on other platforms.
--
------------------------------------------------------------------------
Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
I can take or leave it if I please
------------------------------------------------------------------------
------------------------------
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 1247
**************************************