[10788] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4389 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Dec 9 14:07:30 1998

Date: Wed, 9 Dec 98 11:00:22 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 9 Dec 1998     Volume: 8 Number: 4389

Today's topics:
        ActiveState VPN Libnet install error <soccer@all-soccer.com>
    Re: ANN: Ruby the object-oriented scripting language (Adam Turoff)
    Re: Beginner Book? <jeromeo@atrieva.com>
    Re: Better way to get values from a list? <karl_jensen@hp.com>
    Re: Better way to get values from a list? <uri@ibnets.com>
    Re: Better way to get values from a list? <Allan@due.net>
    Re: Better way to get values from a list? (Matthew Bafford)
    Re: Better way to get values from a list? (Larry Rosler)
    Re: Can someone tell me why .... (brian d foy)
    Re: Code Bash: File Include <uri@ibnets.com>
    Re: Decent Editor <zenin@bawdycaste.org>
    Re: Embedded Perl, or library? (Fluffy)
    Re: Errors with SETUID and Perl Script mike_orourke@em.fcnbd.com
        Hash from Two Array? <sisl@ihug.co.nz>
    Re: Hash from Two Array? (Sean McAfee)
    Re: Hash from Two Array? (brian d foy)
        how to get screen size? <rollo@hknet.com>
        INSERT'ing with Win32::ODBC <kohsuan@psychosphere.net>
    Re: Installing Perl5.004 Solaris 2.6 (brian d foy)
    Re: Is there a 'predeclare subs' module ? <uri@ibnets.com>
        Net::Ping bobs614@my-dejanews.com
        Perl and Java question. <davidjan@mtu.edu>
        pop3 <MatharuN@Logica.com>
    Re: pop3 (I R A Aggie)
        TCL <-> PERL, what's better. <stud0v64@nortel.com>
    Re: TCL <-> PERL, what's better. (Brand Hilton)
        testing a perl install <shankeyp@charlestoncounty.org>
        Unix Perl interfacing with NT ODBC <cherry66@widomaker.com>
    Re: Y2K potential problem in localtime() (Craig Berry)
    Re: Y2K potential problem in localtime() (Craig Berry)
        Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)

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

Date: Wed, 09 Dec 1998 12:52:34 -0500
From: Geoffrey Hebert <soccer@all-soccer.com>
Subject: ActiveState VPN Libnet install error
Message-Id: <366EB8E1.BD3F3DA1@all-soccer.com>

ActiveState VPN works for others, but fails on install of libnet.

Here is the error.  Anyone have any idea what it might mean?

Internet Exployer cannot open the internet site
http://localhost.4444/vpm.pl?CurrentQuery=INSTALL&localaction=http://www.activestate.com/packages/&action=install&select.libnet=checked.



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

Date: 9 Dec 1998 12:43:57 -0500
From: ziggy@panix.com (Adam Turoff)
Subject: Re: ANN: Ruby the object-oriented scripting language
Message-Id: <74mcst$3gp@panix.com>

Yukihiro Matsumoto  <matz@netlab.co.jp> wrote:
>Hi.
>
>I'd like to introduce you Ruby the object-oriented scripting language
>from Japan, which:
>
>  * is object-oriented from scratch.
>  * is totally free, open-source language.
>  * has exception handling.
[yadda yadda yadda]

Looks like Christmas came early this year.  :-) :-)

I was going to create a language this Xmas and call it Dwarf, complete
with builtins like 'cat', 'gimboid', and 'vindaloo'.  Oh well...

Z.  



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

Date: Wed, 09 Dec 1998 08:53:54 -0800
From: Jerome O'Neil <jeromeo@atrieva.com>
To: Ronald J Kimball <rjk@linguist.dartmouth.edu>
Subject: Re: Beginner Book?
Message-Id: <366EAB22.A5432890@atrieva.com>

Ronald J Kimball wrote:
> 
> Jerome O'Neil <jeromeo@atrieva.com> wrote:
> 
> > Nnickee wrote:
> >
> > > I answered the original post with what worked *for me*.
> >
> > Ultimately, this is the only thing that matters.  If you like the book,
> > and it helps you learn, then it's a good book.
> 
> With one significant caveat; someone who is using the book to learn Perl
> probably will not recognize technical errors in the book.
> 
> What the book teaches is just as important as whether the book teaches.

