[7502] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1128 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Oct 5 11:06:10 1997

Date: Sun, 5 Oct 97 08:00:24 -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 Oct 1997     Volume: 8 Number: 1128

Today's topics:
     Re: $x = $y || $z - dangerous assumption? (Damian Conway)
     Re: $x = $y || $z - dangerous assumption? <rra@stanford.edu>
     Re: Another Perl vs C question (Jeremy D. Zawodny)
     Re: ANSI Color in Perl (UNIX) <zenin@best.com>
     Re: Banner rotation / click thru system needed <postmaster@pedt.demon.co.uk>
     beginners help hash-of-hashes (Hans Malmberg)
     Is recursion causing this corruption? <jaydee@worsdall.demon.co.uk>
     libwww for win32 S.O.S <nakadina@ibm.net>
     my problem and solution to compiling Perl 5.004_01 on l <ekoontz@acsu.buffalo.edu>
     NEED A SEARCH ENGINE SCRIPT (WuTang1646)
     Re: Newbie ques: How to concatenate two strings? (Abigail)
     Re: Newbie ques: How to concatenate two strings? (dave)
     Re: Perl Questions <daftary@cisco.com>
     Problem with getservbyname over PPP connection? <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
     Problems installing perl5.004 <anon@symserve.prestel.co.uk>
     Problems installing perl5.004 <anon@symserve.prestel.co.uk>
     Re: Problems installing perl5.004 (Mike Heins)
     Re: sfio on Solaris Intel 2.5.1 (Lupe Christoph)
     Re: splitting problems (Jens Tautenhahn)
     Re: Strip spaces in filenames (Al Aab)
     Re: Syntax  on assignment and undef (Jason Gloudon)
     Re: telnet twod@not.valid
     Re: telnet (Jeremy D. Zawodny)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 5 Oct 1997 08:22:49 GMT
From: damian@cs.monash.edu.au (Damian Conway)
Subject: Re: $x = $y || $z - dangerous assumption?
Message-Id: <617iop$42r$1@towncrier.cc.monash.edu.au>

Tom Phoenix <rootbeer@teleport.com> writes:

>> 	my $x = shift || $default;

>The Perl development team is working on a way that you could write
>something like that which would assign the first defined item (rather than
>the first true one) among its operands. With any luck, it'll be in a
>future version of Perl.

Not presuming to second-guess the Perl Gods (:-), but does it need to
be anything fancier than:

	sub first_defined { map { return $_ if defined $_ } @_ }

	my $x = first_defined(shift, $default);


damian
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  who: Damian Conway                 email: damian@cs.monash.edu.au
where: Computer Science Dept.          web: http://www.cs.monash.edu.au/~damian
       Monash University             quote: "The best form of self-defence is
       Clayton 3168, Australia               not being there in the first place"


------------------------------

Date: 05 Oct 1997 01:49:42 -0700
From: Russ Allbery <rra@stanford.edu>
Subject: Re: $x = $y || $z - dangerous assumption?
Message-Id: <m3u3ewmw61.fsf@windlord.Stanford.EDU>

Damian Conway <damian@cs.monash.edu.au> writes:
> Tom Phoenix <rootbeer@teleport.com> writes:

>>> my $x = shift || $default;

>> The Perl development team is working on a way that you could write
>> something like that which would assign the first defined item (rather
>> than the first true one) among its operands. With any luck, it'll be in
>> a future version of Perl.

> Not presuming to second-guess the Perl Gods (:-), but does it need to
> be anything fancier than:

> 	sub first_defined { map { return $_ if defined $_ } @_ }
> 	my $x = first_defined(shift, $default);

That doesn't short-circuit.

-- 
#!/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: Sun, 05 Oct 1997 14:41:50 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: Another Perl vs C question
Message-Id: <3437a6ad.590139105@woody.wcnet.org>

