[18259] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 427 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 6 14:05:59 2001

Date: Tue, 6 Mar 2001 11:05:20 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <983905520-v10-i427@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 6 Mar 2001     Volume: 10 Number: 427

Today's topics:
        "local" install of perl <bill.2.parker@bt.com>
    Re: "local" install of perl <Tassilo.Parseval@post.rwth-aachen.de>
        CGI-Book for Online-Shops in Perl <frank@gudenkauf.de>
    Re: flock and close   with  empty read strangeness (Anno Siegel)
    Re: flock and close   with  empty read strangeness (Ilya Zakharevich)
    Re: flock and close   with  empty read strangeness (Ilya Zakharevich)
    Re: how do you find shortest strings in an array of str nobull@mail.com
    Re: How do you find unique names in a hash? <c_clarkson@hotmail.com>
    Re: Installing IO::pty on Win32 <bkennedy99@Home.com>
    Re: Legal Strings for form post methods (Randal L. Schwartz)
    Re: md5 differences <tfiedler@zen.moldsandwich.com>
        opening and reading several directories on win32...perl <e.quesada@verizon.net>
    Re: opening and reading several directories on win32... <jonni@ifm.liu.se>
    Re: opening and reading several directories on win32... <e.quesada@verizon.net>
    Re: opening and reading several directories on win32... <maheshasolkar@yahoo.com>
        Perl and Java EJB <cyrille@ktaland.com>
        Perl fortune database - where? (was: Dynamic naming of  nobull@mail.com
        Perl Newbie ??? <jrcooke@hardynet.com>
    Re: Perl Newbie ??? (Jon Bell)
    Re: Perl Newbie ??? <bart.lateur@skynet.be>
    Re: Perl Newbie ??? nobull@mail.com
        Perl Problem <sean@bestnetpc.com>
    Re: Perl Problem <parrot0123@yahoo.ca>
    Re: PHP Help me please !!! <bill.baker@mediapulse.com>
    Re: PHP Help me please !!! (Bernard El-Hagin)
    Re: PHP Help me please !!! (Carsten Saathoff)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 6 Mar 2001 15:21:15 -0000
From: "Bill Parker" <bill.2.parker@bt.com>
Subject: "local" install of perl
Message-Id: <982vgg$fj4$1@pheidippides.axion.bt.co.uk>

I'm hoping someone can take pity on me and offer some concise advice...
preferably in monosyllabic terms

I need to write a set of perl scripts, bundled with various modules
(including PerlDBI or similar) and hand them over to a customer. Said
customer wants a very simple silent install - "A tarball!" you cry... and I
agree

So I need to, for example,

create /opt/billsapp

and create ~/bin, ~/src, ~/sbin etc for all the different scripts I need to
provide.

What I then want to do is install perl and the various modules inside this
directory structure and make it availabel to my scripts

a) How do I install perl in a non-default directory? I guess I can't get
away downloading a binary distro can I?

b) I can probably work out how to install the modules I want without using
the CPAN mechanism... most of them seem to be have "make/make install" type
instructions - but any tips gratefully received

c) Do I have to do anything other than use #!/opt/billsapp/perl in order to
use this perl? I mean, do I have to play with LD_LIBRARY_PATH or @INC in any
way?

----------
It might be helpful to critics if I point out that

a) I haven't written perl progs in years, so I'm rusty as hell
b) perl is already in use on some of the servers I neet to port this to, but
not all. And ususally quite old versions that I'm not allowed to overwrite.
And the customer therefore wants a completely independent installation
c) It's to work on a set of AIX boxes. Which I have never used. I'll need to
write all this under a Solaris OS and then get sweaty porting later -
hopefully, I might be rusty but I am simple-minded, so the code'll port
easily enough
d) Most of the design requirements are fixed in stone. And were before I got
involved. So lateral solutions would be interesting to read but I'll bet I'm
not allowed to use 'em!

Many thanks for any help...

Bill

p.s. Hows Randal? I hope he did appeal and did win




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

Date: Tue, 06 Mar 2001 17:42:04 +0100
From: Tassilo von Parseval <Tassilo.Parseval@post.rwth-aachen.de>
Subject: Re: "local" install of perl
Message-Id: <3AA5135C.1080007@post.rwth-aachen.de>