I don't dissagree with that too much.  I would think that even for an
absolute novice, though, a book written at the level of P5FD will be
nothing but an introductory text, and will soon need to be supplanted
with more rigorus content.

Perl's natural language syntax keeps the learning curve low, but still
offers glimpses of it's power for more advanced needs.  Obviously the
O'Reilly books are superior, but the other books have a place as well. 

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.atrieva.com


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

Date: Wed, 09 Dec 1998 10:31:22 -0700
From: "Karl G. Jensen" <karl_jensen@hp.com>
Subject: Re: Better way to get values from a list?
Message-Id: <366EB3EA.47846C10@hp.com>

Thanks to all for the help. You folks are great! I kept the "foreach"
alternative because it's easier to read than the "map" alternative. I
was thinking there might be some terse way to split the one array into
two. It's good to know that the iteration is necessary.

I can't use a hash in this situation. I want to preserve the list order.


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

Date: 09 Dec 1998 12:22:47 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Better way to get values from a list?
Message-Id: <39vhjls00o.fsf@ibnets.com>

>>>>> "A" == Abigail  <abigail@fnx.com> writes:

  A> @B = grep {/=./s} @AB;

dear abby,

this doesn't do the right thing. he only wanted the part after the = in
the result array. check out the many other posts in this thread
including my speedy join and m// version.

BTW where have you been? i am debating whether i missed you or not.

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ibnets.com	


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

Date: Wed, 9 Dec 1998 13:14:16 -0500
From: "Allan M. Due" <Allan@due.net>
Subject: Re: Better way to get values from a list?
Message-Id: <74mec8$eh2$1@camel18.mindspring.com>

Karl G. Jensen wrote in message <366EB3EA.47846C10@hp.com>...
>Thanks to all for the help. You folks are great! I kept the "foreach"
>alternative because it's easier to read than the "map" alternative. I
>was thinking there might be some terse way to split the one array into
>two. It's good to know that the iteration is necessary.
>
>I can't use a hash in this situation. I want to preserve the list order.

To maintain order, you might want to checkout the Tie::IxHash module at some
point.

perldoc Tie::IxHash

AmD




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

Date: Wed, 9 Dec 1998 13:14:58 -0500
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Better way to get values from a list?
Message-Id: <MPG.10d8882f60b15b6c989753@news.scescape.net>

In article <1djqmsi.crv4dgv03sowN@bay2-73.quincy.ziplink.net>, 
rjk@linguist.dartmouth.edu says...
=> I don't think it will significantly change the Benchmark results, but

You should always test... :-)

=> you should be aware that when the above Benchmark finished, the array
=> @result contained 199608 elements.
=> 
=> Push =>
=>    sub { @result = (); foreach (@a) { push @result, $1 if /=(.*)/ } },

Benchmark: timing 65536 iterations of Join, Map, Push, RPush...
      Join:  6 wallclock secs ( 6.59 usr +  0.00 sys =  6.59 CPU)
       Map:  6 wallclock secs ( 6.26 usr +  0.00 sys =  6.26 CPU)
      Push: 12 wallclock secs (11.42 usr +  0.00 sys = 11.42 CPU)
     RPush: 22 wallclock secs (21.25 usr +  0.00 sys = 21.25 CPU)

The exact opposite of what I expected.

