[11862] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5462 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Apr 23 07:07:31 1999

Date: Fri, 23 Apr 99 04:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 23 Apr 1999     Volume: 8 Number: 5462

Today's topics:
    Re: -n switch vs open (James W. Sandoz)
        [OT] Re: Perl Win32::OLE doc? <matt-news@sergeant.org>
    Re: Database Converter <gellyfish@gellyfish.com>
    Re: DJGPP Port for DOS (Was Re: for (my $i;;) doesn't w <gellyfish@gellyfish.com>
    Re: FAQ 4.19: How do I remove consecutive pairs of char <Philip.Newton@datenrevision.de>
    Re: FAQ 8.36: How do I fork a daemon process? <Philip.Newton@datenrevision.de>
    Re: FAQ 8.42: How do I use an SQL database? <rhardicr@hotmail.com>
        GIFgraph help billy_collins@my-dejanews.com
        help ! how can i extract an attach file in a mail mikl_paris@my-dejanews.com
    Re: How to read a NT mapped driver from CGI ? <c4jgurney@my-dejanews.com>
    Re: Is there a shorter way? pingouino@my-dejanews.com
        Lockfile-Problem pircher@informatik.tu-muenchen.de
        need CGI programmers???? cindycrawford@my-dejanews.com
    Re: Perl initiation of VB app <c4jgurney@my-dejanews.com>
    Re: Perl Win32::OLE doc? <c4jgurney@my-dejanews.com>
    Re: Perling into Paradox .db file <gellyfish@gellyfish.com>
    Re: postgreSQL and Perl <cheldwein@csi.compuserve.com>
        printf problem <mika.lehto@comptel.com>
        Redirecting to a page bhaskar5672@my-dejanews.com
        Redirecting to a page bhaskar5672@my-dejanews.com
    Re: reset $. in one-liner <Philip.Newton@datenrevision.de>
    Re: Telnet problems <Michael.Cameron@nospam.technologist.com>
    Re: The Future of Tk? <bruce.adams@rmc-ltd.com>
    Re: Unix files in MacPerl (Arved Sandstrom)
        where is perlcore.dll? <vallet@prismanet.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 23 Apr 1999 06:47:45 -0400
From: sandoz@umbc.edu (James W. Sandoz)
Subject: Re: -n switch vs open
Message-Id: <7fpj4h$8eads@umbc7.umbc.edu>


Thanks Uri, Alan and Ronald.  Got it now.  I'll read the docs a little
more carefully from now on.

Alan, since _I've_ only used "#" for comments, that's the only thing to
count. Right? ;)
I'll play with the other formats a bit later.

-- 
Mr. James W. Sandoz, Instructor, UMBC Dept of Biol Sciences,  
				 1000 Hilltop Circle
				 Catonsville, MD 21250
voice: (410) 455-3497; fax: 455-3875; net: sandoz@umbc.edu
-- 
Mr. James W. Sandoz, Instructor, UMBC Dept of Biol Sciences,  
				 1000 Hilltop Circle
				 Catonsville, MD 21250
voice: (410) 455-3497; fax: 455-3875; net: sandoz@umbc.edu


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

Date: Fri, 23 Apr 1999 09:18:39 +0100
From: Matt Sergeant <matt-news@sergeant.org>
Subject: [OT] Re: Perl Win32::OLE doc?
Message-Id: <37202CDF.BB99ECFF@sergeant.org>

Olivier Maas wrote:
> 
> Hello,
> I am trying to find a place where to get the different properties
> accepted for OLE manipulation of Excel/Access/Word files

These aren't installed by default, you have to go back into Office setup
and select Custom and find the option.

Of course this isn't a perl question is it....

-- 
<Matt email="msergeant@ndirect.co.uk" />

| Fastnet Software Ltd              |   Perl in Active Server Pages   |
| Perl Consultancy, Web Development |   Database Design   |    XML    |
| http://come.to/fastnet            |    Information Consolidation    |


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

Date: 23 Apr 1999 10:43:31 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Database Converter
Message-Id: <372040c3@newsread3.dircon.co.uk>

