[6612] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 238 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Apr 5 23:07:27 1997

Date: Sat, 5 Apr 97 20:02:00 -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           Sat, 5 Apr 1997     Volume: 8 Number: 238

Today's topics:
     HELP - Installing PERL for Linux (Graham Howard Wile)
     Re: HELP - Installing PERL for Linux <sfarrell@phaedrus.uchicago.edu>
     Re: Help doing a print from an array <borup@borup.com>
     Help Me Please! <giorgio@superlink.net>
     Re: Help Me Please! (Nathan V. Patwardhan)
     HELP on Perl PWS + WIN95 <thierry.beau@skynet.be>
     Help!  How do I pass filehandles to subroutines? (Eric Hollander)
     Re: Help!  How do I pass filehandles to subroutines? (Nicholas J. Leon)
     Re: Help!  How do I pass filehandles to subroutines? <jong@mrc-lmb.cam.ac.uk>
     Re: Help!  How do I pass filehandles to subroutines? <rootbeer@teleport.com>
     Help! Calling PERL from HTML... <pcion@vfi.com>
     Re: Help! Calling PERL from HTML... (Tad McClellan)
     HELP! with rand_image.pl (John M Cole)
     Re: How Do I... <rootbeer@teleport.com>
     How to remove a line from a log file (Paul Antinori)
     Re: How to remove a line from a log file (Nathan V. Patwardhan)
     Re: How to remove a line from a log file <jong@mrc-lmb.cam.ac.uk>
     Re: Interfacing perl with clearcase <domi@marlis.grenoble.hp.com>
     Re: Is function interpolation possible in RE? (Andrew M. Langmead)
     Re: lock file necessary? <rootbeer@teleport.com>
     Re: My perl script just died <rootbeer@teleport.com>
     Re: Netscape and File Upload <rootbeer@teleport.com>
     Re: New Microsoft Perl Product (fwd) (Steven W McDougall)
     newbie question: installation <blueox@mail.cyberhighway.com>
     Re: newbie question: installation (Nathan V. Patwardhan)
     opendir-readdir problem on IIS 3.0 <blazer@mail.nevalink.ru>
     Re: Oracle SQL and Perl (John D Groenveld)
     Re: ORAPERL Binary (John D Groenveld)
     Re: Oraperl CGI Problem! Help... (John D Groenveld)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 5 Apr 1997 12:49:08 GMT
From: an118@chebucto.ns.ca (Graham Howard Wile)
Subject: HELP - Installing PERL for Linux
Message-Id: <5i5ho4$n6i@News.Dal.Ca>

        I have Linux on my system, and I just visited the Perl homepages. 
It says that you can only get source distributions for the UNIX versions -
there are no binaries (except for Win32, etc platforms)

        I understand that once I download the Unix source distribution for
PERL, I have to run MAKE to build it. Are these compiling capabilities
built into Linux, or will I have to download a gcc compiler that works in
Linux too ? 

        Anybody else install PERL on Linux ? What is the best way to go
about doing it ? 

                                                        Thanks
								Graham 
 
 


--



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

Date: Sat, 5 Apr 1997 15:09:22 GMT
From: stephen farrell <sfarrell@phaedrus.uchicago.edu>
Subject: Re: HELP - Installing PERL for Linux
Message-Id: <87wwqh33rx.fsf@phaedrus.uchicago.edu>

an118@chebucto.ns.ca (Graham Howard Wile) writes:

well, it depends on your system.  for example, many linux
distributions like redhat and debian have a package management system;
this is probably your best bet.  for redhat, e.g., if you're on the
net you can just copy this into your root shell

rpm -i ftp://ftp.cc.gatech.edu/linux/distributions/redhat/redhat-4.1/i386/RedHat/RPMS/perl-5.003-6.i386.rpm

and it'll install automatically.  if you're using debian there is a
similar package system.  caldera supports rpm, and other systems can
be made to do so (such as slackware).

alternatively

1. are you sure it's not already there?  it usually "comes with"
linux.  typically it'll be in "/usr/bin" or "/usr/local/bin".

2. make.  you should learn how to use make.  most linux systems "come
with" gcc already installed.  however, most linux systems come with
perl so i'm not sure if yours fits that category.  assuming it does
have gcc, then this is usually the procedure you'd go through (and
this procedure is common for many modern unix source distributions).

	(A) ftp the file to a directory where there is some free space
		and you have write access.
	(B) tar -xzvf <whatever>tar.gz
	(C) cd <new directory>
	...i guess D & E are optional, but a *very* good idea
	(D) more README
	(E) more INSTALL
	(F) ./configure (this is a script very commonly used in
		modern source distributions that will calculate
		site-specific options... as i recall the perl one
		asks a few questions; i think as a rule the defaults
		are safe).
	(G) make
	(H) su to root
	(I) make install