[original author automagically cc'd via e-mail]

On Sat, 04 Oct 1997 23:55:57 GMT, jaws@atl.mindspring.com (John
Armsby) wrote:

>I stuck with the C because I need speed to spit out the html.  I
>thought (true or false) that Perl compiling would slow things down.  I
>also have been afraid that all those Perl compilations by the users
>would put extra pressure on the hard disks.  It seems that the C
>script remains in ram...  Right now the user starts to see html on his
>browser within a couple of seconds...
>
>Are there any comments on this simple script as to whether i should
>rewrite the script in Perl  and forsake C or stick to C?  Is there a
>technical reason here or does it boil down to what is easiest for  me?

Since it's being run thru a web server, you might consider using the
FastCGI stuff available with Apache and the necessary Perl modules on
CPAN.

FastCGI will let you keep the Perl interpreter (and scripts if I'm
remembering correctly) in memory so that startup time doesn't kill
you.

I think you'll find that to be nearly as fast (if not faster) that the
C method you use today.

Jeremy
-- 
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>

"That's an example of how Perl can bring school yard cruelty to new heights."
    -- Jon Orwant at the 1st Annual Perl Conference


------------------------------

Date: 5 Oct 1997 11:22:12 GMT
From: Zenin <zenin@best.com>
Subject: Re: ANSI Color in Perl (UNIX)
Message-Id: <617t94$ku5$2@nntp2.ba.best.com>

TechMaster Pinyan <jefpin@bergen.org> wrote:
> I have put a small "cheat sheet" for using color in Perl on at least
> UNIX... probably LINUX as well... if you are interested, check out:
> 	http://users.bergen.org/~jefpin/perl_dist/perl_color.txt
>
> Hope this answers any questions people might have in the future... :)

	Hmm, have you checked out the Term::ANSIColor module that Russ
	Allbery and I wrote a while ago?  It makes the use of ANSI color
	control vary simple, and removes all the funky, unreadable, embeded
	"\e[32m" stuff from one's code.  It will also work under DOS when
	the ANSI.SYS (or similar) driver is used.

	Your local CPAN at:
		modules/by-modules/Term/ANSIColor.tar.gz

	Remember, CPAN is your best friend when programming in Perl.

-- 
-Zenin (zenin@best.com)
 The Bawdy Caste (San Jose, CA)       http://www.netmagic.net/~dmcgrath/bawdy/
 Barely Legal   (Berzerkly, CA)                    http://www.barelylegal.org/
 Zenin's Rocky Archive (Moving soon!)              http://www.best.com/~zenin/


------------------------------

Date: Sun, 5 Oct 1997 10:18:29 +0100
From: Pedt Scragg <postmaster@pedt.demon.co.uk>
Subject: Re: Banner rotation / click thru system needed
Message-Id: <6HUS6WAlt1N0Ew3U@pedt.demon.co.uk>

In article <78227216wnr@njmcov.demon.co.uk>, Neil
<neil@njmcov.demon.co.uk> writes
>Hi,
>
>Can anyone please let me know if I can get hold of a system which will 
>allow me to place advertisers banners on my websites.
>
Have a look at the links and resources at the URL 
http://www.cgi-resources.com/Programs_and_Scripts/Perl/Collections/

-- 
Pedt Scragg <postmaster@pedt.demon.co.uk>

In principle,   is there uncertainty that
Heisenberg was working his best in chaos?


------------------------------

Date: Sun, 5 Oct 1997 16:46:51 +0100
From: hansmbg@algonet.se (Hans Malmberg)
Subject: beginners help hash-of-hashes
Message-Id: <199710051646511660315@du39-93.ppp.algonet.se>

I am trying to get a hash of hashes list to 'work'.
I have typed the examples of 'Programming Perl' but I
can't get this code to get me the result I expect.

This is my first steps...
-------------------------------------------------------------------
#!/usr/bin/perl

# hoh.pl
# 97-10-05  16:09

    
%LISTA = (

   M10 => {
           name      => "Bult M10",
           numbers   => 2606,
           price     => 5.85,
           },
   M12 => {
           name      => "Bult M12",
           numbers   => 176,
           price     => 7.30,
           },
   M16 => {
           name      => "Bult M16",
           numbers   => 2911,
           price     => 10.60,
           },
         );

$i = 1;

foreach $type ( keys %LISTA) {
   print "$i. $type is    : @{ $LISTA{$type}{name} }\n";
   print "   Numbers  : @{ $LISTA{$type}{numbers} }\n";
   print "   Price    : @{ $LISTA{$type}{price}  }\n";
   $i += 1;
   }

print "\nthat's all--finished...\n\n";

# that's all for today....
-------------------------------------------------------------------

The result I get is:
--------------------

1. M12 is    :
   Numbers  : 
   Price    : 
2. M16 is    : 
   Numbers  : 
   Price    : 