Hi,

Bill Parker wrote:

> I'm hoping someone can take pity on me and offer some concise advice...
> preferably in monosyllabic terms
> 
> I need to write a set of perl scripts, bundled with various modules
> (including PerlDBI or similar) and hand them over to a customer. Said
> customer wants a very simple silent install - "A tarball!" you cry... and I
> agree
> 
> So I need to, for example,
> 
> create /opt/billsapp
> 
> and create ~/bin, ~/src, ~/sbin etc for all the different scripts I need to
> provide.
> 
> What I then want to do is install perl and the various modules inside this
> directory structure and make it availabel to my scripts
> 
> a) How do I install perl in a non-default directory? I guess I can't get
> away downloading a binary distro can I?

Basically the perl executable is located somewhere in the global path, 
either /usr/bin or /usr/local/bin. But the exact position isn't so 
essential. What matters is that your script will find the interpreter 
and the according modules.

> 
> b) I can probably work out how to install the modules I want without using
> the CPAN mechanism... most of them seem to be have "make/make install" type
> instructions - but any tips gratefully received

As for installing modules, I wouldn't worry too much about it. It is 
usually this perl Makefile.pl; make; make test; make install procedure 
and in theory the makefile would look up where perl expects its modules 
(specified in @INC) and would henceforth install the new modules into 
the appropriate path.

> 
> c) Do I have to do anything other than use #!/opt/billsapp/perl in order to
> use this perl? I mean, do I have to play with LD_LIBRARY_PATH or @INC in any
> way?

Not necessarily. You could write each script with first line as

#! path/to/perl -lPath/to/modules
This -l switch is internally put in front of @INC so Perl will look 
there for the modules.
There are a few hundred other possibilities, I guess. I understand that 
you aren't allowed to install a full perl distribution on these 
machines. But you could however ask the admin to create a few symbolic 
links, linking from the default perl locations to the actual ones.

> 
> ----------
> It might be helpful to critics if I point out that
> 
> a) I haven't written perl progs in years, so I'm rusty as hell

Well, old love never 'rusts'...and either do old skills, I guess. ;-)

> b) perl is already in use on some of the servers I neet to port this to, but
> not all. And ususally quite old versions that I'm not allowed to overwrite.
> And the customer therefore wants a completely independent installation
> c) It's to work on a set of AIX boxes. Which I have never used. I'll need to
> write all this under a Solaris OS and then get sweaty porting later -
> hopefully, I might be rusty but I am simple-minded, so the code'll port
> easily enough
> d) Most of the design requirements are fixed in stone. And were before I got
> involved. So lateral solutions would be interesting to read but I'll bet I'm
> not allowed to use 'em!
> 
> Many thanks for any help...
> 
> Bill
> 
> p.s. Hows Randal? I hope he did appeal and did win

Hope so too.


Tassilo
-- 
A woman was in love with fourteen soldiers.  It was clearly platoonic.



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

Date: Tue, 06 Mar 2001 16:01:51 +0100
From: Frank Gudenkauf <frank@gudenkauf.de>
Subject: CGI-Book for Online-Shops in Perl
Message-Id: <3AA4FBDF.D65B6F5@gudenkauf.de>

Do you need a cool book for creating an online-shop in Perl?

Check it out:
http://cgi.ebay.de/aw-cgi/eBayISAPI.dll?ViewItem&item=1119782299


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

Date: 6 Mar 2001 14:27:08 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: flock and close   with  empty read strangeness
Message-Id: <982s3s$956$1@mamenchi.zrz.TU-Berlin.DE>

According to Ilya Zakharevich <ilya@math.ohio-state.edu>:
> [A complimentary Cc of this posting was sent to Anno Siegel
> <anno4000@lublin.zrz.tu-berlin.de>],
> who wrote in article <982e24$rqt$1@mamenchi.zrz.TU-Berlin.DE>:
> > > You mean, you want to turn your filesystem into a database?
> > 
> > If I had to design an OS, I'd give that serious consideration.
> 
> You do not need to design an OS to have this.  All of the contemporary
> OSes already have this up to some extend.  At least they get
> predictable locking, including locking of regions, and
> logarithmic-time directory search.  No relational stuff, but for
> the simple tie-AnyDBM-like access you can use the plain filesystems API.