if there are errors, you might be in for a bit of a long haul.  the
good news is, however, linux is usually *very* well supported, and
many many programs compile out-of-the-box with no effort on a linux
system (including perl).

if you don't have redhat, debian, or a system with gcc, then you need
to install gcc.  but if this is all true, you might have a really
archaic setup and might want to reinstall something a little more
modern.  

let me know if you need more help.

--steve farrell

>         I have Linux on my system, and I just visited the Perl homepages. 
> It says that you can only get source distributions for the UNIX versions -
> there are no binaries (except for Win32, etc platforms)
> 
>         I understand that once I download the Unix source distribution for
> PERL, I have to run MAKE to build it. Are these compiling capabilities
> built into Linux, or will I have to download a gcc compiler that works in
> Linux too ? 
> 
>         Anybody else install PERL on Linux ? What is the best way to go
> about doing it ? 
> 
>                                                         Thanks
> 								Graham 
>  
>  
> 
> 
> --


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

Date: Thu, 03 Apr 1997 16:20:24 +0200
From: Christian Borup <borup@borup.com>
To: Allen May <allenm@lexis-nexis.com>
Subject: Re: Help doing a print from an array
Message-Id: <3343BCA8.10D5@borup.com>

Allen May wrote:
> 
> I think I am making this more difficult than I should but
> it's not workin'.
> 
> I have a list of users in a file called user_list. I want
> to open the file as an array then get a print of each user
> on the list.
> 

Some thing like this should do the job:

  open(USERS, "user_list") || die "could not open file ($!)";
  @tests= <USERS>; # Reads the hole file! Not good for really big files
  foreach (@tests) {
    print "$_";
  }
  close(USERS);

Or skip the array all together, which is much more efficient for big
files.

  open(USERS, "user_list") || die "could not open file ($!)";
  while(<USERS>) {
    print "$_";
  }    

I hope this helps!

Yours
Borup


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

Date: 5 Apr 1997 19:22:44 GMT
From: "Yohan" <giorgio@superlink.net>
Subject: Help Me Please!
Message-Id: <01bc41f6$af248e20$21464ccf@giorgio.superlink.net>

I am tyring to write this word interpreter game in Javascript and it just
isn't
providing me with the functions I need.

Can any Perl Guru out there help me?


What I want the script to do is:

Word to be interpreted : APPLE


User is given some of the letters A _P_E.  In the blank spaces I want pull
downs
containing random letters, one of which being the correct one. When the
user fills in the word correctly, a message or image appears as Correct.

I need this today or tomorrow, can someone point me in the right direction?

I would be extremely grateful.

Thanks.


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

Date: 5 Apr 1997 20:01:58 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Help Me Please!
Message-Id: <5i6b3m$ff2@fridge-nf0.shore.net>

Yohan (giorgio@superlink.net) wrote:
: I am tyring to write this word interpreter game in Javascript and it just
: isn't
: providing me with the functions I need.

: Can any Perl Guru out there help me?

Let me see if I understand.  You want to write a Javascript 'script', and
need help from people skilled in Perl?  Is it just me, or do you see something
wrong with this picture, like the lack of Perl needed in the implementation?

I have a screwdriver that doubles as a hammer.  :-)

Seriously, this has nothing whatsoever to do with Perl; it either has to do
with CGI programming, or it has to do with Javascript without a CGI program.
Either way, your questions can't be answered here, but can be answered in:

- comp.infosystems.www.authoring.cgi
- comp.lang.javascript

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 5 Apr 1997 11:58:57 GMT
From: "thierry BEAU" <thierry.beau@skynet.be>
Subject: HELP on Perl PWS + WIN95
Message-Id: <01bc41b8$a72a81e0$4305eec3@skynet.be.skynet.be>

Hi folks,

I desperatly trying to have a very simple perl HELLOWORLD - u know it
probably - to work
My bible on perl is the book from SamNet  pgming with perl5 in a week

I really feel stupid writing this msg... so far .... not too good
Anyway, let s try tro get answer on the pblm

Here is my configuration

WIN95
Personal Web Server install on local PC 
Perl5 installed on the local PC
The dir topology is
\WebShare	\WWWWROOT
	    	\PERL
		\scripts
		\test
		\wwwroot

in Perl i have \ccp  \db-1.85 \perl5 and \perl-5.000
in scripts I have JAVA (we can forget about it - I Hope)