But then, I never started thrashing, either.  I imagine on a low memory 
system (luckily I don't have access to one to test this ;-), the 
thrashing saved would make RPush better than Push...

--Matthew


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

Date: Wed, 9 Dec 1998 10:42:44 -0800
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Better way to get values from a list?
Message-Id: <MPG.10d864806592ff459898b2@nntp.hpl.hp.com>

[Posted to comp.lang.perl.misc and a copy mailed.]

In article <x7k901vs0x.fsf@sysarch.com> on 08 Dec 1998 23:49:34 -0500, 
Uri Guttman <uri@sysarch.com> says...
> >>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
 ...
>   LR> ActiveState 5.005_02 (mine, all mine)
>   LR> Benchmark: timing 65536 iterations of Join, Map, Push...
>   LR>       Join:  3 wallclock secs ( 4.52 usr +  0.00 sys =  4.52 CPU)
>   LR>        Map:  4 wallclock secs ( 5.03 usr +  0.00 sys =  5.03 CPU)
>   LR>       Push:  9 wallclock secs ( 8.55 usr +  0.09 sys =  8.64 CPU)
 ...
> who are you calling an imaginative monster? :-)

If the shoe fits... :-)
 
> i thought that my only does 2 perl ops and the join loop has not as much
> work to do as map or foreach. the single m//mg would definitely be
> faster than multiple m//'s in those loops.

So two loops are faster than one!  The key must be that the marginal 
cost of looping inside the regex is much less than the initialization 
cost of launching a regex match for each operand.  That is certainly 
instructive.

> i wasn't surprised but very happy to win the speed prize. just typical
> perl, you can go for brevity or speed (sometimes both!).
> 
> also ronald is right, you should rebench it with @results = (),
> otherwise you are doing lots of reallocs in that code.

Benchmark: timing 65536 iterations of Join, Map, Push...
      Join:  5 wallclock secs ( 4.56 usr +  0.00 sys =  4.56 CPU)
       Map:  5 wallclock secs ( 5.00 usr +  0.00 sys =  5.00 CPU)
      Push: 10 wallclock secs ( 8.92 usr +  0.00 sys =  8.92 CPU)

He, he.  It got slower (though more correct)!  Evidently the time to 
clear the target array on each loop through the benchmark outweighs the 
'lots of reallocs'.  I don't see why there would be 'lots of reallocs' 
in any case.  Assuming each is done reasonably (doubling the allocated 
size each time), the number of reallocs should be logarithmic, not 
linear.  So there are few reallocs, but lots of resets.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Company
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Wed, 09 Dec 1998 12:12:07 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Can someone tell me why ....
Message-Id: <comdog-ya02408000R0912981212070001@news.panix.com>

In article <74kdlj$luh$1@black.news.nacamar.net>, "Owen" <info@kn1.com> posted:

> this script for a chat programm does not delete the message database when
> the limit is reached. It does reset the counter to 0 but does not delete the
> database

didn't look like you were using a database.

btw, it would be better to move the configuration stuff outside of the
script and make it friendly to non programmers.

and the CGI input parser is broken in the usual way.

[if you want the right people to help you, you'll have to make your
stuff not-so-painful-to-look-at]

> Website Design with an Attitude.....(You Pay, We Play)

heh.

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: 09 Dec 1998 12:18:31 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Code Bash: File Include
Message-Id: <39ww41s07s.fsf@ibnets.com>

>>>>> "DG" == Daniel Grisinger <dgris@moiraine.dimensional.com> writes:

  DG> Uri Guttman <uri@ibnets.com> writes:
  >> >>>>> "RS" == Randal Schwartz <merlyn@stonehenge.com> writes:
  >> 
  >> >>>>> "Uri" == Uri Guttman <uri@sysarch.com> writes:
  Uri> so a challenge for you would be a one liner that would also exit
  Uri> the @ARGV loop with an error message.
  >>

  >> please try again.

  DG> { map { open __, $_ or (warn ("oops: $_ $!") && last); print <__>
  DG> } @files }

i can't wait til randal strangles you for the void map!

:-)

use a foreach modifier and you can drop the parens on the 'or' clause

do { open F, $_ or warn ("oops: $_ $!") && last; print while <F> } for @files ;


uri


-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ibnets.com	


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

Date: 09 Dec 1998 18:24:09 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: Decent Editor
Message-Id: <913227905.944812@thrush.omix.com>

Antony <amcnulty@nortel.co.uk> wrote:
: I'd really like to have an editing program for my PERL scripts that shows
: each subroutine as different pages, or something similar to that.
: I'm not really sure if I'm explaing that well or not.

	Hmm, I normally just do a search for the next "sub " myself.