Certainly, and there are successful DB implementations that rely
only on file system functions.  OTOH, quite a few of those have
proven non-scalable under growing load.  So maybe it's a good idea
to turn things around and base the file system on a "real" database.

Anno


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

Date: 6 Mar 2001 14:30:46 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: flock and close   with  empty read strangeness
Message-Id: <982sam$fna$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Bart Lateur 
<bart.lateur@skynet.be>],
who wrote in article <a2k9at4rtaqkfpbkbir7hjlitqj3846j9v@4ax.com>:
> So why do we, in general, insist on a syntax like
> 
> 	open FH, ">$name";
> 
> eh? Because it's simpler.
> 
> Now, something so common if you need file locking, needs a shortcut.

Given that fopen() does not provide one, this question is moot.
Otherwise one would do

   open FH, ">!", $name;

or some such.

Ilya


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

Date: 6 Mar 2001 19:02:07 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: flock and close   with  empty read strangeness
Message-Id: <983c7f$lf0$1@charm.magnus.acs.ohio-state.edu>

[A complimentary Cc of this posting was sent to Anno Siegel
<anno4000@lublin.zrz.tu-berlin.de>],
who wrote in article <982s3s$956$1@mamenchi.zrz.TU-Berlin.DE>:
> > You do not need to design an OS to have this.  All of the contemporary
> > OSes already have this up to some extend.  At least they get
> > predictable locking, including locking of regions, and
> > logarithmic-time directory search.  No relational stuff, but for
> > the simple tie-AnyDBM-like access you can use the plain filesystems API.
> 
> Certainly, and there are successful DB implementations that rely
> only on file system functions.  OTOH, quite a few of those have
> proven non-scalable under growing load.

This is quite probable on Unix...  I said "contemporary OSes".
AFAI've heard, BSD's file systems are logarithmic w.r.t. *one access*.
I do not know how they scale w.r.t. many concurrent accesses.  [ext2fs
is not a contender even w.r.t. one access, of course...]

Ilya


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

Date: 06 Mar 2001 17:43:46 +0000
From: nobull@mail.com
Subject: Re: how do you find shortest strings in an array of strings??
Message-Id: <u9zoeyn67h.fsf@wcl-l.bham.ac.uk>

"Todd Thal" <todd_thal@hotmail.com> writes:

> I was given code to find the shortest strings in an array of strings
> (names/email addresses)...but can't seem to get it to work...what
> wrong?

Nothing that I can see.
 
> is there a better way??

Maybe not strictly as efficient but possibly more elegant:

use List::Util qw( reduce );
my $shortest_name = reduce { length($a) < length($b) ? $a : $b } @name_list;

Even less efficently but without the reliance on non-standard libraies.

my $shortest_name = ( sort { length($a) <=> length($b) } @name_list )[0];

BTW: Does anyone know what sort() returns in a scalar context?
Currently it seems not to be defined, and indeed seems to return
undef always.

Wouldn't it be nice if scalar(sort(LIST)) returned the same as
(sort(LIST))[0] but without the inefficiency?

Actually, it would be equally useful and probably be more consistant
with other things if it returned the same as (sort(LIST))[-1].

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 6 Mar 2001 13:02:26 -0600
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: How do you find unique names in a hash?
Message-Id: <DC0D6AA607FD1C51.FE9EBECC23E9455F.81523FDE22D7CCE6@lp.airnews.net>

Todd Thal <todd_thal@hotmail.com> wrote
: Dear all:
:
: I have been asked the following but am baffled as to how to do it as a
: hash..
: I easily got it to go as an array..
:
: How do I find out if a name already exists in an array?
:
[SNIP]

    From the subject I assume you're asking:
    How do I find duplicate names in the values of a hash.

#!/usr/bin/perl -w

use strict;
use diagnostics;
use Data::Dumper;

my %emp  = (  '0002', 'charles walsh 123456789',
                        '0040', 'dick head 234567890',
                        '0026', 'jack smith 000554444',
                        '2601', 'mike wall 666336666',
                        '3205', ' charles benson 123456700');
my %dups;