3. M10 is    : 
   Numbers  : 
   Price    : 

that's all--finished...
----------------------

The result I EXPECTED is:
-------

1. M12 is    : Bult M12
   Numbers  : 176
   Price    : 7.30
2. M16 is    : Bult M16
   Numbers  : 2911
   Price    : 10.60
3. M10 is    : Bult M10
   Numbers  : 2606
   Price    : 5.85

that's all--*I expected*...
--------

Thanks for reading...
-- 
/Hans   ---   LUND   13.10'30(E   55.43'24(N


------------------------------

Date: Sun, 5 Oct 1997 03:27:01 +0100
From: Mark Worsdall <jaydee@worsdall.demon.co.uk>
Subject: Is recursion causing this corruption?
Message-Id: <kColHCA1rvN0EwVJ@worsdall.demon.co.uk>


Hi,

Below is my program that recurses through our homepages looking for
files of an age under a set amount of days and with file extensions .stm
and .html

Everything works well until I try to write the found files into the mail
program. When I do this it seems to wor so many files but then it try's
to move out of our area on the server and so exits with permission
denied.

#!/usr/local/bin/perl
#
#
# This is the location of your homepages on the server
$startloc = '/usr/www/shadow';

# This is the number of days ago to check for. i.e. any file 
# updated 2 days since NOW would be:- $numdaysAgo = '2';
$numdaysAgo = '100';

# This is the address to mail the pages to.
$sendto = 'webpage@worsdall.demon.co.uk';

# Path of servers mail program
$mailprog = '/usr/sbin/sendmail';

use Cwd;
use File::Find;

[snip] testing for file age and type

# The lines below will display in fractions of days how old the file is
#               print "$File::Find::Dir/$_  ==> ", (-M $_), "\n";

        # Get the location of this current file
        $fullpath = Cwd::getcwd;

        # Now append filename to path to give us full filepath
        $fullpath = $fullpath . '/' . $_;

        # Now Subtract our start path to give us the full URL minus the   
        # http part ofcourse
        $urlpath = substr($fullpath, length($startloc)+1,
length($fullpath) - length($startloc))-1);

        print "$fullpath --> ", (-M $_), " \n";

#               # Open The Mail Program
        open(MAIL,"|$mailprog -t") or die "Error opening $mailprog: $!";
        print MAIL "To: $sendto\n";
        print MAIL "From: webpage\n";
        # Check for Message Subject
        print MAIL "Subject: $urlpath\n\n";

# It goes wrong when I uncomment any of the lines below
# So I have opened the Mail program sorted everything and now
# I just want to write the file $fullpath to the body of the
# mail program.
# As I have said it works until it recurses back into our home
# directory then it moves out of there and try's to write a file 
# that doesnot exist, however If I leave it commented oput the
# recurse works fine.

        open(WEBPAGE, "<$fullpath") || die "open failed $!";
#       while (<WEBPAGE>) {
#               print MAIL;
#       }
#       close WEBPAGE;
        close (MAIL);


-- 
Mark Worsdall - Oh no, I've run out of underpants :(
Home:- jaydee@worsdall.demon.co.uk  WEB site:- http://www.worsdall.demon.co.uk
Shadow:- webmaster@shadow.org.uk    WEB site:- http://www.shadow.org.uk


------------------------------

Date: Sun, 5 Oct 1997 14:55:36 +0200
From: "Gal Samuel" <nakadina@ibm.net>
Subject: libwww for win32 S.O.S
Message-Id: <34378f16.0@news1.ibm.net>

 Hello,

I can't seem to install the libwww group of  modules.
I need it to use the LWP module.

- can anyone describe full installation proccess for it on win95 or NT ?
- does anyone knows URL's of the libwww for win 32 to download from ?

after one installation, the following script returns error:
the script :
    $url = 'http://www.nakadina.org/index1.html';
    use LWP::Simple;
    if (head($url)) {
        print "o.k.";
        }

the error:
can't locate MIME/Base64.pm in @INC at c:\bla.bla.........

any help would be graet Thanks.
mailto:webmaster@nakadina.org
http://www.nakadina.org/





------------------------------

Date: Sun, 05 Oct 1997 02:14:46 -0400
From: Eugene J Koontz <ekoontz@acsu.buffalo.edu>
Subject: my problem and solution to compiling Perl 5.004_01 on linux
Message-Id: <34373056.7CB62027@cedar.buffalo.edu>