In test i have an appl.cmdl file to be used by the following
in WWWROOT i have some html which are simple pages with no script 

According to what i have understood, i shld run a perl module via an
emulator called PERFORM
using this kind of approach
-----
test.htm which is supposed 

<FORM METHOD="GET|POST" ACTION="/webshare/perform+db/perform.exe">
<INPUT TYPE=HIDDEN NAME="CmdFile" VALUE="\webshare\test\appl.cmdl">

to call a command line (appl.cmdl)
[command 1]
key_name1=c:\webshare\wwwroot\hello.pl



The result is just nothing. What i have in mind is the authorization to
execute a *.pl
apparently this is done via a chmod instruction.... very nice BUT HOW TO
ENTER THIS CMD on a non 
UNIX machine (i think chmod is a UNIX command).

I will be very happy to receive a clear advice on the above subject.

Cheers 
Thierry BEAU from Belgium



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

Date: 4 Apr 1997 17:57:39 -0800
From: hh@scam.XCF.Berkeley.EDU (Eric Hollander)
Subject: Help!  How do I pass filehandles to subroutines?
Message-Id: <5i4bij$7of@scam.XCF.Berkeley.EDU>


I'm trying to do something like this:

#/usr/local/bin/perl
use strict;

foo(<STDIN>);

sub foo {
	my($FD, $byte);

	$FD = $_[0];

	seek(<$FD>, 0, 1);
	read(<$FD>, $byte, 1)
	# ....
}


but I can't get it to work!  I looked at the FAQ about using files and
filedescriptors, but it was no help.  Is it possible to do this, or do I
have to turn off "use strict"?

Help!

e


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

Date: 5 Apr 1997 15:40:26 GMT
From: nicholas@neko.binary9.net (Nicholas J. Leon)
Subject: Re: Help!  How do I pass filehandles to subroutines?
Message-Id: <slrn5kcsit.542.nicholas@neko.binary9.net>

In article <5i4bij$7of@scam.XCF.Berkeley.EDU>, Eric Hollander wrote:
>
>I'm trying to do something like this:
>
>#/usr/local/bin/perl
>use strict;
>
>foo(<STDIN>);

foo ( \*STDIN );

will do it for you. 

>
>sub foo {
>	my($FD, $byte);
>
>	$FD = $_[0];
>
>	seek(<$FD>, 0, 1);
>	read(<$FD>, $byte, 1)
>	# ....
>}
>
>
>but I can't get it to work!  I looked at the FAQ about using files and
>filedescriptors, but it was no help.  Is it possible to do this, or do I
>have to turn off "use strict"?
>
>Help!
>
>e


-- 
 
N!
------------------------------------------------------------------------------
Nicholas J. Leon                                        <nicholas@binary9.net>
"Elegance through Simplicity"                  http://www.binary9.net/nicholas

           Be nice to your kids.  They'll choose your nursing home.



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

Date: Sat, 05 Apr 1997 17:30:07 +0100
From: "Park J. H." <jong@mrc-lmb.cam.ac.uk>
To: Eric Hollander <hh@scam.XCF.Berkeley.EDU>
Subject: Re: Help!  How do I pass filehandles to subroutines?
Message-Id: <33467E0F.2781@mrc-lmb.cam.ac.uk>

Eric Hollander wrote:
> 
> I'm trying to do something like this:

Use glob.




 
> #/usr/local/bin/perl
> use strict;
> 
> foo(<STDIN>);
> 
> sub foo {
>         my($FD, $byte);
> 
>         $FD = $_[0];
> 
>         seek(<$FD>, 0, 1);
>         read(<$FD>, $byte, 1)
>         # ....
> }
> 
> but I can't get it to work!  I looked at the FAQ about using files and
> filedescriptors, but it was no help.  Is it possible to do this, or do I
> have to turn off "use strict"?
> 
> Help!
> 
> e

-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter


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

Date: Sat, 5 Apr 1997 10:39:04 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Eric Hollander <hh@scam.XCF.Berkeley.EDU>
Subject: Re: Help!  How do I pass filehandles to subroutines?
Message-Id: <Pine.GSO.3.96.970405103444.18891C-100000@kelly.teleport.com>

On 4 Apr 1997, Eric Hollander wrote:

> Subject: Help!  How do I pass filehandles to subroutines?

>From der Frequentscsh Askent Qvestionez:

How can I make a filehandle local to a subroutine? How do I pass
filehandles between subroutines? How do I make an array of filehandles? 

   You may have some success with typeglobs, as we always had to use in
   days of old:

    local(*FH);

   But while still supported, that wasn't the best to go about getting
   local filehandles. Typeglobs have their drawbacks. You may well want
   to use the FileHandle module, which creates new filehandles for you
   (see the FileHandle manpage):

    use FileHandle;
    sub findme {
        my $fh = FileHandle->new();
        open($fh, "</etc/hosts") or die "no /etc/hosts: $!";
        while (<$fh>) {
            print if /\b127\.(0\.0\.)?1\b/;
        }
        # $fh automatically closes/disappears here
    }

   Internally, Perl believes filehandles to be of class IO::Handle. You
   may use that module directly if you'd like (see Handle), or one of its
   more specific derived classes.

Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Fri, 04 Apr 1997 16:42:31 -0800
From: Pete Cion <pcion@vfi.com>
Subject: Help! Calling PERL from HTML...
Message-Id: <33459FF7.EC2@vfi.com>

Hello!

I am testing a procedure where I call a PERL script from an HTML script,
and the PERL script is not executing.

My HTML program is basically as follows:

<HTML>
<BODY>
<FORM ACTION="testperl.pl" METHOD="POST">
            Name:<INPUT TYPE="text" NAME="realname">
           Email:<INPUT TYPE="text" NAME="email">
<INPUT TYPE="submit" VALUE="Process Order">
</FORM>
</BODY>
</HTML>

It resides on a local directory: /users/pcion/web.

The file testperl.pl, residing on the same directory, merely writes
"Hello World" to a local output file.

I use netscape to open the HTML progam as a file, hit the "Process
Order" button, but the PERL script does not run, evidenced by the lack
of output file.

Could someone give me a hand as to what I am missing?

Thanks,

Pete


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

Date: Sat, 5 Apr 1997 07:16:08 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Help! Calling PERL from HTML...
Message-Id: <oaj5i5.ej.ln@localhost>

Pete Cion (pcion@vfi.com) wrote:
: Hello!

: I am testing a procedure where I call a PERL script from an HTML script,
: and the PERL script is not executing.

: My HTML program is basically as follows:
     ^^^^^^^^^^^^


HTML is not programming.

It is merely marked-up data for some _other_ program to process (browser).


: <HTML>
: <BODY>
: <FORM ACTION="testperl.pl" METHOD="POST">
:             Name:<INPUT TYPE="text" NAME="realname">
:            Email:<INPUT TYPE="text" NAME="email">
: <INPUT TYPE="submit" VALUE="Process Order">
: </FORM>
: </BODY>
: </HTML>

: It resides on a local directory: /users/pcion/web.

: The file testperl.pl, residing on the same directory, merely writes
                                        ^^^^^^^^^^^^^^

Most servers (which is what executes the CGI script) are configured
for the scripts to be in a place separate from where the HTML
documents are stored...


: "Hello World" to a local output file.

It should pump some HTML to STDOUT too, else the browser won't
have anything to display.


: I use netscape to open the HTML progam as a file, hit the "Process
: Order" button, but the PERL script does not run, evidenced by the lack
: of output file.

: Could someone give me a hand as to what I am missing?


You are missing an HTTP server, as well as missing a basic introduction
to CGI programming in general. As this is the perl newsgroup, not the
CGI newsgroup, CGI questions are appropriately asked in the CGI newsgroup:

comp.infosystems.www.authoring.cgi


The perl FAQ, part 9, has several URLs to check for an intro to
CGI scripting:

-------------------------------
=head2 My CGI script runs from the command line but not the browser.  Can you help me fix it?

Sure, but you probably can't afford our contracting rates :-)

Seriously, if you can demonstrate that you've read the following FAQs
and that your problem isn't something simple that can be easily
answered, you'll probably receive a courteous and useful reply to your
question if you post it on comp.infosystems.www.authoring.cgi (if it's
something to do with HTTP, HTML, or the CGI protocols).  Questions that
appear to be Perl questions but are really CGI ones that are posted to
comp.lang.perl.misc may not be so well received.

The useful FAQs are:

    http://www.perl.com/perl/faq/idiots-guide.html
    http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml
    http://www.perl.com/perl/faq/perl-cgi-faq.html
    http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html
    http://www.boutell.com/faq/
-------------------------------


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Fri, 04 Apr 1997 18:46:22 -0800
From: morpha2@wavenet.com (John M Cole)
Subject: HELP! with rand_image.pl
Message-Id: <morpha2-ya023080000404971846220001@news.wavenet.com>

Hello...

Thanks for listening.  I'm up against a wall trying to get Matt's
rand_image.pl script to work in a site that I'm designing.  All seems
to be configured as per Matt's instructions, however when the perl
script sends the result back the web browser, a 'unloaded image' 
generic icon appears in place of the desired image.  I did a chmod 755
to make the file executable, but it doesn't fix the problem.