while (my ($key, $val) = each %emp) {
    # code to extract name from $val
    my $name = (split ' ', $val)[0];
    # each name is a reference to an array of keys
    push @{$dups{$name}}, $key;
}

while (my ($name, $key_ref) = each %dups) {
    # if the array contains more than one key there are dups
    print "$name is in keys: @$key_ref\n\n" if $#$key_ref;
}

print Dumper \%dups;

HTH,
Charles K. Clarkson




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

Date: Tue, 06 Mar 2001 14:21:19 GMT
From: "Ben Kennedy" <bkennedy99@Home.com>
Subject: Re: Installing IO::pty on Win32
Message-Id: <zn6p6.11573$Ok4.1693217@news1.rdc1.ct.home.com>


"jibbering poster" <rob_lundXOXO@pacbell.net> wrote in message
news:O7Wo6.193$p_3.104533@news.pacbell.net...

> Gee... It sure is tough to use the Expect module in a Windwos environment.
> If anyone has Successfully run the expect module in Windows, can you
PLEASE
> email me the method you used to install it at:

Assuming you are using ActiveState's Perl, you can use their ppm tool to get
the Win32 binary from their site - at a command line (and while connected to
the Internet), type

ppm

then

install Expect

Should work fine - hope this helps

--Ben Kennedy




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

Date: 06 Mar 2001 07:17:43 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Legal Strings for form post methods
Message-Id: <m1itln9bag.fsf@halfdome.holdit.com>

>>>>> "phitshaced" == phitshaced  <lerhaupt.2@osu.edu> writes:

phitshaced> I would like to convert the string to something that is
phitshaced> legal within an html form but can't even begin to find out
phitshaced> which characters are legal.  Any thoughts on an easy
phitshaced> conversion method so that I can use the post method and
phitshaced> then re-convert it back afterwards for later use?

Client side:

    use LWP::UserAgent;
    use HTTP::Request::Common;

    my $ua = LWP::UserAgent->new;

    my $response = $ua->request(POST "http://your.server/url/goes/here",
      [ field1 => $value1, field2 => $value2, field3 => $value3 ]);
    print $response->content if $response->is_success;

Server side:

    use CGI qw(:all);
    print header('text/plain');
    my $value1 = param('field1');
    my $value2 = param('field2');
    my $value3 = param('field3');
    my $result = unseen_transformation_on($value1, $value2, $value3);
    print $result;

You can have anything you want in $value1, $value2, $value3... it will
be encoded properly on the client, and decoded properly on the server.

Simple RPC call, using HTTP protocol.  It doesn't get much simpler.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Tue, 06 Mar 2001 16:00:33 GMT
From: Ted Fiedler <tfiedler@zen.moldsandwich.com>
Subject: Re: md5 differences
Message-Id: <Pine.LNX.4.30.0103061101020.1174-100000@zen.moldsandwich.com>

On Tue, 6 Mar 2001, Gwyn Judd wrote:

>
> Insert the line 'undef $/' at the start. You're welcome :)
>

why am I doing this?

and thanks

ted

-- 
"We're not like the  |  Ted Fiedler
 others. We're your  |  tfiedler@zen.moldsandwich.com
 friends" --HST      |  http://www.moldsandwich.com



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

Date: Tue, 06 Mar 2001 14:15:08 GMT
From: "Scaramouche" <e.quesada@verizon.net>
Subject: opening and reading several directories on win32...perl beginner.
Message-Id: <Mh6p6.114$1c.79529@dfiatx1-snr1.gtei.net>

i've been working on a script that'll report back to me the total size in
bytes from a specific directory.  the code below does that, however, i would
now like to read from a number of directories within that structure and have
the script print out to the screen that number in bytes of all those
directories read but have not been successful.  dir structure is similar to
the following:

d:\test\a
d:\test\b
d:\test\c
d:\test\d
d:\test\e
 ...and so on.
any suggestions?

thank you.

opendir(testDir, 'test');
@allFilesWithinDir=readdir(testDir);
$totalBytes=0;
foreach $fileNames (@allFilesWithinDir)
 {
  if(-d $fileNames){next}#only interested in files within dir
  print "$fileNames\n";
  $totalBytes +=(-s "D:/test/$fileNames");
 }
closedir(testDir);
#
print ("$totalBytes");




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