I had compilation problems; specifically, the installation script told
me "you have a BIG problem" when it tried to compile a small C test
program with -ldl. 
	The solution - I removed /lib/libdl.so.1.8.5, which left
libdl.so.1.7.14 and libdl.so.1.7.5. I symlinked libdl.so.1.7.14 to
libdl.so.1.7
	Incidentally, this also made Netscape Communicator 4.03b7 work; it had
been exiting with a bus error before.
	
	This was a trial and error solution; I have no idea what the difference
in the libraries is. I leave that as an exercise to the reader! 
	I've seen previous posts in this newsgroup saying
libdl.so.1.9.something also works. 
	Here is my ldd with my current, perl-compiling and Netscape-running
system :


intrepid(ekoontz)[/home/ekoontz] $ ldd /usr/local/bin/perl
        libgdbm.so.2 => /usr/lib/libgdbm.so.2.0.0
        libdb.so.2 => /usr/lib/libdb.so.2.0.0
        libdl.so.1 => /lib/libdl.so.1.7.14
        libm.so.5 => /lib/libm.so.5.0.6
        libc.so.5 => /lib/libc.so.5.4.13


------------------------------

Date: 5 Oct 1997 06:17:35 GMT
From: wutang1646@aol.com (WuTang1646)
Subject: NEED A SEARCH ENGINE SCRIPT
Message-Id: <19971005061700.CAA15182@ladder01.news.aol.com>

Hello,

I was wondering if any one could give me a price quote for this search engine
 script.


  1. I would like it to be a sMQL database in which users can add their
url automatically.
  
  2. When a user adds their link, all they have to do is type in their
url and e-mail address and a spider looks at their description meta tag,
keyword meta tag, or their first 20 words in their web page (like
Lycos).
  
  3. Users can only add their link once and they can edit their link.
  
  4. I can edit the database with administration control.
 
  5. Shows searches by relevance with the percentage of relevance next
to the link.

  6. Users can search for more than 1 word at a time (I guess this would
be boolean).

  7. I would like to have categories (not like Yahoo, just a few with
sub-categories also).

  8. When a user searches, it shows the first 10 results and then they