Has anyone else had this problem?  

The site is www.marklevystudio.com
The perl file is in the bin/ located inside.

the HTML tag is: <P><CENTER><IMG
SRC="http://www.marklevystudio.com/bin/rand_image.pl"
ALIGN=bottom></CENTER>

rand_image.pl is:

#! /usr/bin/perl
##############################################################################
# Basic Random Image Displayer  Version 1.2                                  # 
# Copyright 1996 Matt Wright    mattw@worldwidemart.com                      #
# Created 7/1/95                Last Modified 7/20/95                        #
# Scripts Archive at:           http://www.worldwidemart.com/scripts/        #
############################################################
# Necessary Variables
  $basedir = "/web/marklevy/rimage/";
  @files = ("01.gif","02.gif","03.gif","04.jpg","05.gif","06.gif","07.gif",
"08.jpg","09.gif","10.gif","11.gif","12.jpg","13.gif","14.gif","15.gif",
"16.jpg","17.gif","18.gif","19.gif","1a.jpg","2a.gif","3a.gif","4a.gif","5a.
jpg");

# Options
  $uselog = 0; # 1 = YES; 0 = NO
        $logfile = "/home/mattw/public_html/image/pics/piclog";

# Done
##############################################################################

srand(time ^ $$);
$num = rand(@files); # Pick a Random Number

# Print Out Header With Random Filename and Base Directory
print "Location: $basedir$files[$num]\n\n";

# Log Image
if ($uselog eq '1') {
    open (LOG, ">>$logfile");
    print LOG "$files[$num]\n";
    close (LOG);
}


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

Date: Sat, 5 Apr 1997 05:16:21 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Jerry Bradenbaugh <bradenb@ibm.net>
Subject: Re: How Do I...
Message-Id: <Pine.GSO.3.96.970405051542.2974L-100000@kelly.teleport.com>

On 4 Apr 1997, Jerry Bradenbaugh wrote:

> How do I access the user name and password fields from the dialog box
> prompted by restricting access to files or directories on a UNIX platform?

If your server gives them to you as environment variables, that's just
what you need. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: 5 Apr 1997 22:12:09 GMT
From: pa19@tiac.net (Paul Antinori)
Subject: How to remove a line from a log file
Message-Id: <pa19-0504971712130001@p3.ts11.bedfo.ma.tiac.com>

Hello:

I am writing a routine to scan a log file for a certain string and remove
it if it is present.  I am using a while (<stdin>) routine, but don't know
the command to remove the line.  Does anyone ahave any suggestions?

Thanks

Paul


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

Date: 5 Apr 1997 23:38:37 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: How to remove a line from a log file
Message-Id: <5i6npt$stn@fridge-nf0.shore.net>

Paul Antinori (pa19@tiac.net) wrote:

: I am writing a routine to scan a log file for a certain string and remove
: it if it is present.  I am using a while (<stdin>) routine, but don't know
: the command to remove the line.  Does anyone ahave any suggestions?

This question is asked two to three times a day.  I'm not trying to be
rude to you, or flame you when I request that you show a little bit of
discretion before posting to thousands of machines worldwide.

I just did a dejanews search for: comp.lang.perl.misc delete line, and
it returned 78 hits.  Hint: you won't be deleting the line, you'll be
skipping it.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: Sun, 06 Apr 1997 04:17:29 +0100
From: "Park J. H." <jong@mrc-lmb.cam.ac.uk>
To: Paul Antinori <pa19@tiac.net>
Subject: Re: How to remove a line from a log file
Message-Id: <334715C9.167E@mrc-lmb.cam.ac.uk>

Paul Antinori wrote:
> 
> Hello:
> 
> I am writing a routine to scan a log file for a certain string and remove
> it if it is present.  I am using a while (<stdin>) routine, but don't know
> the command to remove the line.  Does anyone ahave any suggestions?
> 
> Thanks
> 
> Paul


while(<STDIN>){
   if(/your pattern here/){
     next;
   }else{
     print STDOUT $_;
   }
}


I have a very quick hack to remove some lines in my
log file of httpd server. It is;



#!/usr/bin/perl
# Last Update by ./update_subroutines.pl: Thu Jan  2 03:25:38 GMT 1997
#_______________________________________________________________
# Title     : filter_log_file.pl
# Usage     : filter_log_file.pl trans*
# Function  : filters transer log files in /home/httpd/log to remove
#             localhost etc
# Example   :
# Keywords  :
# Options   :
# Returns   :
# Argument  :
# Version   : 1.0
#-----------------------------------------------------------

my(@outsider, @outsiders);

while(<>){
  if(/sonja.acad/){
  }
  elsif(/131\.111\.137\.11/){
  }
  elsif(/localhost/){
  }
  elsif(/ind5\.mrc\-lmb\./){
  }
  elsif(/^$/){
  }
  elsif(/^  +$/){
  }
  elsif(/[cv\.html|jong\.html|personal\.html]/){
	 push(@outsiders, $_);
  }
}

@outsider = @{&remove_dup_in_array(\@outsiders)};

open (OUT, ">transfer_final_log.txt");
for(sort @outsider){
  print OUT $_;
}

close OUT;



#_______________________________________________________________________
# Title     : remove_dup_in_array
# Usage     : @out2 = @{&remove_dup_in_array(\@input1, \@input2,,,,)};
#             @out1 = @{&remove_dup_in_array(\@input1 )};
# Function  : removes duplicate entries in an array.
# Example   : (1,1,1,1,3,3,3,3,4,4,4,3,3,4,4);  --> (1,3,4);
# Keywords  : merge array elements, remove_repeting_elements,
remove_array_elements
# Options   :
# Returns   : one or more references.
# Argument  : one or more refs for arrays.
# Version   : 1.0
#--------------------------------------------------------------------
sub remove_dup_in_array{
  my($i, @out_ref, %duplicate, @orig, @out_ref);
  for($i=0; $i<@_; $i++){
	  undef(%duplicate);
	  if(ref($_[$i]) eq 'ARRAY'){    @orig = @{$_[$i]};    }
	  @nondup = grep { ! $duplicate{$_}++ } @orig;
	  push(@out_ref, \@nondup);  }
  if(@out_ref ==1){ return($out_ref[0]);}
  elsif(@out_ref >1){  return(@out_ref);}
}






#________________________________________________________________________
# Title     : read_dir_names_only
# Usage     : @all_dirs_list =
@{&read_dir_names_only(\$absolute_path_dir_name, ....)};
# Function  : read any dir names and and then put in array.
# Example   :
# Warning   : This does not report '.', '..'
#             Only file names are reported. Compare with &read_any_dir
# Class     :
# Keywords  :
# Options   :
# Package   :
# Reference :
# Returns   : one ref. of array.
# Tips      :
# Argument  : takes one or more scaler references. ('.', \$path, $path,
 ... )