Date: Tue, 6 Mar 2001 16:27:35 +0100
From: "Jonas Nilsson" <jonni@ifm.liu.se>
Subject: Re: opening and reading several directories on win32...perl beginner.
Message-Id: <982vir$dbv$1@newsy.ifm.liu.se>

> now like to read from a number of directories within that structure and
have
> the script print out to the screen that number in bytes of all those

>
> opendir(testDir, 'test');
> @allFilesWithinDir=readdir(testDir);
> $totalBytes=0;
> foreach $fileNames (@allFilesWithinDir)
>  {
>   if(-d $fileNames){next}#only interested in files within dir
>   print "$fileNames\n";
>   $totalBytes +=(-s "D:/test/$fileNames");
>  }
> closedir(testDir);
> #
> print ("$totalBytes");

One way:

foreach $directory ('d:/test/a','d:/test/b','d:/test/c') {
 opendir(testDir, $directory);
 @allFilesWithinDir=readdir(testDir);
 $totalBytes=0;
 foreach $fileNames (@allFilesWithinDir)
  {
   if(-d "$directory/$fileNames"){next}#only interested in files within dir
   print "$fileNames\n";
   $totalBytes +=(-s "$directory/$fileNames");
  }
 closedir(testDir);
 #
 print ("In $directory the files total to $totalBytes bytes.\n\n");
}


--
 _____________________     _____________________
|   Jonas Nilsson     |   |                     |
|Linkoping University |   |      Telephone      |
|       IFM           |   |      ---------      |
| Dept. of Chemistry  |   | work: +46-13-285690 |
|  581 83 Linkoping   |   | fax:  +46-13-281399 |
|      Sweden         |   | home: +46-13-130294 |
|_____________________|   |_____________________|





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

Date: Tue, 06 Mar 2001 17:08:11 GMT
From: "Scaramouche" <e.quesada@verizon.net>
Subject: Re: opening and reading several directories on win32...perl beginner.
Message-Id: <%P8p6.351$1c.144923@dfiatx1-snr1.gtei.net>

This works.  Thank you so much for your help.
"Jonas Nilsson" <jonni@ifm.liu.se> wrote in message
news:982vir$dbv$1@newsy.ifm.liu.se...
> > now like to read from a number of directories within that structure and
> have
> > the script print out to the screen that number in bytes of all those
>
> >
> > opendir(testDir, 'test');
> > @allFilesWithinDir=readdir(testDir);
> > $totalBytes=0;
> > foreach $fileNames (@allFilesWithinDir)
> >  {
> >   if(-d $fileNames){next}#only interested in files within dir
> >   print "$fileNames\n";
> >   $totalBytes +=(-s "D:/test/$fileNames");
> >  }
> > closedir(testDir);
> > #
> > print ("$totalBytes");
>
> One way:
>
> foreach $directory ('d:/test/a','d:/test/b','d:/test/c') {
>  opendir(testDir, $directory);
>  @allFilesWithinDir=readdir(testDir);
>  $totalBytes=0;
>  foreach $fileNames (@allFilesWithinDir)
>   {
>    if(-d "$directory/$fileNames"){next}#only interested in files within
dir
>    print "$fileNames\n";
>    $totalBytes +=(-s "$directory/$fileNames");
>   }
>  closedir(testDir);
>  #
>  print ("In $directory the files total to $totalBytes bytes.\n\n");
> }
>
>
> --
>  _____________________     _____________________
> |   Jonas Nilsson     |   |                     |
> |Linkoping University |   |      Telephone      |
> |       IFM           |   |      ---------      |
> | Dept. of Chemistry  |   | work: +46-13-285690 |
> |  581 83 Linkoping   |   | fax:  +46-13-281399 |
> |      Sweden         |   | home: +46-13-130294 |
> |_____________________|   |_____________________|
>
>
>




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

Date: Tue, 6 Mar 2001 10:06:38 -0800
From: "Mahesh A" <maheshasolkar@yahoo.com>
Subject: Re: opening and reading several directories on win32...perl beginner.
Message-Id: <taa9pg246t8o27@corp.supernews.com>