: Anyway, Anyone got any knowledge of where I may find such an editor ??
: Doesn't need to be PERL  specific.

	Normally for code editors I suggest joe (Joe's Own Editor), Emacs,
	and vim (*not* ever plain vi for code editing), in that order.  I'm
	not sure however, if any of these can do this particular function
	(though Emacs and vim should likely be able to add this via there
	extension interfaces).

	Knowing what platform you're on (Unix vs Windows vs Mac) would
	likely help in offering choices as well.

-- 
-Zenin (zenin@archive.rhps.org)           From The Blue Camel we learn:
BSD:  A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts.  Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.)  The full chemical name is "Berkeley Standard Distribution".


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

Date: 9 Dec 1998 18:39:55 GMT
From: meowing@banet.net (Fluffy)
Subject: Re: Embedded Perl, or library?
Message-Id: <slrn76tgvq.77i.meowing@meowhost.meow.invalid>

jbharvey@home.net <jbharvey@home.net> wrote:
> I'm looking to make use of Perl in an embedded fashion...as an interpreted
> language for a virtual world.  Does Perl have the ability to be a library
> and then linked into other programs?

Sure!  Both INN and Apache use this feature with quite a bit of
success.

> Weird question, I know.

Nah.  See the perlembed pod for how to do it.  Just take care not to
get _too_ cute; oddities like running certain XS-based modules inside
a perl script embedded in a C app may cause your app to die horribly
on some platforms, but in general it's pretty smooth.



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

Date: Wed, 09 Dec 1998 16:55:06 GMT
From: mike_orourke@em.fcnbd.com
Subject: Re: Errors with SETUID and Perl Script
Message-Id: <74ma19$be9$1@nnrp1.dejanews.com>

In article <74m451$60g$1@nnrp1.dejanews.com>,
  mike_orourke@em.fcnbd.com wrote:
> In article <74ki3b$sqj$1@nnrp1.dejanews.com>,
>   mike_orourke@em.fcnbd.com wrote:
> > In article <74k85g$k4t$1@nnrp1.dejanews.com>,
> >   mike_orourke@em.fcnbd.com wrote:
> > > In article <74juha$7lu$1@camel18.mindspring.com>,
> > >   "Allan M. Due" <Allan@due.net> wrote:
> > > > mike_orourke@em.fcnbd.com wrote in message
> > > > <74jtnh$ana$1@nnrp1.dejanews.com>...
> > > >
> > > > [snip]
> > > >
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own
>
> As you can tell by now, I am new to this web site. The "preview" always looks
> O.K.
>
> However, I am not going to give up on this.
>
> I will get this thing formatted correctly if its the only thing I do today.

>I created a perl script that will allow users to "chown" files that they own
>to another valid UID on the server.  I seemed to have resolved the "tainted"
>data problem, but now the "chown" command is still failing. The Perl script
>has "4755" permissions and is owned by "root". When I run the script as
>"root", everything works O.K. But when I run the script while connected as
>the "owner" of the file I am trying to modify, I get the following message :

>chown: /export/home/lddv/test_chmod.txt: Not owner
>Could not run CHMOD at /dev/fd/3 line 48.

Below is an example of the code that I am using :

> $old_path = $ENV{"PATH"} ;
>
> $directory = "/export/home/lddv" ;
>
> $filename> = "test_chmod.txt" ;
>
> $file_owner = "lao7" ;
>
> if ($filename =~> /^([-\@\w.]+)$/) {
>   $filename = $1 ;
> } else {
>   die "Bad data in $filename" ;
> }
>
> if ($file_owner =~ /^([-\@\w.]+)$/) {
>   $file_owner = $1 ;
> } else {
>   die "Bad data in $file_owner" ;
> }
>
>
> if ($directory =~ /^([\/\-\@\w.]+)$/) {
>   $directory = $1 ;
> } else {
>   die "Bad data in $directory" ;
> }
>
> $ENV{"PATH"} = "/usr/sbin:/usr/bin";
>
> system("chown $file_owner '$directory/$filename'") && die "Could not run
> CHMOD" ;
>
> $ENV{"PATH"} = $old_path ;
> exit ;
>
> Not listed is the code that reads in a seperate file with a list of
> directories that can be modified ($directory). I also verify that $file_owner
> is a valid user on the server (getpwnam).
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Thu, 10 Dec 1998 07:17:19 +1300
From: Grant McLean <sisl@ihug.co.nz>
Subject: Hash from Two Array?
Message-Id: <366EBEAF.1B1E25A3@ihug.co.nz>