Abigail <abigail@fnx.com> wrote:
> JJ (webdude@mcminn.net) wrote on MMLX September MCMXCIII in
> <URL:news:HxuT2.2394$94.998891@news1.usit.net>:
> ^^ I am trying to convert letters in a database into words for output to a
> ^^ webpage..ie First field of database might be ^DJI to Dow Jone Industry..Next
> ^^ line of database ^IXIC to NASDAQ.. (its a flat database)
> ^^ 
> ^^  Is this possible?
> 
> 
> Why wouldn't it be? A harder question would be to find a language where
> it would take more than 10 lines (except for the translation data) to
> code this.
> 

Nah :

<http://www.computer50.org/kgill/mark1/progman.html>

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: 23 Apr 1999 09:01:47 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: DJGPP Port for DOS (Was Re: for (my $i;;) doesn't work like I think it should)
Message-Id: <372028eb@newsread3.dircon.co.uk>

Bart Lateur <bart.lateur@skynet.be> wrote:
> I did NOT post this twice! You may check the headers:
> 
>>Message-ID: <371eca66.1759522@news.skynet.be>
> 
> which is normal, and
> 
>>Message-ID: <7fnv71$2g5$49@newsread.f.de.uu.net>
> 
> Say what? Some funny news server changed the message ID, and started
> redistributing the post. How bizarre.
> 

Not quite sure whats going on but there were a lot of dupes in there last
night.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Fri, 23 Apr 1999 11:29:23 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
To: Tom and Gnat <perlfaq-suggestions@perl.com>
Subject: Re: FAQ 4.19: How do I remove consecutive pairs of characters?
Message-Id: <37203D73.2DD33DD0@datenrevision.de>

[Posted and cc'ed]

Tom Christiansen wrote:
> 
> (This excerpt from perlfaq4 - Data Manipulation
>     ($Revision: 1.46 $, $Date: 1999/04/20 18:59:53 $)
> part of the standard set of documentation included with every
> valid Perl distribution, like the one on your system.
> See also http://language.perl.com/newdocs/pod/perlfaq4.html
> if your negligent system adminstrator has been remiss in his duties.)
> 
>   How do I remove consecutive pairs of characters?
> 
>     To turn `"abbcccd"' into `"abccd"':
> 
>         s/(.)\1/$1/g;

How about a soluction to turn "abbcccd" to "abcd"?

    tr///cs;

Cheers,
Philip


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

Date: Fri, 23 Apr 1999 11:14:57 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
To: Tom and Gnat <perlfaq-suggestions@perl.com>
Subject: Re: FAQ 8.36: How do I fork a daemon process?
Message-Id: <37203A11.A24D694A@datenrevision.de>

[Posted and cc'ed]

Tom Christiansen wrote:
> 
> (This excerpt from perlfaq8 - System Interaction
>     ($Revision: 1.37 $, $Date: 1999/04/14 03:46:19 $)
[...]
>     The Proc:Daemon module, available from CPAN,

ITYM Proc::Daemon

Cheers,
Philip


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

Date: Fri, 23 Apr 1999 11:04:34 +0100
From: Richard H <rhardicr@hotmail.com>
Subject: Re: FAQ 8.42: How do I use an SQL database?
Message-Id: <372045B2.6A23F590@hotmail.com>

> 
>   How do I use an SQL database?
> 
>     There are a number of excellent interfaces to SQL databases. See
>     the DBD::* modules available from
>     http://www.perl.com/CPAN/modules/dbperl/DBD . A lot of information
>     on this can be found at
>     http://www.hermetica.com/technologia/perl/DBI/index.html .
FYI: the above is now:

http://www.symbolstone.org/technology/perl/DBI/index.html

Richard H


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

Date: Fri, 23 Apr 1999 09:15:46 GMT
From: billy_collins@my-dejanews.com
Subject: GIFgraph help
Message-Id: <7fpdo1$d1i$1@nnrp1.dejanews.com>

Hi

I have a problem with GIFgraph. When I install GIFgraph (using PPM, on my
windows 98 machine) and try to run the sample code, it gives me an error. Both
the code and the error are below, and I would appreciate if someone could help
me decipher what it means and how I can remedy it.


_______CODE__________
#!/usr/bin/perl
use GIFgraph;

@data = (1,2,5,6,3,1.5,1,3,4);
$my_graph = new GIFgraph::chart();
$my_graph->set(
        x_label           => 'X Label',
        y_label           => 'Y label',
        title             => 'Some simple graph',
        y_max_value       => 8,
        y_tick_number     => 8,
        y_label_skip      => 2
    );
print "Content-type: text/html";
$my_graph->plot_to_gif( "sample01.gif", \@data );

_________/CODE__________


This is the error I get when i run it from "http://localhost" :-


_______ERROR______

CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:

Can't locate object method "new" via package "GIFgraph::chart" at
C:\Inetpub\wwwroot\graph1.pl line 5.


_______/ERROR______




How can this be? I copied the program directly from the sample given in the
docs of the module! Is it possible that the PPM doesnt install this particular
module correctly and therefore the "chart" sub-class doesnt get installed..?

Has someone had (and overcome) this problem? Will appreciate some help/advice
on what I might be overlooking here.

I am using activestate perl build 515 on windows 98 with PWS.

Thanks,
Billy

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


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

Date: Fri, 23 Apr 1999 08:15:00 GMT
From: mikl_paris@my-dejanews.com
Subject: help ! how can i extract an attach file in a mail
Message-Id: <7fpa62$a38$1@nnrp1.dejanews.com>

help me

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


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

Date: Fri, 23 Apr 1999 08:23:49 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: How to read a NT mapped driver from CGI ?
Message-Id: <7fpami$ahl$1@nnrp1.dejanews.com>

In article <7fnv72$2g5$51@newsread.f.de.uu.net>,
  qinqiang sun <qsun@kitco.ca> wrote:
> Hello, Everybody
>   I need to reading file from a mapped driver on our NT network in my
> CGI (Perl/C++) script. The CGI script  read files from a mapped drives
> on windows95 machines successfully but failed to do the same thing from
> any driver on any of my NT machines. The script did do the job from dos
> window command. Does anybody know the reason ? Please help!
> Thanks in advanced!
>
> Jinbai

On NT you're better off using UNC paths rather than drive letters in a lot of
cases - NT does some interesting things with drive letters (some of them are a
bit bizarre). Try this first.

If this doesn't work then check that the user/service running your web server
actually has the permissions required to access the drives you want. Remember
if your web server is running as a service under the localsystem account it
only has guest network access and may be better logged in as a user with the
required permissions instead (this too has some problems associated with it
but this is not the time or the place to go into it).

HTH

Jeremy Gurney
SAS Programmer  |  Proteus Molecular Design Ltd.

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


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

Date: Fri, 23 Apr 1999 08:28:29 GMT
From: pingouino@my-dejanews.com
Subject: Re: Is there a shorter way?
Message-Id: <7fpava$ami$1@nnrp1.dejanews.com>

In article <Pine.SO4.4.10.9904221901560.5704-100000@cain.alerts.co.il>,
  Yossi Klein <jklein@alerts.co.il> wrote:
> Personally, I'd go with:
>
> print$_.x x(6-+y///c);
>
> It's just as short as using length and MUCH more fun:-)

That's a pretty impressive result; it seems that we forgot at least a
few tricks. I've never seen the y///c construct, and it was plain
stupid not to realise that we could use "length" to save a character.

Interestingly, one of the original solutions used an sprintf followed
by a pipe to "tr" to do the substitution, so our original solution was
also not as good as the much shorter Perl version.

God, I love Perl. :-)

Thanks for the response, guys!

Ricky

>
> Yossi
>
> On 22 Apr 1999, Jonathan Feinberg wrote:
>
> > pingouino@my-dejanews.com writes:
> >
> > > perl -e'$_=$ENV{USER};print$_."x"x(6-split//)'
> > >
[snip]
> >
> > Why not just use length, saving you a character (and being much
> > faster, as if that mattered)?

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


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

Date: Fri, 23 Apr 1999 09:19:38 GMT
From: pircher@informatik.tu-muenchen.de
Subject: Lockfile-Problem
Message-Id: <7fpdv7$d2h$1@nnrp1.dejanews.com>

What's the best solution fot the Lockfile-Problem?

My counter-script generates a Lockfile if it doesn't exist,
increases the counter and does make a backup. If the Lockfile
exists it checks it every 10 seconds (1 Minute long) and if
the Lockfile is still there it kills the old Lockfile (
assuming that the process before has stopped before removing
the Lockfile) and reads in the backup of the counter!

This works fine for CGIs which aren't loaded so often. But
my Counter-Scripts has about 200.000 accesses per month and
it is always set to zero a few times per month!

Any ideas for a better solution?

Please reply also to my email-Address: pircher@informatik.tu-muenchen.de

Thx & Greetz,
 Alex

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


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

Date: Fri, 23 Apr 1999 08:53:30 GMT
From: cindycrawford@my-dejanews.com
Subject: need CGI programmers????
Message-Id: <7fpce9$c01$1@nnrp1.dejanews.com>

need a CGI programmer?
check our website at
http://cgi-shop.com

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


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

Date: Fri, 23 Apr 1999 08:17:03 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: Perl initiation of VB app
Message-Id: <7fpa9s$a69$1@nnrp1.dejanews.com>

In article <371FC57C.146E@fea.net>,
  aantos@fea.net wrote:
> I am a newbie to Perl and have tried every open, exec, system
> configuration that I can find in the 5 Perl books I have and I cannot
> seem to get the VB application program to execute.  This is on an
> NT server.  Anyone with experience with what I'm trying to do?
>

If you're just trying to get a vb exe file running you shouldn't have a
problem.

Check for slashes in your path names (remember \ is not acceptable - but \\
or / work just fine).

Also watch out for path names with spaces in them - this seems to cause a few
problems here and there (change "program files" to "Progra~1" etc.).

And of course there's the -w switch which you should be using to debug your
scripts.

If you still can't get it working send us a few more details and your
attempts.

Jeremy Gurney
SAS Programmer  |  Proteus Molecular Design Ltd.

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


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

Date: Fri, 23 Apr 1999 08:33:30 GMT
From: Jeremy Gurney <c4jgurney@my-dejanews.com>
Subject: Re: Perl Win32::OLE doc?
Message-Id: <7fpb8q$b1p$1@nnrp1.dejanews.com>

In article <371f2af3@newsread3.dircon.co.uk>,
  Jonathan Stowe <gellyfish@gellyfish.com> wrote:
> Olivier Maas <olivier.maas@at-lci.com> wrote:
> > Hello,
> > I am trying to find a place where to get the different properties
> > accepted for OLE manipulation of Excel/Access/Word files
> >
>
> I seem to recall that the last time this came up it degenerated into
> a rather nasty argument after I suggested it was not really a Perl question
> because it is all to do with th Microsoft Applications Object thing
> however if you look at :
>
> <http://msdn.microsoft.com/library/officedev/office/web/toc/FULLTOC.htm>
>
> In concert with the documentation theat comes with Activeperl then you
> should be able to work it out.
>
> /J\
> --
> Jonathan Stowe <jns@gellyfish.com>

Interesting site.

There's also a fairly handy bit in the office package itself. Have a look at
the online help in word/excel etc in the visual basic reference section.

Jeremy Gurney
SAS Programmer  |  Proteus Molecular Design Ltd.

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


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

Date: 23 Apr 1999 09:12:59 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Perling into Paradox .db file
Message-Id: <37202b8b@newsread3.dircon.co.uk>

Winfield Henry <winfieldh@mindspring.com> wrote:
> Hi,
> Could someone point me in the direction of how to access a paradox .db file
> from a perl program. I'm using paradox 8. Thank you. Winfield
> 

Last time I looked there was no module available to do this and resorted to
using Win32::ODBC - of course if you can find documented the format of these
files then you could hack them about yourself.

/J\
-- 
Jonathan Stowe <jns@gellyfish.com>



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

Date: Fri, 23 Apr 1999 10:57:04 +0200
From: Christian Heldwein <cheldwein@csi.compuserve.com>
Subject: Re: postgreSQL and Perl
Message-Id: <372035E0.B6B1DBE8@csi.compuserve.com>

Hi,

Stephane Jose wrote:

> I am looking for information about how to interface cgi scripts programmed
> in Perl with PostgreSQL
>
> I have an intermediate to advanced knowledge of cgi scripting in Perl and
> no knowledge of SQL. Where should I start?
>

You will need the following modules that can be found on cpan:
DBI and DBD::Pg

I would also recommend the following tutorial for learning SQL:
http://www.geocities.com/ResearchTriangle/Node/9672/sqltut.html


ciao,
Christian



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

Date: Fri, 23 Apr 1999 13:56:33 +0300
From: Mika Lehto <mika.lehto@comptel.com>
Subject: printf problem
Message-Id: <372051E1.D3D038A1@comptel.com>


I have a little problem:

  ....
  $string_format = "Values: %s %s %s\n";
  $string_values = "\$values[0], \$values[1], \$values[2]";

  @values = unpack(a1a2a3, $row);
  ....

Question is that how can I print the contents of the $values[0], 
$values[1] and $values[2] with using variables $string_format and
$string_values ? 

printf("$string_format", $string_values) does not work.

Thanks in advance

++ Mika


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

Date: Fri, 23 Apr 1999 09:51:25 GMT
From: bhaskar5672@my-dejanews.com
Subject: Redirecting to a page
Message-Id: <7fpfqt$el1$1@nnrp1.dejanews.com>

when I am trying to redirect to a page.
based on the some conditional clause.
it works fine with the following code:

use CGI;
$dataIn       = new CGI;
$numR1 = 1;

if($numR1 == 0)
{
	print $dataIn->redirect(-uri=>'http://bhaskar/geis-perl/login.htm',
                                -nph=>0);
	exit;
}
else
{

	print $dataIn->redirect(-uri=>'http://bhaskar/login/retire.htm',
                                -nph=>0);
	exit;
}

where as when I open a database connection and then try redirecting to a
different page it doesn't do so. instead it simply displays the status and
location header in the browser window:

Piece of code is as follows:

use DBI;
use CGI;

$dataIn       = new CGI;
$dbName     = "DBI:Oracle:geis";
$dbUserName = "stars";
$dbPassword = "stars";
$dbh = DBI->connect('DBI:Oracle:geis', $dbUserName, $dbPassword);

$tRecordSet1 = $dbh->prepare("SELECT ch_plan_number from tb_participant where
ch_plan_number = 'AAA' AND nu_participant_code = 123 and ch_pin = 'BBB'");
$tRecordSet1->execute();
$tRecordSet1->bind_columns(undef,\$plannumber);

while($tRecordSet1->fetch())
{}
$numR1 = $tRecordSet1->rows;
$tRecordSet1->finish();
$dbh->disconnect;

if($numR1 == 1)
{
	print $dataIn->redirect(-uri=>'http://bhaskar/cgi-bin/report12.pl',
							-nph=>0);
	exit;
}
else
{
	print $dataIn->redirect(-uri=>'http://bhaskar/cgi-bin/report10.pl',
							-nph=>0);
	exit;
}


I have tested the SQL interaction and all there is no flaw with the database
interaction as all the results are right.

Please reply me on bhaskar_bhatt@usa.net

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


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

Date: Fri, 23 Apr 1999 09:51:24 GMT
From: bhaskar5672@my-dejanews.com
Subject: Redirecting to a page
Message-Id: <7fpfqr$el0$1@nnrp1.dejanews.com>

when I am trying to redirect to a page.
based on the some conditional clause.
it works fine with the following code:

use CGI;
$dataIn       = new CGI;
$numR1 = 1;

if($numR1 == 0)
{
	print $dataIn->redirect(-uri=>'http://bhaskar/geis-perl/login.htm',
                                -nph=>0);
	exit;
}
else
{

	print $dataIn->redirect(-uri=>'http://bhaskar/login/retire.htm',
                                -nph=>0);
	exit;
}

where as when I open a database connection and then try redirecting to a
different page it doesn't do so. instead it simply displays the status and
location header in the browser window:

Piece of code is as follows:

use DBI;
use CGI;

$dataIn       = new CGI;
$dbName     = "DBI:Oracle:geis";
$dbUserName = "stars";
$dbPassword = "stars";
$dbh = DBI->connect('DBI:Oracle:geis', $dbUserName, $dbPassword);

$tRecordSet1 = $dbh->prepare("SELECT ch_plan_number from tb_participant where
ch_plan_number = 'AAA' AND nu_participant_code = 123 and ch_pin = 'BBB'");
$tRecordSet1->execute();
$tRecordSet1->bind_columns(undef,\$plannumber);

while($tRecordSet1->fetch())
{}
$numR1 = $tRecordSet1->rows;
$tRecordSet1->finish();
$dbh->disconnect;

if($numR1 == 1)
{
	print $dataIn->redirect(-uri=>'http://bhaskar/cgi-bin/report12.pl',
							-nph=>0);
	exit;
}
else
{
	print $dataIn->redirect(-uri=>'http://bhaskar/cgi-bin/report10.pl',
							-nph=>0);
	exit;
}


I have tested the SQL interaction and all there is no flaw with the database
interaction as all the results are right.

Please reply me on bhaskar_bhatt@usa.net

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


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

Date: Fri, 23 Apr 1999 10:39:37 +0200
From: Philip Newton <Philip.Newton@datenrevision.de>
Subject: Re: reset $. in one-liner
Message-Id: <372031C9.9DD62145@datenrevision.de>

richard_chen@my-dejanews.com wrote:
> 
> I would like to insert a line at the beginning of
> many files. The following will not work
> 
> $ perl -pi -e 's|(.*)|#!/usr/bin/perl\n$1| if $.==1' *.pl

Error: -w not found anywhere before "\n" (see BUGS section in `perldoc
perl`).

Methinks your line would be more efficient if your bracketed regular
expression were (.) or even (^) instead of (.*): since you're just
inserting something before it, it doesn't really matter whether you
match 'u' and put your line in front or if you match 'use strict;' and
put your line in front. Then the star doesn't have to gobble along.

Cheers,
Philip


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

Date: Fri, 23 Apr 1999 10:56:15 +0000
From: Michael Cameron <Michael.Cameron@nospam.technologist.com>
To: scott@sboss.net
Subject: Re: Telnet problems
Message-Id: <372051CF.AC692A7B@technologist.com>

Post a code snippet showing the minimum amount of code which demonstrates your
problem.

Run perl -v and include its first line of output (I think it should be "This is
perl, version 5.004_04 built for i386-linux" for RH5.2). You might also want to go
and get the latest libnet bundle (including Net::Telnet) and reinstall it just to
be sure.

I use RH5.2 and have some Solaris 2.5 and 2.6 boxes on other parts of the network
which I can play with so at the very least I could try to reproduce your problem,
although I have no problems with the following, could you try something similar:

#!/usr/bin/perl -w
  use strict;
  use Net::Telnet ();
  my $t = new Net::Telnet (Timeout => 10);
  $t->open("HOSTNAME REMOVED");
  $t->login("michael", "PASSWORD REMOVED");
  my @lines = $t->cmd("/usr/bin/who");
  print @lines;

I will mail some of my ex-colleagues and see if the patch I made to the expect
stuff is still around - the patch was on the Solaris box though, I can use
Net::Telnet on my linux box with no problems.

Another point to note, if you quit the telnet without properly closing down the
session you might find that the remote system is somewhat confused (this happened
while connecting to a really nasty VT100 implemenatation on a frame relay switch).
If things get screwy then use a manual telnet to the system before tryning another
automated one.

HTH,

Michael Cameron



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

Date: Fri, 23 Apr 1999 10:30:11 +0100
From: "Bruce S. O. Adams" <bruce.adams@rmc-ltd.com>
Subject: Re: The Future of Tk?
Message-Id: <37203DA3.42B86115@rmc-ltd.com>



Bryan Oakley wrote:

> Barry Margolin wrote:
> >
> > In article <4fv$ECA+JyH3EwbN@jessikat.demon.co.uk>,
> > Robin Becker  <robin@jessikat.demon.co.uk> wrote:
> > >I take this completely differently; least astonishment for me is if
> > >program X looks and behaves the same way no matter what keyboard, mouse
> > >and screen I'm using. As a 'user' of the program X it shouldn't matter
> > >what OS/WM is executing the code. I certainly don't want vi or emacs to
> > >be different on the mac why should I treat word or excel differently?
> >
> > I would be very surprised if Netscape on the Macintosh presented a
> > Windows-like user interface, rather than adopting the standard Macintosh
> > user interface.  Most end users don't switch between platforms much, so
> > it's more important that all the programs on their system conform to their
> > expectations, than that a particular program work the same across different
> > platforms.
>
> I would have to agree with that statement. While there are those who
> think retaining the same look and feel across platforms is necessary, I
> would wager they are in the distinct minority. That's not to invalidate
> their position, but merely to put it in context. _Most_ users of
> software want a package to look and feel like the other packages on a
> given system. I hate, for example, the artsy (-fartsy) graphic programs
> that have some weird UI instead of a more traditional UI.
>
> On the other hand, to some degree this is application-dependent rather
> than user-dependent. For example, if I were to have a requirement to
> write a air traffic control program that had to run on BeOS, MacOS, NT
> and *nix, I would think there would be significant advantages to keeping
> it 100% identical across all platforms. So, to some degree it depends on
> the application, or the targeted user base.
>
> My point being, there's a need in the world for both models. Only, the
> model where applications should adhere to native conventions is (I'm
> guessing) far and away the most commonly expected model by most users.
> Which is why I think using native windows on Tk is a win -- it meets the
> needs of the majority (though definitely not all) of the users in the
> world.
>

The two models need not be mutually exclusive.  Though I have not had the
pleasure of using SWING for JAVA myself, I believe it offers the ability
to switch look-and-feel at the touch of a button.  A configuration option that
would surely please everybody.  I would think this kind of configurability is
a good design goal.  Of course there are trade offs which are worthy of
discussion.  Would some kind soul with experience in this arena care to shed
some light?
            Regards,
                        Bruce A.




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

Date: Fri, 23 Apr 1999 07:08:24 -0300
From: Arved_37@chebucto.ns.ca (Arved Sandstrom)
Subject: Re: Unix files in MacPerl
Message-Id: <Arved_37-2304990708240001@dyip-102.chebucto.ns.ca>

In article <371F9143.ED49585B@dial.pipex.com>, Jason Holland
<jason.holland@dial.pipex.com> wrote:

> To all the perlers who answered my simple question, thanks!
> 
> A couple of points though, the reason why I need to do the shuffle is
> because I regularly work on a Linux box at home, put the stuff on a tar
> floppy and bring it to work, un-tar it on the Mac, work a little in
> BBedit and then tar it up to take back home.
> 
No need to explain. :-) I use Windows at work, and MacOS/PPC Linux at
home. So files are coming into all 3 OS's, and leaving all 3 OS's, and to
save my sanity I now use 2 well-defined directories on each system -
Downloads and Uploads (or In and Out... :-)) Files coming into an OS first
go into Downloads; I batch convert text files here using a MacPerl script.
Makes life easier.

Just out of curiosity, what are you you using for tar? The reason I ask is
that ported tar utilities, *and* Stuffit Expander, don't do too well with
text file line-end conversions. Chris Nandor has 2 general utilities
called 'tarzipme' and 'untarzipme' - Perl scripts both - which are really
handy.

Arved


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

Date: Fri, 23 Apr 1999 12:14:27 +0200
From: "Chris" <vallet@prismanet.com>
Subject: where is perlcore.dll?
Message-Id: <7fpgnc$bd3$1@nslave1.tin.it>

I try to use the Win32::GUI module, but win98 gives an error: can't find the
file "Perlcore.dll"...

I have installed ActiveState Perl 5.09

Thanks.




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

Date: 12 Dec 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 Dec 98)
Message-Id: <null>


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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