# Todo      :
# Author    : A Biomatic
# Version   : 3.1
# Used in   :
# Enclosed  :
#--------------------------------------------------------------------
sub read_dir_names_only{
  my($in_dir, $i,$k, @possible_dirs,
	  @final_files, $full_dir, $pwd, $path,@read_files);
  $pwd=`pwd`; chomp($pwd); $full_dir=1;
  for($k=0; $k < @_; $k++){
	 if   ( ($_[$k] eq '.') || !(defined($_[$k]))){  $in_dir=$pwd;  }
	 elsif(!(ref($_[$k]))){   $in_dir=$_[$k];   }
	 elsif(ref($_[$k])){      $in_dir =${$_[$k]};    }
	 if($in_dir =~ /^([\w\-\.]+)$/){  $in_dir="$pwd\/$in_dir"; $full_dir =
0; }
	 else{ $full_dir =1; }
	 ##########  Main READING PART ##########
	 opendir(DIR1,"$in_dir");
	 @read_files = readdir(DIR1);
	 for($i=0; $i < @read_files; $i ++){
		$read_files[$i]="$in_dir\/$read_files[$i]";
		if( ($read_files[$i] !~ /\/\.\.?$/) && ( -d $read_files[$i]) ){
		  $read_files[$i]=~s/\.\///; ## removing ./ in front of dirs (in bash)
		  push(@final_files, "$read_files[$i]");
		}
	 }
  }
  return([sort @final_files]);
}

   

-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter

http://www.smli.com/people/john.ousterhout/scripting.html


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

Date: 04 Apr 1997 11:43:09 +0200
From: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: Interfacing perl with clearcase
Message-Id: <vkzlo6zcedu.fsf@marlis.grenoble.hp.com>


If I remember well, Atria now provides a perl library. 

May be you should check with them

Hope this helps

-- 
Dominique_Dumont@grenoble.hp.com


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

Date: Sat, 5 Apr 1997 01:25:05 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Is function interpolation possible in RE?
Message-Id: <E8559t.7o9@world.std.com>

Walter Briscoe <walter@wbriscoe.demon.co.uk> writes:

>I have an application in which I want to replace characters with values
>less than space in the same way as is done in the presentation of such
>characters in vi. e.g. I want to replace "\001" with "^A". I can't use
>tr because that does a 1 to 1 mapping and I want a 1 to 2. Am I correct
>that there is no ability to interpolate functions in perl?

>i.e. that one can't do something like:
>s/([\000-\007\013-\037])/^$(chr(64+ord($1)))/g
># I use the $() backtick symbolism from the Korn shell for illustration.

There is the /e modifier, which makes the right hand side of the
substitute operator a perl expression to evaluate. That would make it:

   s/([\000-\007\013-\037])/'^' . chr(64+ord($1))/eg;

Another option would be to make a hash of all of your character
mappings ahead of time, then the result is just a simple substitution:


   # by default everything matches itself.
   %charmap = map { chr $_ , chr $_ } ( 0 .. 0377);

   # make exceptions for control characters.
   for $ctrl (0 .. 007, 013 .. 037) {
      $charmap{chr $ctrl} = '^'.chr(64 + $ctrl);
   }

   # time passes ...

   s/([\000-\007\013-\037])/$charmap{$1}/g;

-- 
Andrew Langmead


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

Date: Fri, 4 Apr 1997 16:58:01 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Geoffrey Hebert <soccer@microserve.net>
Subject: Re: lock file necessary?
Message-Id: <Pine.GSO.3.96.970404165349.21773F-100000@kelly.teleport.com>

On Thu, 3 Apr 1997, Geoffrey Hebert wrote:

> Yes, to protect a file that multiple users can update you, must do a
> file lock.  But what are the consequences of not doing so?  

If your data are so unimportant that you don't mind them being garbled,
there's no need to use lockfiles. But why then do you let it take up disk
space? 

> I do not believe that any operating system will allow two simultaneous
> opened files to shuffle data.  You do not need lock to prevent this,
> open prevents this.  If someone else has the file open you will not be
> able to open it.

Can you tell me which manpage or book told you this? Or are you making it
up? I can show you a counterexample. (Even a "counter" counterexample, if
you will. :-)

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 5 Apr 1997 05:05:32 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: Mark Perry <mdperry@cougar.netutah.net>
Subject: Re: My perl script just died
Message-Id: <Pine.GSO.3.96.970405050428.2974H-100000@kelly.teleport.com>

On Fri, 4 Apr 1997, Mark Perry wrote:

> I am trying to implement a perl script for a website that I maintain. 

When you're having trouble with a CGI form in Perl, you should first look
at the please-don't-be-offended-by-the-name Idiot's Guide to solving such
problems. It's available on the perl.com web pages. Hope this helps!

   http://www.perl.com/perl/
   http://www.perl.com/perl/faq/
   http://www.perl.com/perl/faq/idiots-guide.html

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 5 Apr 1997 05:08:43 -0800
From: Tom Phoenix <rootbeer@teleport.com>
To: CNT82784 <nrstrc9@nortel.ca>
Subject: Re: Netscape and File Upload
Message-Id: <Pine.GSO.3.96.970405050715.2974J-100000@kelly.teleport.com>

On Fri, 4 Apr 1997, CNT82784 wrote:

> Newsgroups: comp.lang.perl.misc

> Is it possible to send multiples files using the File Upload feature 
> from netscape?

Maybe, but why ask here? This isn't netscape.lang.perl.misc or
comp.netscape.perl.misc or comp.lang.netscape.misc or
comp.lang.perl.netscape. :-) 

Maybe you want to try a server or browser group, or (better yet) their
FAQ. Good luck!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/
rootbeer@teleport.com   PGP  Skribu al mi per Esperanto!
Randal Schwartz Case:     http://www.lightlink.com/fors/



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

Date: Sat, 5 Apr 1997 12:05:09 GMT
From: swmcd@world.std.com (Steven W McDougall)
Subject: Re: New Microsoft Perl Product (fwd)
Message-Id: <E85ywL.GAC@world.std.com>

Alasdair Thomson <alasdairt@private.nethead.co.uk> writes:

>I'm sorry, but the use of the "incredibly passe" if (...){} construct at
>least makes it obvious what it's attempting to do, and ensures that LESS
>MISTAKES happen during coding.

I usually avoid religious discussions, but I have to do a little
proselytizing here.  || can be a bit cryptic to the uninitiate, and has
precedence problems besides. But in perl5 you can write

  $arg eq "-n" or $arg = "-n"

This is reasonably intuitive and has the right precedence.

More importantly, it keeps the conditional local to the statment,
where it belongs, instead of creating an entire block context that I
have to keep track of in my head.