Hi All

If I have an array of keys, eg:

  my @Keys = qw(date time user file size);

and an array of values, eg:

  my @Values = qw(19981131 0930 bob test.pl 1024);

can anyone suggest clever/simple/efficient/fast ways of combining
them into a hash equivalent to:

  my %Hash = (
    date => '19981131',
    time => '0930',
    user => 'bob',
    file => 'test.pl',
    size => '1024'
  );

I am currently using the obvious:

  my %Hash = ();
  my $i;
  foreach $i (0..$#Keys) {
    $Hash{$Keys[$i]} = $Values[$i];
  }

Any suggestions for improvement?

The bigger picture is that I'm working on processing some logfiles.
I have no control over the log format, and it may even change within
a single log format.  What I do know is that if I get a line like:

# Columns: date time user file size

Then the lines which follow will have tab separated values matching
those column names.  I have a routine which reads one line and 
returns a hash so if I can speed up this operation it will help
the overall performance.

Thanks in advance for any suggestions.

Grant
(sisl@ihug.co.nz)


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

Date: Wed, 09 Dec 1998 18:28:46 GMT
From: mcafee@waits.facilities.med.umich.edu (Sean McAfee)
Subject: Re: Hash from Two Array?
Message-Id: <yjzb2.727$4w2.3424728@news.itd.umich.edu>

In article <366EBEAF.1B1E25A3@ihug.co.nz>,
Grant McLean  <sisl@ihug.co.nz> wrote:
>If I have an array of keys, eg:
>  my @Keys = qw(date time user file size);
>and an array of values, eg:
>  my @Values = qw(19981131 0930 bob test.pl 1024);
>can anyone suggest clever/simple/efficient/fast ways of combining
>them into a hash equivalent to:

>  my %Hash = (
>    date => '19981131',
>    time => '0930',
>    user => 'bob',
>    file => 'test.pl',
>    size => '1024'
>  );

@Hash{ @Keys } = @Values;

This is a "hash slice"; try searching for the word "slice" in the perldata
man page.

-- 
Sean McAfee | GS d->-- s+++: a26 C++ US+++$ P+++ L++ E- W+ N++ |
            | K w--- O? M V-- PS+ PE Y+ PGP?>++ t+() 5++ X+ R+ | mcafee@
            | tv+ b++ DI++ D+ G e++>++++ h- r y+>++**          | umich.edu


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

Date: Wed, 09 Dec 1998 13:35:31 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Hash from Two Array?
Message-Id: <comdog-ya02408000R0912981335310001@news.panix.com>

In article <366EBEAF.1B1E25A3@ihug.co.nz>, Grant McLean <sisl@ihug.co.nz> posted:

> If I have an array of keys, eg:
> 
>   my @Keys = qw(date time user file size);
> 
> and an array of values, eg:
> 
>   my @Values = qw(19981131 0930 bob test.pl 1024);

if you really want to use a hash:

   %hash = map { $Keys[$_], $Values[$_] } 0 .. $#Keys;

but why waste the time if you know that a certain field
shows up in a certain position?

   my $user = $Values[$USER_POSITION];  #maybe even use constant...

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: Thu, 10 Dec 1998 01:06:33 +0800
From: Rollo Chan <rollo@hknet.com>
Subject: how to get screen size?
Message-Id: <366EAE19.F65AE514@hknet.com>

I am a 'fresh guy' of using perl.....I would like to ask....while using
perl under UNIX...how to get the current terminal screen size by
perl??.......I mean how to get the column number of the screen in order
to adjust the output to fit the screen...thanks of all of your help.....



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