"Scaramouche" <e.quesada@verizon.net> wrote in message
news:Mh6p6.114$1c.79529@dfiatx1-snr1.gtei.net...
> i've been working on a script that'll report back to me the total size in
> bytes from a specific directory.  the code below does that, however, i
would
> now like to read from a number of directories within that structure and
have
> the script print out to the screen that number in bytes of all those
> directories read but have not been successful.  dir structure is similar
to
> the following:
>
> d:\test\a
> d:\test\b
> d:\test\c
> d:\test\d
> d:\test\e
> ...and so on.
> any suggestions?
>
> thank you.

May be this script helps ...

#!/usr/local/bin/perl -w
# "treed" is a Perl-5 script. Copyright (C) 1999-2002 by Mahesh Asolkar
# Draws the directory tree of files on the system
# Usage: treed [options] StartDir
#    StartDir : Root of directory tree
#               Defaults to current directory if not specified
#    options:
#      -h     : Shows this help message
#      -s     : Shows size of file
#      -a     : Shows . & .. directories
#      -S     : Shows only cummulative size of the tree
#      -[num] : Shows only branches till 'num' depth. Defaults to 100.
#    Note:
#      Total size cannot be displayed if depth is restricted

# Argument parsing ....
$::ShowSize = 0;
$::ShowDots = 0;
$::ShowCummSizeOnly = 0;
$::StartDir = ".";
$::DirLevel = 0;
$::DirRef = -1;
map {
    if ($_ =~ /^-/) {
        my $Options = $';
        &Usage() if ($Options =~ /h/);
        $::ShowSize = 1 if ($Options =~ /s/);
        $::ShowDots = 1 if ($Options =~ /a/);
        $::ShowCummSizeOnly = 1 if ($Options =~ /S/);
        $::DirRef = $1 if ($Options =~ /^(\d+)$/);
    } else {
        $::StartDir = $_;
    }
} @ARGV;
$::TotalSize = 0;
$::Offset = length($::StartDir);
print "Root  : ".$::StartDir."\n";
print "Depth : $::DirRef\n" if ($::DirRef >=0);
$::DirRef++ if ($::DirRef >=0);
&::TraverseDir($::StartDir);

print "\nTotal Size of files in root : ".$::TotalSize." Bytes.\n" if
($::DirRef == -1);

# TraverseDir : Traverse the directory structure
#    A recursive routine which will find all the files
#    in the directory structure
sub TraverseDir {
    my $LocalStartDir = shift;
    $::DirLevel++;
    unless (opendir (STDIR, $LocalStartDir)) { die "Cannot open
$LocalStartDir to read\n";}
    map {
        my
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,
$blocks) = stat("$LocalStartDir/$_");
        if ((-d "$LocalStartDir/$_") and ($_ ne ".") and ($_ ne "..") and
(!(-l "$LocalStartDir/$_"))) {
            if ($::DirRef >=0) {
                if ($::DirLevel < $::DirRef) {
                    if (!($::ShowCummSizeOnly)) {
                        print " " x (length($LocalStartDir) -
$::Offset).(($::DirLevel == ($::DirRef-1)) ? "O" : "#")." $_".(($::DirLevel
== ($::DirRef-1)) ? " [Skipping inside stuff]" : "")."\n";
                    }
                    &::TraverseDir("$LocalStartDir/$_");
                }
            } else {
                if (!($::ShowCummSizeOnly)) {
                    print " " x (length($LocalStartDir) -
$::Offset).(($::DirLevel == ($::DirRef-1)) ? "O" : "#")." $_".(($::DirLevel
== ($::DirRef-1)) ? " [Skipping inside stuff]" : "")."\n";
                }
                &::TraverseDir("$LocalStartDir/$_");
            }
            # &::TraverseDir("$LocalStartDir/$_");
        } else {
            if (($_ ne ".") and ($_ ne "..") and (!(-l
"$LocalStartDir/$_"))) {
                $::TotalSize += $size;
            }
            if (!($::ShowCummSizeOnly)) {
                if (($::ShowDots) or (($_ ne ".") and ($_ ne ".."))) {
                    if ($::DirRef >=0) {
                        if ($::DirLevel < $::DirRef) {
                            print " " x (length($LocalStartDir) - $::Offset)
 ."| $_";
                            if (-l "$LocalStartDir/$_") {
                                print " -> ", readlink
("$LocalStartDir/$_");
                            } else {
                                print " [$size]" if ($::ShowSize == 1);
                            }
                            print "\n";
                        }
                    } else {
                        print " " x (length($LocalStartDir) - $::Offset) ."|
$_";
                        if (-l "$LocalStartDir/$_") {
                            print " -> ", readlink ("$LocalStartDir/$_");
                        } else {
                            print " [$size]" if ($::ShowSize == 1);
                        }
                        print "\n";
                    }
                }
            }
        }
    } readdir(STDIR);
    closedir(STDIR);
    $::DirLevel--;
}