>Perhaps that's the difference between people that muck around with
>languages at college and people who's jobs depend upon them.

Ob. credentials
I've spent many, many hours of my life suffereing over other
people's bad code. And one of the most common problems is deeply
nested if-then-else constructs.

- SWM


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

Date: 5 Apr 1997 19:12:02 GMT
From: <blueox@mail.cyberhighway.com>
Subject: newbie question: installation
Message-Id: <01bc41f6$0a80ba60$52ee1ace@jupiter.viser.net>

I am having difficulty even knowing where to begin installing Perl for my
computer.  I am running Windows95 and I have no Unix O/S anywhere on my
machine.  I have a cd rom that came bundled with my PERL5 How-To book from
the Waite Group, but it seems to take for granted that Perl is already
intalled.  Would someone be kind enough to tell me how to get started on
this?  I have read faq's around the internet on Perl, but I still am in the
dark.  A kind of 1,2,3 step process would be beautiful.

Thanks in advance,
blueox


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

Date: 5 Apr 1997 19:57:55 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: newbie question: installation
Message-Id: <5i6as3$ff2@fridge-nf0.shore.net>

blueox@mail.cyberhighway.com wrote:
: this?  I have read faq's around the internet on Perl, but I still am in the
: dark.  A kind of 1,2,3 step process would be beautiful.
[snip]

Fair enough.

(1) http://www.activeware.com -> follow the links to NTPerl 5.003_07 build
    303 or 304 (I'm comfortable with 303 for my Win95 needs)
(2) Download Perl (I think it's called pwi3003.exe).
(3) Run the .exe file which executes the installer program.  Install
    Perl where you want it.  Edit your autoexec.bat file to put c:\perl5\bin
    (or wherever you've put Perl) in your path.

Reboot

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 6 Apr 1997 02:22:19 GMT
From: "Mikhail Blazer" <blazer@mail.nevalink.ru>
Subject: opendir-readdir problem on IIS 3.0
Message-Id: <01bc4230$b748db80$2f25dcc2@guest.nevalink.ru>

My script that was OK on Win32 FolkWEB server (Win95) and NetBSD now fails
on IIS 3.0.  Look at this:
$sc_log_file_directory = "../Store/Admin_files";
print "ADMIN dir:<br>\n";
   opendir (ADMIN,"$sc_log_file_directory");
      while ($_ = readdir (ADMIN)){
print "$_<br>\n";
      }
   closedir (ADMIN);

returns only first line, while dir is full of files. opendir returns 0
(false) on the same dir but open(FILE,...) ad if (-e <filename>) both work
fine on the same directory.

  Tell me please: how to overcome this. It stopes good project.
Thanks in advance.
-- 

***************************
Mike Blazer
blazer@mail.nevalink.ru
***************************


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

Date: 5 Apr 1997 21:44:24 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Oracle SQL and Perl
Message-Id: <5i72m8$28t$1@tholian.cse.psu.edu>

In article <5i1rfs$dap$1@geraldo.cc.utexas.edu>,
Marty <martym@mail.utexas.edu> wrote:
>I'm involved in a project that I need to get up and running very quickly.

My prayers are with you. Search http://www.dejanews.com with
"oracle and nt and ~g (comp.lang.perl*)" or similar query.
John
groenvel@cse.psu.edu


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

Date: 5 Apr 1997 21:24:02 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: ORAPERL Binary
Message-Id: <5i71g2$26d$1@tholian.cse.psu.edu>

In article <3342EB93.320D@lmco.com>,
Steven J. Rheintgen <steven.j.rheintgen@lmco.com> wrote:
>I have not been successful in finding oraperl binary for a sun solaris
>operating system version 2.5.  Can anyone help!
Goto CPAN for Perl5. Build/Install Perl5. Goto CPAN for DBI. Build/Install
DBI. Goto CPAN for DBD::Oracle. Build/Install DBD::Oracle.
http://www.perl.com/CPAN/

Happy Perl'ng,
John
groenvel@cse.psu.edu


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

Date: 5 Apr 1997 21:10:22 -0500
From: groenvel@cse.psu.edu (John D Groenveld)
Subject: Re: Oraperl CGI Problem! Help...
Message-Id: <5i70me$248$1@tholian.cse.psu.edu>

Quickly fetch http://www.perl.com/perl/faq/idiots-guide.html
and http://www.perl.com/perl/faq/perl-cgi-faq.html. You've encountered the
age old problem of the server user not having the same priviledges or
environment as you.

BTW: I dont think this has much to do with c.l.p.tk. Note the follow-ups.
John
groenvel@cse.psu.edu


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

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

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