Date: Tue, 08 Dec 1998 21:28:24 -0800
From: "Matthew Phillips" <kohsuan@psychosphere.net>
Subject: INSERT'ing with Win32::ODBC
Message-Id: <74m9j9$gho$1@holly.prod.itd.earthlink.net>

Mostly if syntax will
work in Access it will work via ODBC.


#!/usr/bin/perl

#Connect to datasource
use Win32::ODBC;
$DSN="FOXTEST";

if (!($db=new Win32::ODBC($DSN))) {
 print "Error connecting to $DSN\n";
    print "Error: " . Win32::ODBC::Error() . "\n";
} else {
   print "Database opened...\n";
}

$SqlStatement = "create table foo (f1 text, f2 text)"; 
if ($db->Sql($SqlStatement)) {
 print "SQL failed.\n";
    print "Error: " . $db->Error() . "\n";
} else  {
 print "Data inserted\n"
}

$SqlStatement = "insert into foo (f1, f2) values ('field 1', 'field 2')"; 
if ($db->Sql($SqlStatement)) {
 print "SQL failed.\n";
    print "Error: " . $db->Error() . "\n";
} else  {
 print "Data inserted\n"
}

$SqlStatement = "select * from survey, answer where survey.sid=answer.sid"; 
if ($db->Sql($SqlStatement)) {
 print "SQL failed.\n";
        print "Error: " . $db->Error() . "\n";
} else  {
 while($db->FetchRow()) {
  $rowcnt++;
  %Data = $db->DataHash();
  foreach $k (keys %Data){
   print "$k $Data{$k}  ";
  }
  print "\n"

 }
}

matt phillips
www.psychosphere.net



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

Date: Wed, 09 Dec 1998 12:20:31 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Installing Perl5.004 Solaris 2.6
Message-Id: <comdog-ya02408000R0912981220310001@news.panix.com>

In article <366E625E.3D08F2D8@stokecoll.ac.uk>, Mick Smith <msmith@stokecoll.ac.uk> posted:

> I have recently downloaded and installed Perl 5.004 for Solaris 2.6
> (Sparc) from www.sunfreeware.com - a site that provides pre-compiled
> software for Solaris platforms.

> It was installed using the pkgadd function into the default directory
> /usr/local/bin.

i've done this once with that particular package and did not have
problems, but that was only until i could get gcc working and compile
the latest perl source.

> There were no error messages and everything seemed OK,  although our web
> developer informs me that Perl is not working on our system.

are you sure the web developer isn't what is hte problem?  what
does he mean by "does not work"?

-- 
brian d foy                     <brianNOSPAM@NOSPAM.smithrenaud.com>
CGI Meta FAQ <URL:http://computerdog.com/CGI_MetaFAQ.html>
remove NOSPAM or don't.  it doesn't matter either way.


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

Date: 09 Dec 1998 12:35:01 -0500
From: Uri Guttman <uri@ibnets.com>
Subject: Re: Is there a 'predeclare subs' module ?
Message-Id: <39u2z5rzga.fsf@ibnets.com>

>>>>> "MD" == Mark-Jason Dominus <mjd@op.net> writes:

  MD> ################################################################
  MD> # allsubs.pm
  MD> # Usage:
  MD> #   use allsubs;
  MD> # Locate and pre-declare all the subroutines in your file.
  MD> # (With caching.  I love caching.  Everything should be cached.)
  MD> #
  MD> # Retarded concept by Alex Davies (Alex.Davies@tiuk.ti.com)
  MD> # Idiotic module copyright 1998 M-J. Dominus (mjd-perl-allsubs@plover.com)
  MD> # Who is the greater pinhead?  You decide.

don't ask questions you don't want answered!

definitely a major waste of your neurons. why not add a makefile to
build the subs include the way we use make to get dependencies in c. and
what about parsing sub in weirdly formatted files? you assume sub starts
a line (after optional white space). so your module (if you can call it
that :-) is broken.

mark, get a life!

:-)

uri

-- 
Uri Guttman                             Hacking Perl for Ironbridge Networks
uri@sysarch.com				uri@ibnets.com	


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