sub Usage () {
    open(SCRIPT, "$0") || die "Can\'t find script file.\n";
    <SCRIPT>;   # discard first line (the perl invocation line).
    while ( <SCRIPT> ) {
        /^# ?(.*\n)/ ? print $1 : die "\n";
    }
    die;        # for completeness...should already be dead!
}
__END__

Run...

% treed -h

M.




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

Date: Tue, 06 Mar 2001 15:28:11 +0100
From: Cyrille Giquello <cyrille@ktaland.com>
Subject: Perl and Java EJB
Message-Id: <3AA4F3FB.59DAA5A3@ktaland.com>

Hi,

I would like to know if it's possible to communicate for a Java app to a Perl app using
EJB.
Is there a modules implementing a compatible EJB module ?
Do I need an EJB Server for translation ?

Thanx,
Cyrille





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

Date: 06 Mar 2001 17:42:49 +0000
From: nobull@mail.com
Subject: Perl fortune database - where? (was: Dynamic naming of arrays or hashes)
Message-Id: <u93dcqokti.fsf@wcl-l.bham.ac.uk>

mjd@plover.com (Mark Jason Dominus) writes:

> In article <3aa1eb3c.2502189918@news.wildapache.net>,
> OTR Comm <otrcomm***NO-SPAM***@wildapache**NO-SPAM***.net> wrote:
> >I will use your approach so I can turn 'use strict' back on.
> 
> That is a little like saying you have decided to stop setting your
> furniture on fire, because you want to be able to turn your smoke
> alarms back on.

OK, who's maintaining a Perl "fortune" database?  That's gotta be
worthy:

[Elimitiating symrefs so you can "use strict"]... is a little like
saying you have decided to stop setting your furniture on fire,
because you want to be able to turn your smoke alarms back on.
                                -- Mark Jason Dominus in c.l.p.misc

Seriously, this is too good to be allowed to fade into history. I've
done a quick search on www.perl.com and on Google but I've not found a
Perl "fortune" database - anyone know where one is.  (Nearest I could
find was the FAQ: "Where can I get a list of Larry Wall witticisms?")

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 6 Mar 2001 12:09:31 -0500
From: "Jason Cooke" <jrcooke@hardynet.com>
Subject: Perl Newbie ???
Message-Id: <9835he$51dq$1@news3.infoave.net>

how in the world do i get perl installed on windows 2000    any ideas

jason




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

Date: Tue, 6 Mar 2001 17:18:55 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: Perl Newbie ???
Message-Id: <G9sDFK.J8w@presby.edu>

In article <9835he$51dq$1@news3.infoave.net>,
Jason Cooke <jrcooke@hardynet.com> wrote:
>how in the world do i get perl installed on windows 2000    any ideas

What problems are you having, specifically?

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA


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

Date: Tue, 06 Mar 2001 17:41:20 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: Perl Newbie ???
Message-Id: <ia8aatojv60e8l08thbj0gu39d9a5oide4@4ax.com>

Jason Cooke wrote:

>how in the world do i get perl installed on windows 2000    any ideas

Get either ActivePerl from Activestate, <www.activestate.com> or
IndigoPerl from IndigoStar, <www.indigostar.com>.

-- 
	Bart.


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

Date: 06 Mar 2001 18:30:37 +0000
From: nobull@mail.com
Subject: Re: Perl Newbie ???
Message-Id: <u9n1ayn41e.fsf@wcl-l.bham.ac.uk>

"Jason Cooke" <jrcooke@hardynet.com> writes:

> Subject: Perl Newbie ???

Translation: Person too selfish/arrogant/lazy to think about subject lines.

> how in the world do i get perl installed on windows 2000

What happened when you tried?