could click on a link to go to the next 10. They would  also be
able to jump to like the last page or the 5th page for example (like
Alta Vista).

  9. I am planning on having a lot of links and users (if that is of any
help to the quote).

 10. My current server is Alabanza (http://alabanza.com) but will
probably be switching. I would always switch to a unix server so that would
be what I would want it written for.

 11. At the top it would show how many relevant links that the user has
found and what set of 10 they are on.

Could you please tell me how much added on each feature will cost.
Thanks.

I look forward to hearing from you.

Please e-mail me at: aldogg@alabanza.com

Alex


------------------------------

Date: 5 Oct 1997 04:17:12 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <slrn63e5aa.de.abigail@betelgeuse.rel.fnx.com>

dave (over@the.net) wrote on 1495 September 1993 in
<URL: news:3436cbbb.700238@news.one.net>:
++ Doug Seay <seay@absyss.fr> wrote:
++ 
++ 
++ >I didn't think you were using Unix because no Unix user would complain
++ >about "man | grep", even if using some all inclusive GUI.  Dunno 'bout
++ >Win95, but WinNT comes with an ugly DOS box that supports "find" which
++ >allows you to look in files for strings so you can do the same sort of
++ >thing.  The flexiblity of the command line for doing things like this is
++ >why most of us don't switch to all GUI systems.
++ 
++ The perl man pages put too much on one page to be as useful as other UNIX
++ pages.  Looking up something on perl is like looking up something on ksh.
++ Arghhh!

So, use perldoc -f function, or use a decent pager, like more or less.


Abigail


------------------------------

Date: Sun, 05 Oct 1997 11:47:15 GMT
From: over@the.net (dave)
Subject: Re: Newbie ques: How to concatenate two strings?
Message-Id: <34377d16.1827794@news.one.net>

abigail@fnx.com (Abigail) wrote:

>dave (over@the.net) wrote on 1495 September 1993 in
><URL: news:3436cbbb.700238@news.one.net>:
>++ Doug Seay <seay@absyss.fr> wrote:
>++ 
>++ 
>++ >I didn't think you were using Unix because no Unix user would complain
>++ >about "man | grep", even if using some all inclusive GUI.  Dunno 'bout
>++ >Win95, but WinNT comes with an ugly DOS box that supports "find" which
>++ >allows you to look in files for strings so you can do the same sort of
>++ >thing.  The flexiblity of the command line for doing things like this is
>++ >why most of us don't switch to all GUI systems.
>++ 
>++ The perl man pages put too much on one page to be as useful as other UNIX
>++ pages.  Looking up something on perl is like looking up something on ksh.
>++ Arghhh!
>
>So, use perldoc -f function, or use a decent pager, like more or less.
>
Thanks for the tip.  The perldoc -f and -m should be handy when I don't have
access to the hyperlinked HTML.


Dave
|
| Please visit me at http://w3.one.net/~dlripber
|
| For reply by email, use:
| dlripber@one.net
|________


------------------------------

Date: Sun, 05 Oct 1997 04:29:29 -0700
From: Kuntal Daftary <daftary@cisco.com>
To: Matt <mrc@pressroom.com>
Subject: Re: Perl Questions
Message-Id: <34377A19.672F@cisco.com>

Matt wrote:

> I can't even get a perl file to execute when a user wants it to.......maybe
> you can help me with that, everytime I hit the submit button, the browser
> tries to download the script.  The registry is ok, I've checked that
> out....

this shud be typically your problem:

servers execute programs as CGI only when they have certain specific
extensions.
all (almost?) servers allow the .cgi extension so thats the one u shud
use first
if u do want other extension, then u need to put that in what is called
a "Access
File" usually named .htaccess or .WWWaccess (on unices at least).

for more info on what is your access file name and how to get other
extensions
working using it, is a question for your sysadmin or web admin.

-- 
Kuntal M. Daftary   Cisco Systems Inc 
Ph: 408 527 9789    170 W. Tasman Dr 
daftary@cisco.com   San Jose CA 95134


------------------------------

Date: Sun, 5 Oct 1997 06:20:51 -0700
From: "Creede Lambard" <$_=qq!fearless\@NOSPAMio.com!;y/A-Z//d;print>
Subject: Problem with getservbyname over PPP connection?
Message-Id: <61847k$rjv@mtinsc02.worldnet.att.net>

Does anyone know why the following line

    my($port) = (getservbyname('smtp', 'tcp'))[2];

would generate a runtime exception over a PPP connection, and (more
importantly) whether there's a workaround? I've traced the problem
specifically to this line in a mail-sending script, and it's errored out on
two different PPP connections (via both AT&T Worldnet and a local provider).
It's not the Activeware Perl port; the same script on an NT machine at work
connected to a LAN works fine with Activeware.

Environment:

Windows 95
Activeware Perl port
AT&T Worldnet connection over a 28.8K modem

Thanks in advance.






------------------------------

Date: 5 Oct 1997 09:58:36 GMT
From: "anon" <anon@symserve.prestel.co.uk>
Subject: Problems installing perl5.004
Message-Id: <01bcd176$4a9d4c20$6b025cc3@tinkerbell>

Can anybody please help.
Having problems installing perl5.004 on a Fujitsu G640i running unixware
Get as far as building Fcntl module which fails
message log attached along with machine & system details.
I'm not a c programmer and this has me stumped, any ideas ?

Thanks
begin 600 Log
M"4Q$7U)53E]0051(/2(B("]B:6XO8V,@+6\@+BXO+BXO;&EB+V%U=&\O1F-N
M=&PO1F-N=&PN<V\@("U,+W5S<B]C8W,O;&EB("U,+W5S<B]U8V)L:6(@+4PO
M=7-R+V=N=2]L:6(@1F-N=&PN;R @(" @"E5N9&5F:6YE9 D)"69I<G-T(')E
M9F5R96YC960*('-Y;6)O;" @"0D)(" @(&EN(&9I;&4*;6%I;B @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @+W5S<B]C8W,O;&EB+V-R=#$N;PI0
M97)L7W-V7WEE<R @(" @(" @(" @(" @(" @(" @(" @("!&8VYT;"YO"E!E
M<FQ?<W9?;F5W;6]R=&%L(" @(" @(" @(" @(" @(" @($9C;G1L+F\*4&5R
M;%]N97=84R @(" @(" @(" @(" @(" @(" @(" @(" @1F-N=&PN;PI097)L
M7W-V7S)I=B @(" @(" @(" @(" @(" @(" @(" @("!&8VYT;"YO"E!E<FQ?
M<W1A8VM?8F%S92 @(" @(" @(" @(" @(" @(" @($9C;G1L+F\*4&5R;%]S
M=E]S971N=B @(" @(" @(" @(" @(" @(" @(" @1F-N=&PN;PI097)L7W-V
M7S)P=B @(" @(" @(" @(" @(" @(" @(" @("!&8VYT;"YO"E!E<FQ?4W8@
M(" @(" @(" @(" @(" @(" @(" @(" @(" @($9C;G1L+F\*4&5R;%]M87)K
M<W1A8VM?<'1R(" @(" @(" @(" @(" @(" @1F-N=&PN;PI097)L7V9O<FT@
M(" @(" @(" @(" @(" @(" @(" @(" @("!&8VYT;"YO"E!E<FQ?8W)O86L@
M(" @(" @(" @(" @(" @(" @(" @(" @($9C;G1L+F\*<&5R;%]G971?<W8@
M(" @(" @(" @(" @(" @(" @(" @(" @1F-N=&PN;PI097)L7W-T86-K7W-P
M(" @(" @(" @(" @(" @(" @(" @("!&8VYT;"YO"E!E<FQ?;F$@(" @(" @
M(" @(" @(" @(" @(" @(" @(" @($9C;G1L+F\*55@Z;&0Z($524D]2.B N
M+B\N+B]L:6(O875T;R]&8VYT;"]&8VYT;"YS;SH@9F%T86P@97)R;W(Z"E-Y
M;6)O;"!R969E<F5N8VEN9R!E<G)O<G,N($YO(&]U='!U="!W<FET=&5N('1O
M("XN+RXN+VQI8B]A=71O+T9C;G1L+T9C;G1L+G-O"BHJ*B!%<G)O<B!C;V1E
G(#$@*&)U,C$I"E58.FUA:V4Z($524D]2.B!F871A;"!E<G)O<BX*
`
end

begin 600 Machine
M,BXP,PI3>7-T96T@/2!53DE87U-Y<PI.;V1E(#T@=6YI> I296QE87-E(#T@
M-"XR35 *2V5R;F5L240@/2 Y-2\Q,"\Q,0I-86-H:6YE(#T@:3,X-F%T"D)U
M<U1Y<&4@/2!%25-!"E-E<FEA;" ]( I5<V5R<R ](" @(" @(" *3T5-(R ]
;(# *3W)I9VEN(R ](#$*3G5M0U!5(#T@,0H*
`
end



------------------------------

Date: 5 Oct 1997 10:04:51 GMT
From: "anon" <anon@symserve.prestel.co.uk>
Subject: Problems installing perl5.004
Message-Id: <01bcd177$2bd19480$6b025cc3@tinkerbell>

Repeat of message from "anon"
I have encountered problems installing perl5.004 on a Fujitsu G640i
The machine runs unixware
When building the Fcntl module I get errors
A log showing the problems is attached as is details of the machine

I'm not a c programmer and this has me stumped
Can anybody help ?

Thanks Bob
-- 
bob@symserve.prestel.co.uk


------------------------------

Date: 5 Oct 1997 10:06:04 GMT
From: mheins@prairienet.org (Mike Heins)
Subject: Re: Problems installing perl5.004
Message-Id: <617oqc$dj6$1@vixen.cso.uiuc.edu>

anon (anon@symserve.prestel.co.uk) wrote:
: Can anybody please help.
: Having problems installing perl5.004 on a Fujitsu G640i running unixware
: Get as far as building Fcntl module which fails
: message log attached along with machine & system details.
: I'm not a c programmer and this has me stumped, any ideas ?
: 
: Thanks
: begin 600 Log
: M"4Q$7U)53E]0051(/2(B("]B:6XO8V,@+6\@+BXO+BXO;&EB+V%U=&\O1F-N
: M=&PO1F-N=&PN<V\@("U,+W5S<B]C8W,O;&EB("U,+W5S<B]U8V)L:6(@+4PO
[zap]

If you can't be bothered to put the information
in a readable form, or to provide a return address or name,
I doubt if anyone will bother to help.  Maybe I am wrong,
but...

-- 
Regards,
Mike Heins

This post reflects the
opinion of my employer.


------------------------------

Date: 5 Oct 1997 11:51:45 +0200
From: lupe@alanya.m.isar.de (Lupe Christoph)
Subject: Re: sfio on Solaris Intel 2.5.1
Message-Id: <617nvh$j71$1@alanya.m.isar.de>

portinfo@best.com (Gene Gotimer) writes:

>Has anyone gotten sfio to build on Solaris Intel 2.5.1?

I did, though it was quite a pain without much help from READMEs, etc.
I just rebuilt it on 2.6.

>(comp.lang.perl.misc folks:
>I realize this isn't directly Perl related, but I thought someone
>might have run into this same problem when adding FCGI, which
>is what I am trying to do...)

I use it with mod_perl (use is a little much of a word, I'm just
fiddling around a little).

Try doing a make clean in sfio97/src/lib/sfio; then do a make.
You will need to do this change to get gcc to work. The *!^%@#!
sfio isn't prepared to deal with a non-cc compiler. (I believe
the "export CC; CC=$(CC);" is superfluous.)

*** sfio97/src/lib/sfio/makefile	Wed Dec 11 17:58:10 1996
--- sfio97-lpc/src/lib/sfio/makefile	Sat Jun  7 20:53:44 1997
***************
*** 52,60 ****
  	$(AR) cr libsfio.a $(OBJS) $(SFIO_F) $(STDIO_S)
  	-(ranlib libsfio.a; exit 0) >/dev/null 2>&1
  FEATURE/sfio: features/sfio
! 	export CC; CC=$(CC); $(BINDIR)/iffe run features/sfio
  ast_common.h: features/ast_common
! 	export CC; CC=$(CC); $(BINDIR)/iffe - run features/ast_common > ast_common.h
  sfio_f:
  	cd Sfio_f; make -f Makefile CC="$(CC)" CCMODE="$(CCMODE)" CXFLAGS="$(CXFLAGS)"
  stdio_s:
--- 52,60 ----
  	$(AR) cr libsfio.a $(OBJS) $(SFIO_F) $(STDIO_S)
  	-(ranlib libsfio.a; exit 0) >/dev/null 2>&1
  FEATURE/sfio: features/sfio
! 	export CC; CC=$(CC); $(BINDIR)/iffe set cc $(CC) : run features/sfio
  ast_common.h: features/ast_common
! 	export CC; CC=$(CC); $(BINDIR)/iffe - set cc $(CC) : run features/ast_common > ast_common.h
  sfio_f:
  	cd Sfio_f; make -f Makefile CC="$(CC)" CCMODE="$(CCMODE)" CXFLAGS="$(CXFLAGS)"
  stdio_s:


------------------------------

Date: 04 Oct 1997 21:04:00 +0200
From: shogun@tausys.franken.de (Jens Tautenhahn)
Subject: Re: splitting problems
Message-Id: <6fE3VCDaJTB@tausys.franken.de>


> $ipaddr = "$ENV{'REMOTE_ADDR'}";
> @fields = split(/./,$ipaddr);

"." in regexp has a special meaning (it maches any character). Try

($ip1, $ip2, $ip3, $ip4) = split(/\./,$ENV{'REMOTE_ADDR'});

>       $ip1 = $fields[0];
>       $ip2 = $fields[1];
>       $ip3 = $fields[2];
>         $ip4 = $fields[3];

Bye
Jens


------------------------------

Date: Sun, 5 Oct 1997 12:22:56 GMT
From: af137@torfree.net (Al Aab)
Subject: Re: Strip spaces in filenames
Message-Id: <EHKvq9.7Kz.0.queen@torfree.net>


not having seen the original q,
to strip spaces from every string:
	
				sed "s/ //g" filein > fileout



			to master sed
			join seders
			email me



Tim Smithers (mouse@sirca.usyd.edu.au) wrote:
: Floyd Pierce wrote:
:  
: > for i in `find . -name '*.txt' -print`
: > > do
: > > x=`echo $i|sed 's/\.txt$/\.bak/'`
: > > mv $i $x
: > > done
: > 
: > Bit more typing but it works.

:     No It doesn't. The original question involves filenames with spaces.

: > --
: > Floyd Pierce   floydp at xnet.com
: >                floydp at ix.netcom.com

: TRY:

: (IFS="";
:  for i in `find . -type f -name '*.txt' -print`
:  do
:      mv $i `echo $i | sed -e 's/\.txt$/.bak/'`
:  done
: )
:  
: The IFS="" will stop the for loop splitting words up by spaces,
: retaining
: the whole line. You need to put it in ()'s, so that your IFS variable is
: not set for your normal shell.

: P.S: IFS is the Internal Field Seperator. You can set it to anything you
: like,
:      and the shell will split words on those characters.
:      It is often used to loop through parts of the PATH.

: ie:  OLDIFS="$IFS"
:      IFS=":"
:      for i in $PATH
:      do
:          echo "PATH COMPONENT: $i"
:      done
:      IFS="$OLDIFS"


: 	-mouse
-- 
=-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
al aab, seders moderator                                      sed u soon 
               it is not zat we do not see the  s o l u t i o n          
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+


------------------------------

Date: 5 Oct 1997 04:56:34 GMT
From: jgloudon@bbn.remove.com (Jason Gloudon)
Subject: Re: Syntax  on assignment and undef
Message-Id: <6176m2$ger$1@daily.bbnplanet.com>

Tom Phoenix (rootbeer@teleport.com) wrote:
: On 3 Oct 1997, M.J.T. Guy wrote:

: > Tom Phoenix  <rootbeer@teleport.com> wrote:
: > >On 29 Sep 1997, Jason Gloudon wrote:
: > >
: > >> Interesting sideline here.
: > >> This compiles and does absolutely nothing.
: > >> 
: > >> () = (1,23);

: Maybe you're meaning that it would supply a list context where the context
: would be otherwise void (or perhaps scalar). But I'm still in the dark
: about what Jason's example would have done, if anything. AFAICS, it
: _should_ compile and do absolutely nothing.

I was playing with this expression, trying to understand why (1) = (1,2,3)
would be an illegal, but () = (1,23) wouldn't be. I decided to think that () 
isn't a list or array, especially considering that
@somearry = (1,23) doesn't have the same value as does () = (1,23).

Of course no one is every going to write something like this with a purpose
in mind, so i guess this doesn't really matter. *SHRUG*

Oh By the Way :

use strict;
my($ary,$art);
($ary,,$art)=(1,2,3);

Is it just me, or should this give a warning about the ",," ? It doesn't
do the same thing as ($ary,undef,$art)=(1,2,3) (nor should it), but is there
an intended meaning for this "syntax".


Jason Gloudon


------------------------------

Date: 5 Oct 1997 03:44:30 GMT
From: twod@not.valid
Subject: Re: telnet
Message-Id: <6172eu$c0d$1@vnetnews.value.net>

: I want to use PERL to telnet to a site, log on, execute a command & save
: the results in a variable, then quit telnet.
: Is this possible?

The Net::Telnet module does exactly this - it's available from your local
neighbourhood CPAN site and works just fine.

Make sure that you login and password prompts match the regexps that are, at
this point in time, hard-coded into the login method within the module and you
are up and running in no time at all. I use the module against a number of 
Unix and VMS platforms and had to alter the regexp to cater for the various
differences encountered - mainly the kerberos Unix boxes.

IAP
--
In an attempt to reduce junk email I use an invalid 'From' address.
My correct email address can be determined by replacing 'not.valid' with 
'value.net'


------------------------------

Date: Sun, 05 Oct 1997 14:42:26 GMT
From: jzawodn@wcnet.org (Jeremy D. Zawodny)
Subject: Re: telnet
Message-Id: <3438a73c.590282271@woody.wcnet.org>

[original author automagically cc'd via e-mail]

On Sat, 04 Oct 1997 20:32:29 -0400, Huron Internet <support@huron.net>
wrote:

>I want to use PERL to telnet to a site, log on, execute a command & save
>the results in a variable, then quit telnet.
>
>Is this possible?

Yes.

>I can start the telnet program with something like:
>$temp `telnet domain.com`
>but how do I issue further commands?

How about using the Net::Telnet module that's on CPAN?

Jeremy
-- 
Jeremy D. Zawodny
WCNet Technical Geek & Web Stuff
<URL:http://www.wcnet.org/~jzawodn/>

"That's an example of how Perl can bring school yard cruelty to new heights."
    -- Jon Orwant at the 1st Annual Perl Conference


------------------------------

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 1128
**************************************

home help back first fref pref prev next nref lref last post