Date: Wed, 09 Dec 1998 17:10:20 GMT
From: bobs614@my-dejanews.com
Subject: Net::Ping
Message-Id: <74matp$ccg$1@nnrp1.dejanews.com>

I am attempting to ping a server, On my system the code works fine
but when I put it on the webserver I get a ICMP Socket Error.

Thanks in Advance
Bob Smith

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: 9 Dec 1998 17:47:33 GMT
From: David J. Anderson <davidjan@mtu.edu>
Subject: Perl and Java question.
Message-Id: <74md3l$oqg$1@campus1.mtu.edu>

Basically I am writing a program where I want the actual code in Perl, but
want a Java graphical interface (running x-win on solaris).  I looked at
www.perl.com and did see information about JPL, but not much of an
explanation. Anyone mind pointing me in some direction?

Thanks,
 Dave Anderson

-- 
                        \\\|///
                      \\  - -  //
                       (  @ @  ) 
+--------------------oOOo-(_)-oOOo----------------------+
| David J. Anderson @ Michigan Tech...I think   %-}     |
|         Senior Computer Science Major                 |
| Web page: http://www.csl.mtu.edu/~davidjan            |
+----------------------------Oooo-----------------------+
                      oooO   (   )
                     (   )    ) /
                      \ (    (_/
                       \_)



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

Date: Wed, 9 Dec 1998 16:53:51 -0000
From: "Navtej S Matharu" <MatharuN@Logica.com>
Subject: pop3
Message-Id: <74m9v2$faf@romeo.logica.co.uk>

I've got the code below but don't know what I need to put in the "me",
"mypass", "pop3.do.main".

Can anyone help?????

BIM

#!/usr/local/bin/perl

  use Mail::POP3Client;

  $pop = new Mail::POP3Client("me", "mypass", "pop3.do.main");
  for ($i = 1; $i <= $pop->Count; $i++) {
   foreach ($pop->Head($i)) {
    /^(From|Subject): / and print $_, "\n";
   }
   print "\n";
  }





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

Date: Wed, 09 Dec 1998 12:13:15 -0500
From: fl_aggie@thepentagon.com (I R A Aggie)
Subject: Re: pop3
Message-Id: <fl_aggie-0912981213150001@aggie.coaps.fsu.edu>

In article <74m9v2$faf@romeo.logica.co.uk>, "Navtej S Matharu"
<MatharuN@Logica.com> wrote:

+ I've got the code below but don't know what I need to put in the "me",
+ "mypass", "pop3.do.main".

You should try 'perldoc Mail::POP3Client'. I don't have that module installed,
so I can't do that for you...

+   use Mail::POP3Client;
+   $pop = new Mail::POP3Client("me", "mypass", "pop3.do.main");

However, taking a wild-assed guess:

me           -- your user id
mypass       -- your user password
pop3.do.main -- your pop3 server machine

James


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

Date: Wed, 09 Dec 1998 11:44:55 -0500
From: "Michalowski, Martin" <stud0v64@nortel.com>
Subject: TCL <-> PERL, what's better.
Message-Id: <366EA907.374914D@nortel.com>

I love TCL but all I hear about lately is PERL.

        - Perl in schools, Perl for the internet, etc, etc.

why not TCL?  To me it seems like TCL code is much simpler. Is it the
performance?
-- 
____________________________________
Martin Michalowski      613-799-2775

 ----------------------------------
| ("`-''-/").___..--''"`-._        |
| `6_ 6  )   `-.  (     ).`-.__.`) |
| (_Y_.)'  ._   )  `._ `. ``-..-'  |
| _..`--'_..-_/  /--'_..' ,'       |
| (il),-''  (li),'  ((!.-'         |
 ----------------------------------


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

Date: 9 Dec 1998 17:29:28 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: TCL <-> PERL, what's better.
Message-Id: <74mc1o$at4@mercury.adc.com>

In article <366EA907.374914D@nortel.com>,
Michalowski, Martin <martin007@ottawa.com> wrote:
>I love TCL but all I hear about lately is PERL.
>
>        - Perl in schools, Perl for the internet, etc, etc.
>
>why not TCL?  To me it seems like TCL code is much simpler. Is it the
>performance?

Oh, jeez... let the language wars begin :-)

Performance is a factor, but certainly not the main one.

You might take a look at the Perl advocacy page maintained by Tom
Christiansen (http://language.perl.com/versus/index.html).  It's
pretty thorough.

As for me, I used to do a lot of TCL work.  Sure beats C/Motif when
you're doing GUIs.  But, as a language, Perl's so much more powerful
than TCL that it almost defies comparison.  I've been doing Perl for
about two years now, and cringe at the thought of going back.  It's
like being given a full woodworking shop, with a table saw, a router
table, a band saw, a scroll saw, a sanding center, a lathe, and a
central vacuum system, and then having somebody say, "What's all the
excitement about a workshop?  I've been using my Black & Decker
circular saw and a sanding block for years, and it works just fine."

I don't mean to sound patronizing, but after you work with Perl for a
while, you start to wonder how you ever got along without it.

-- 
 _____ 
|///  |   Brand Hilton  bhilton@adc.com
|  ADC|   ADC Telecommunications, ATM Transport Division
|_____|   Richardson, Texas


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

Date: Wed, 09 Dec 1998 13:23:50 -0500
From: Peter Shankey <shankeyp@charlestoncounty.org>
Subject: testing a perl install
Message-Id: <366EC036.D0D92FFE@charlestoncounty.org>

I am testing a compiled version of perl with Solaris 7.  I got the
compiled version because I do not have a compiler on my Solaris 7
system.  Is there a test program I can get to test the functionality of
perl?



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

Date: Wed, 9 Dec 1998 12:47:55 -0500
From: "Bob Kirsch" <cherry66@widomaker.com>
Subject: Unix Perl interfacing with NT ODBC
Message-Id: <366eb981.0@newnews.widomaker.com>

I need to provide managers with a plan for moving 3 Perl / Sybase
applications from Unix Sun/Solaris to NT environment. I can get them to OK a
Unix application server, but they don't want to purchase Sybase licenses for
the new server.
Is there a way to interface a perl/CGI app running on a unix server with
ODBC on an NT 4.0 Server (probably using some DB app like Access)?
I would appreciate any replies.
    Thanks

        Bob Kirsch
        USAF




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

Date: 9 Dec 1998 18:04:00 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Y2K potential problem in localtime()
Message-Id: <74me2g$68m$2@marina.cinenet.net>

John Moreno (phenix@interpath.com) wrote:
: It should have been this (which is useful now).
: 
: $year = $year % 100;
: $year = "0$year" if ($year < 10);

Or, in just one line without conditionals:

  $year = sprintf '%02d', $year % 100;

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "The hills were burning, and the wind was raging; and the
       clock struck midnight in the Garden of Allah."


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

Date: 9 Dec 1998 18:00:40 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Y2K potential problem in localtime()
Message-Id: <74mds8$68m$1@marina.cinenet.net>

finsol@ts.co.nz wrote:
: Warning, Simmo, Perl programmers can get very tetchy when this subject is
: discussed.

Discussed, no.  Misrepresented, yes.

: According to the experts out there is no problem with
: localtime()usage - despite continued evidence to the contrary such as yours.

Again, you misstate your case.  There are clearly and unarguably problems
with how localtime year values are being used in countless scripts --
notably including pod2man, shipped with Perl itself.

: Their opinion is that anyone who does misuse it should not be programming. 

No, rather that anyone who does misuse it has made a mistake -- either in
understanding or execution.  A carpenter who bends a nail while trying to
hammer it in has made such a mistake, and if he does so over and over
might be in the wrong profession, but doing so once in a while is a
mistake, and nothing more.  Ditto such gotchas as misuse of localtime year
values.

: Many Perl programmers are certainly not amenable to having other programmers
: alerted to the issue via this forum.

We're perfectly happy to have others alerted via this forum.  We're not
happy to see the problem misrepresented.

-- 
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      "The hills were burning, and the wind was raging; and the
       clock struck midnight in the Garden of Allah."


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

Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>


Administrivia:

Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.

If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu. 


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

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