>    any ideas

Nope, no idea at all.

I assume you went to the website with the bindingly obvious URL,
followed the obvious links to find a binary distribution for the Win32
platform, downloaded it, tried to install it and something failed.

So tell us what failed!

If you did not manage to work out the above procedure then frakly you
probably shouldn't bother.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Tue, 6 Mar 2001 10:06:43 -0500
From: "Sean Chambers" <sean@bestnetpc.com>
Subject: Perl Problem
Message-Id: <ta9vcnk870k202@corp.supernews.com>

I am writing a script that has multiple included files. I seem to have a
problem with running sub routines without them being called in some of the
required files. Someone told me this is due to the fact that I did not use
strict. Any suggestions? If i should use strict does anyone have a good
tutorial on it? Thank you ahead of time.
--

Sean Chambers
sean@bestnetpc.com
http://www.bestnetpc.com
BestNetPC Web Developement
(904) 447-8259




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

Date: Tue, 06 Mar 2001 15:29:24 GMT
From: "Parrot" <parrot0123@yahoo.ca>
Subject: Re: Perl Problem
Message-Id: <on7p6.346577$f36.12102731@news20.bellglobal.com>

Sean Chambers <sean@bestnetpc.com> wrote in message
news:ta9vcnk870k202@corp.supernews.com...
> I am writing a script that has multiple included files. I seem to have a
> problem with running sub routines without them being called in some of the
> required files. Someone told me this is due to the fact that I did not use
> strict. Any suggestions? If i should use strict does anyone have a good
> tutorial on it? Thank you ahead of time.
> --

No tutorial needed to use strict, you just have to place this line of code
near the beginning of your program:

use strict;

All it means is that the system won't let you create variables on the fly,
it will force you to declare them first.  Makes for a good programming
practice.

I don't think that would usually affect include files though.  At least I
haven't heard of that happening.  Are you sure you haven't made a typo
somewhere?




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

Date: Tue, 06 Mar 2001 14:13:07 GMT
From: "Bill Baker" <bill.baker@mediapulse.com>
Subject: Re: PHP Help me please !!!
Message-Id: <Sf6p6.63218$nL5.3883557@news3.aus1.giganews.com>

"calimhero" <calimhero@galbord.com> wrote in message
news:3aa4d153@kirchberg2.clt-ufa.net...
> sorry for my questions here but i don't now where ask my question,
> i am a new developper  in php and i have a question :
> i get the current month with

http://search.yahoo.com/bin/search?p=PHP




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

Date: Tue, 6 Mar 2001 14:22:20 +0000 (UTC)
From: bernard.el-hagin@lido-tech.net (Bernard El-Hagin)
Subject: Re: PHP Help me please !!!
Message-Id: <slrn9a9sg6.6ou.bernard.el-hagin@gdndev32.lido-tech>

On Tue, 6 Mar 2001 13:00:25 +0100, calimhero <calimhero@galbord.com>
wrote:
>sorry for my questions here but i don't now where ask my question,
>i am a new developper  in php and i have a question :
>i get the current month with
>
><?
>print (date("F")) ;
>?>
>
>and i want the next month so how to please ????????

If you're too stupid to figure out where to post your question you're
certainly too stupid to understand the answer.

*kerplonk*

Cheers,
Bernard
--
#requires 5.6.0
perl -le'* = =[[`JAPH`]=>[q[Just another Perl hacker,]]];print @ { @ = [$ ?] }'


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

Date: 6 Mar 2001 16:21:27 GMT
From: kodemaniak@gmx.de (Carsten Saathoff)
Subject: Re: PHP Help me please !!!
Message-Id: <slrn9aa3s9.13o.kodemaniak@kodemaniak.matrix>

calimhero <calimhero@galbord.com> wrote:

> sorry for my questions here but i don't now where ask my question,
> i am a new developper  in php and i have a question :
> i get the current month with
> 
> <?
> print (date("F")) ;
> ?>
> 
> and i want the next month so how to please ????????
> 
> 
 try the Newagroup alt.php

here you won't get an answer I guess...

-- 
Carsten Saathoff <kodemaniak@gmx.de>
ICQ #52558095

 ...powered by Linux


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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.

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 V10 Issue 427
**************************************


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