[22006] in Perl-Users-Digest
Perl-Users Digest, Issue: 4228 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Dec 6 18:11:40 2002
Date: Fri, 6 Dec 2002 15:10:16 -0800 (PST)
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, 6 Dec 2002 Volume: 10 Number: 4228
Today's topics:
Getting a script to run properly <lou.moran@gellerandwind.com>
Re: Getting a script to run properly <perl-dvd@ldschat.com>
Re: Getting a script to run properly (Walter Roberson)
Re: Getting a script to run properly (Tad McClellan)
Re: Getting a script to run properly <lou.moran@gellerandwind.com>
Re: Getting a script to run properly <uri@stemsystems.com>
Re: Getting a URL Page <pkrupa@redwood.rsc.raytheon.com>
Re: Interprocess Communication <goldbb2@earthlink.net>
Re: License cost for commercial use? (Malcolm Dew-Jones)
Please help ham handed perl butcher with slow code (Mike DiPaola)
Re: Please help ham handed perl butcher with slow code (Tad McClellan)
Q re Helper subs in modules <penny1482@attbi.com>
Re: Q re Helper subs in modules (Ben Morrow)
Re: read from standard-input within one command? <goldbb2@earthlink.net>
script to telnet to another server and record data from <gshears@eastlink.ca>
Re: script to telnet to another server and record data (Ben Morrow)
Re: script to telnet to another server and record data (Tad McClellan)
Re: Whee, a new JAPH <rgarciasuarez@free.fr>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 06 Dec 2002 15:09:37 -0500
From: Lou Moran <lou.moran@gellerandwind.com>
Subject: Getting a script to run properly
Message-Id: <4r02vucbcpjojs73pt1j1eapdr25gcekb9@4ax.com>
Perhaps I have been up too long or something...
But I can't seem to get this script to run any way except:
$ perl uptime.pl
barney ellem ~/code $ sudo chmod -X uptime.pl
Password:
barney ellem ~/code $ uptime.pl
bash: uptime.pl: command not found
barney ellem ~/code $ ./uptime.pl
bash: ./uptime.pl: bad interpreter: Permission denied
barney ellem ~/code $ cd
barney ellem ~ $ ./uptime.pl
bash: ./uptime.pl: No such file or directory
barney ellem ~ $ cd code
barney ellem ~/code $ sudo chmod -x uptime.pl
barney ellem ~/code $ uptime.pl
bash: uptime.pl: command not found
barney ellem ~/code $ ./uptime.pl
bash: ./uptime.pl: bad interpreter: Permission denied
What have I forgotten to do? Where's that confunded bridge?
--
There's more than one way to do it, but only some of them work
------------------------------
Date: Fri, 6 Dec 2002 13:54:24 -0700
From: "David" <perl-dvd@ldschat.com>
Subject: Re: Getting a script to run properly
Message-Id: <_08I9.827$K5.599@fe01>
"Lou Moran" <lou.moran@gellerandwind.com> wrote in message
news:4r02vucbcpjojs73pt1j1eapdr25gcekb9@4ax.com...
>
> Perhaps I have been up too long or something...
>
> But I can't seem to get this script to run any way except:
>
> $ perl uptime.pl
>
> barney ellem ~/code $ sudo chmod -X uptime.pl
> Password:
> barney ellem ~/code $ uptime.pl
> bash: uptime.pl: command not found
> barney ellem ~/code $ ./uptime.pl
> bash: ./uptime.pl: bad interpreter: Permission denied
> barney ellem ~/code $ cd
> barney ellem ~ $ ./uptime.pl
> bash: ./uptime.pl: No such file or directory
> barney ellem ~ $ cd code
> barney ellem ~/code $ sudo chmod -x uptime.pl
> barney ellem ~/code $ uptime.pl
> bash: uptime.pl: command not found
> barney ellem ~/code $ ./uptime.pl
> bash: ./uptime.pl: bad interpreter: Permission denied
>
>
> What have I forgotten to do? Where's that confunded bridge?
Did you forget the
#!/usr/bin/perl
line that goes at the top of your script? If your pl is being
'require'd or 'use'd, then you should not have this line, but if you are
trying to run the script on its own, this should be the first line of
it.
Regards,
David
------------------------------
Date: 6 Dec 2002 21:08:57 GMT
From: roberson@ibd.nrc.ca (Walter Roberson)
Subject: Re: Getting a script to run properly
Message-Id: <asr3l9$fc7$1@canopus.cc.umanitoba.ca>
In article <_08I9.827$K5.599@fe01>, David <perl-dvd@ldschat.com> wrote:
:Did you forget the
:#!/usr/bin/perl
:line that goes at the top of your script? If your pl is being
:'require'd or 'use'd, then you should not have this line, but if you are
:trying to run the script on its own, this should be the first line of
:it.
If the line appears in a script that is being require'd or use'd then
the line is just a comment and it is irrelevant whether it is there or
not.
The line or a similar line is, though, required on Unix if you
want perl to be given control of the script when you execute the
file by mentioning the filename.
--
WW{Backus,Church,Dijkstra,Knuth,Hollerith,Turing,vonNeumann}D ?
------------------------------
Date: Fri, 6 Dec 2002 14:49:15 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Getting a script to run properly
Message-Id: <slrnav23ab.26h.tadmc@magna.augustmail.com>
Lou Moran <lou.moran@gellerandwind.com> wrote:
>
> Perhaps I have been up too long or something...
>
> But I can't seem to get this script to run any way except:
>
> $ perl uptime.pl
>
> barney ellem ~/code $ sudo chmod -X uptime.pl
> Password:
> barney ellem ~/code $ uptime.pl
> bash: uptime.pl: command not found
Looks like the cwd is not in your path.
> barney ellem ~/code $ ./uptime.pl
> bash: ./uptime.pl: bad interpreter: Permission denied
Looks like a problem with the shebang (#!) line.
> barney ellem ~/code $ cd
> barney ellem ~ $ ./uptime.pl
> bash: ./uptime.pl: No such file or directory
Looks like uptime.pl is not in your home directory.
> barney ellem ~ $ cd code
> barney ellem ~/code $ sudo chmod -x uptime.pl
> barney ellem ~/code $ uptime.pl
> bash: uptime.pl: command not found
Looks like the cwd is not in your path.
> barney ellem ~/code $ ./uptime.pl
> bash: ./uptime.pl: bad interpreter: Permission denied
Looks like a problem with the shebang line.
> What have I forgotten to do?
Show us your shebang line, tell us where perl is installed on your system.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 06 Dec 2002 17:26:41 -0500
From: Lou Moran <lou.moran@gellerandwind.com>
Subject: Re: Getting a script to run properly
Message-Id: <lp82vu82n99193is6tbv008m5af8vtcfdr@4ax.com>
On Fri, 6 Dec 2002 14:49:15 -0600, tadmc@augustmail.com (Tad
McClellan) wrote:
>> What have I forgotten to do?
>
>
>Show us your shebang line, tell us where perl is installed on your system.
barney ellem ~/code $ ls
#uptime.pl# adr.pl linksys.pl math2.pl
uptime.pl~
LP3 adr.pl~ linksys.pl~ posx.pl
adding.pl chargen.pl math1.pl uptime.pl
barney ellem ~/code $ ./uptime.pl
bash: ./uptime.pl: bad interpreter: Permission denied
barney ellem ~/code $ more uptime.pl
#! /usr/local/bin/perl
use warnings ;
use strict ;
use Mail::Sendmail;
my $uptime = qx /uptime/ ;
my %mail = ( To => 'lou.moran@ISP.com',
Cc => 'lynda.moran@ISP.com',
From => 'ellem@ISP.net',
Subject => 'barney uptime',
Message => "This is barney's uptime: $uptime"
) ;
sendmail(%mail) or die $Mail::Sendmail::error ;
print "OK. Log says:\n", $Mail::Sendmail::log ;
print "\n\n" ;
barney ellem ~/code $ which perl
/usr/local/bin/perl
barney ellem ~/code $ perl -v
This is perl, v5.6.1 built for i386-freebsd
--
There's more than one way to do it, but only some of them work
------------------------------
Date: Fri, 06 Dec 2002 22:58:25 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Getting a script to run properly
Message-Id: <x7wummoiun.fsf@mail.sysarch.com>
>>>>> "LM" == Lou Moran <lou.moran@gellerandwind.com> writes:
LM> #! /usr/local/bin/perl
why is there a space after the #!?
uri
--
Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: Fri, 06 Dec 2002 22:47:41 +0000
From: "Peter A. Krupa" <pkrupa@redwood.rsc.raytheon.com>
Subject: Re: Getting a URL Page
Message-Id: <3DF1290D.FA34314F@redwood.rsc.raytheon.com>
> LWP::Simple isn't included in the standard Perl distribution. I believe
> that it's among a set of extra modules that are included with ActivePerl.
You're right, that's what made me suspect he wasn't using ActiveState on
Windows.
Somebody else will have to explain to him how to get the module, I just use
PPM.
------------------------------
Date: Fri, 06 Dec 2002 14:22:50 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Interprocess Communication
Message-Id: <3DF0F90A.F9420C0F@earthlink.net>
Hal Vaughan wrote:
>
> What is the easiest way I can get the CGI programs running on mod_perl
> as the user apache to signal another program running under another
> user? (I tried sending signals, but I can't send signals from a
> program running under one user to a program running under another
> user.)
Assuming that when you say, "to signal another program", you don't
necessarily mean *signals* (as in kill(), signal(), sigmask(), etc.),
but rather "to send a message of some sort to the other program".
> Details of the situation are:
>
> I'm not a professional programmer and I've never had to do anything
> with interprocess communication before. I'm working on a project for
> a friend. I have a system on his office LAN and he can control it
> through a web page (I'm using mod_perl on Apache).
This description is rather imprecise ... I'll assume you mean, "I have a
program running on some machine; this machine is hooked to the office
LAN; my friend can control this program by accessing a web page which is
served by an Apache process which is running on the same machine as that
other program."
> He needs to be able to change some settings, which I've had no problem
> setting up.
> The problem is that there are times when he has to be able to change a
> setting from the web page and the program has to respond immediately.
>
> I don't want to give the user apache any extra access, since I am not
> sure of the security of his LAN. I have the web server running as
> apache and the other programs that are running are either running as
> root (unfortunately necesssary), or as another user.
>
> Right now I'm doing this by creating a specific setting file that
> contains only "on" or "off". I have the CGI Perl program changing
> this file to "on" when the other program needs to respond immediately.
> The other program that is running has a daemon (in Perl) that checks
> this file every second to see if it's changed.
I'm curious... What do you use for checking if it's changed?
The most efficient way I can think of for polling a file for being
changed is:
open( FH, "<", $filename ) or die horribly;
while( 1 ) {
flock( FH, LOCK_SH ) or die horribly;
seek( FH, 0, 0 ) or die horribly;
my $data = do { local $/; <FH> };
my $modtime = -M \*FH;
flock( FH, LOCK_UN ) or die horribly;
# deal with $data being either "on\n" or "off\n".
while( $modtime == -M \*FH ) { sleep(1) }
}
[The writer of course uses flock(FH, LOCK_EX) before writing, and closes
the handle rather than explicitly unlocking]
> This takes up a LOT of CPU time
That should only happen if you repeatedly read and process the data ...
if you merely stat it multiple times (the -M operator performs a fstat()
call internally), it should not be using up much CPU time. (It might be
doing disk IO, if the OS is not caching right, but disk IO isn't CPU)
> and I've noticed that at times it seems to make the hard drive run
> for a few hours straight
Disk IO != CPU. You can be running a program which consumes all of the
machine's CPU, without doing any IO, and you can be running a program
which reads from and writes to the disk all day, and uses only a modicum
of cpu time.
> -- it doesn't seem to always get buffered like it should (I'm running
> this on Mandrake Linux 8.2).
You mean cached, not buffered.
> I've found I can't have the CGI program just send a signal (like USR1
> or USR2) to the other program, since they aren't both run by the same
> user.
> I've tried using internet socekets, as described in the "Blue Camel,"
> but I can't get them to work (it may be that the system has ports not
> used by specific programs blocked).
Describe "can't get them to work".
Does the daemon process have trouble creating sockets, or accepting
connections? Or does the CGI process have trouble connecting to the
daemon?
Show us the code you tried, and perhaps we can help you. Otherwise, we
can't.
> I've read through the section on IPC in the Blue Camel, but, not being
> a professional programmer, I think I'm missing quite a bit.
--
$..=q/(?:(?{local$^C=$^C|/.(1<<$_).q/})|)/for.0..4;
$..=q/(?(?{$^C<26.and$*.=substr"\n h!,$^C,1;1}).)/;
$.=~s/!/aktrsreltanPJ,r coeueh"/;BEGIN{$^H|=(1<<21
)}"" =~ $.;print $*;q(Just another Perl hacker,\n);
------------------------------
Date: 6 Dec 2002 11:48:35 -0800
From: yf110@vtn1.victoria.tc.ca (Malcolm Dew-Jones)
Subject: Re: License cost for commercial use?
Message-Id: <3df0ff13@news.victoria.tc.ca>
Tintin (me@privacy.net) wrote:
: "Martijn J.M.W. Bosgraaf" <m.bosgraaf@biotopen.nl> wrote in message
: news:aspv5a$i30$1@reader11.wxs.nl...
: > Hello,
: >
: > Are there any costs for using Perl when making an application for
: commercial
: > distribution?
: Zit! Nil! Zero! Zilch! Nothing! Gratis! etc, etc, etc.......
Money cost nothing, but read the license because it does control what you
need to include if you do distribute it. The license is in a file that
gets downloaded with perl, certainly in the source distribution, and
presumably in other distributions, and is probably available for download
as a seperate file from a site like www.cpan.org
------------------------------
Date: 6 Dec 2002 13:01:59 -0800
From: mike@shadowsea.com (Mike DiPaola)
Subject: Please help ham handed perl butcher with slow code
Message-Id: <1faecf78.0212061301.6a7de56d@posting.google.com>
Hi,
I have this program which compares 2 data files, one new and one old.
I can't just compare a line for a line, I have to compare individual
substrings within a line. I do this with substr and join. First, I
load each file line by line into an array, then from those I create
the arrays file2notfile1, and file1notfile2. Next I loop through those
arrays to determine insert, update, or delete.
that is:
if it's in the new file, but not the old file = insert
in old file and new file but different = update
in old file but not new file = delete
I then write out the line to a file prepended with insert, update, or
delete.
This works fine, but takes hours to run (really big input files).
Also, it takes gobs of memory. As a side note, perl does not seem to
demalloc my arrays when I re-initialize them or undef them. Any
comments here?
I'm sure there is a better way to get this done. (I know this is
really hidious code)If anyone would be kind enough to take a peek and
make any suggestions, I'd be so grateful
Thanks,
Mike
###########################################
sub DIFF {
## Now we load each file into an array called @file1 for the previous
file, and
## and @file2 for the current file
@file1 = <file1> ;
@file2 = <file2> ;
close (file1) ;
close (file2) ;
## This next section is where we actually do the comparison. We wind
up with 2 self
## describing arrays, file2notfile1, and file1notfile2.
local(%mark);
grep($mark{$_}++,@file1) ;
@file2notfile1=grep(!$mark{$_},@file2);
local(%mark);
grep($mark{$_}++,@file2) ;
@file1notfile2=grep(!$mark{$_},@file1);
open(OUT,">/tmp/${item}.newdat") ;
foreach (@file2notfile1) {
chomp ;
$newline = $_ ;
if (($item eq 'counitaf') || ( $item eq 'mnunifhm')|| ( $item eq
'councsub')) {
$inputline = $newline ;
&JOIN ;
$newid = $sub ;
} else {
$newid = substr($newline,$offset,$length) ;
}
undef $update ;
foreach (@file1notfile2) {
chomp ;
$oldline = $_ ;
## Sometimes we need to join several substrings together in order to
make a unique key for comparison
if (($item eq 'counitaf') || ( $item eq 'mnunifhm')|| ( $item eq
'councsub')) {
$inputline = $oldline ;
&JOIN ;
$oldid = $sub ;
} else {
$oldid = substr($oldline,$offset,$length) ;
}
## if the record exists in the current file, and the previous file,
but has changed somehow,
## then it is an update
if ($newid eq $oldid) {
$update = yes ;
print OUT "UPDATE$newline\n" ;
last ;
}
}
## if the record exists in the current file, but not the old file,
than it is an insert.
if ($update ne "yes") {
print OUT "INSERT$newline\n" ;
}
}
foreach (@file1notfile2) {
chomp ;
$oldline = $_ ;
$oldid = substr($oldline,$offset,$length) ;
undef $delete ;
foreach (@file2notfile1) {
$newline = $_ ;
$newid = substr($newline,$offset,$length) ;
if ($newid eq $oldid) {
$delete = "no" ;
last ;
}
}
## If the record exists in the previous file, but not the new file,
then it is delete
if ($delete ne "no") {
print OUT "DELETE$oldline\n" ;
}
}
}
################################# JOIN
###################################################3
sub JOIN {
undef $sub1 ;
undef $sub2 ;
undef $sub3 ;
undef $sub4 ;
undef $sub ;
if ($item eq 'counitaf') {
$sub1 = substr($inputline, 21, 8) ;
$sub2 = substr($inputline, 70, 7) ;
$sub3 = substr($inputline, 83, 5) ;
$sub4 = substr($inputline, 88, 7) ;
$sub = join('',$sub1,$sub2,$sub3,$sub4);
}
if ($item eq 'mnunifhm') {
$sub1 = substr($inputline, 13, 11) ;
$sub2 = substr($inputline, 26, 7) ;
$sub3 = substr($inputline, 35, 7) ;
$sub = join('',$sub1,$sub2,$sub3);
}
if ($item eq 'councsub') {
$sub1 = substr($inputline, 4, 7) ;
$sub2 = substr($inputline, 19, 2) ;
$sub = join('',$sub1,$sub2);
}
}
------------------------------
Date: Fri, 6 Dec 2002 16:07:18 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Please help ham handed perl butcher with slow code
Message-Id: <slrnav27sm.2dh.tadmc@magna.augustmail.com>
Mike DiPaola <mike@shadowsea.com> wrote:
> I have this program which compares 2 data files, one new and one old.
> I can't just compare a line for a line, I have to compare individual
> substrings within a line. I do this with substr and join. First, I
> load each file line by line into an array, then from those I create
> the arrays file2notfile1, and file1notfile2.
"How do I compute the difference of two arrays?
How do I compute the intersection of two arrays?"
> (I know this is
> really hidious code)If anyone would be kind enough to take a peek and
> make any suggestions, I'd be so grateful
> sub DIFF {
> @file1 = <file1> ;
> @file2 = <file2> ;
> close (file1) ;
> close (file2) ;
Where did the filehandles get open()ed?
You should be using UPPER CASE for your filehandles.
> local(%mark);
You should always prefer lexical (my) variables over dynamic
(local) variables, except when you can't.
You do not have one of the exceptional cases:
my %mark;
> grep($mark{$_}++,@file1) ;
"What's wrong with using grep or map in a void context?"
$mark{$_}++ for @file1;
does the same thing, only faster and with less typing.
> open(OUT,">/tmp/${item}.newdat") ;
You should always, yes *always*, check the return value from open():
open(OUT,">/tmp/$item.newdat") or
die "could not open '/tmp/$item.newdat' $!";
The {curlies} don't do anything but get in your way.
> foreach (@file2notfile1) {
> chomp ;
> $newline = $_ ;
> if (($item eq 'counitaf') || ( $item eq 'mnunifhm')|| ( $item eq
> 'councsub')) {
Global variables ($item) are bad. You should avoid them whenever possible.
Pass it as a function argument instead.
> $inputline = $newline ;
> &JOIN ;
You probably want JOIN() instead, see perlsub.pod for the difference.
> $update = yes ;
^ ^
You should always enable warnings when developing Perl code.
You should have "use strict" enabled too.
Ask for all the help you can get.
> sub JOIN {
> undef $sub1 ;
> undef $sub2 ;
> undef $sub3 ;
> undef $sub4 ;
> undef $sub ;
If you use lexical variables, you won't have to mess with clearing
the global (dynamic) variables:
my($sub1, $sub2, $sub3, $sub4, $sub);
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Fri, 06 Dec 2002 20:04:12 GMT
From: "Dick Penny" <penny1482@attbi.com>
Subject: Q re Helper subs in modules
Message-Id: <Yo7I9.263852$P31.101832@rwcrnsc53>
I have successfully written 2or3 small packages/modules/objects wherein the
subs (methods) make things available externally. I really use and call
these like libraries of routines. Now I want a brand new
package/module/object that needs internal "helper" subs. I can't figure out
how to tell these helper subs what class/instance is being executed. Or IS
IT MANDATORY that I add extra argument to each such "helper sub"? Also, how
do I prevent these "helper subs" from being called (seen) externally? They
look just like any other sub/method in the package.
--
Dick Penny
------------------------------
Date: Fri, 6 Dec 2002 21:19:55 +0000 (UTC)
From: mauzo@mimosa.csv.warwick.ac.uk (Ben Morrow)
Subject: Re: Q re Helper subs in modules
Message-Id: <asr49r$4lf$1@wisteria.csv.warwick.ac.uk>
"Dick Penny" <penny1482@attbi.com> wrote:
>I have successfully written 2or3 small packages/modules/objects wherein the
>subs (methods) make things available externally. I really use and call
>these like libraries of routines. Now I want a brand new
>package/module/object that needs internal "helper" subs. I can't figure out
>how to tell these helper subs what class/instance is being executed. Or IS
>IT MANDATORY that I add extra argument to each such "helper sub"?
I'm not sure I fully understand your problem, but have you read
perldoc perlboot?
Basically, when you invoke a method as
Class->method($arg1, $arg2);
or
$object = bless \$obj, "Class";
$object->method($arg1, $arg2);
it is actually invoked as either
Class::method("Class", $arg1, $arg2);
or
Class::method($object, $arg1, $arg2);
. Does this help?
> Also, how
>do I prevent these "helper subs" from being called (seen) externally? They
>look just like any other sub/method in the package.
Err, you can't. Perl doesn't work like that: any method can be called from
anywhere else, if you give it's full qualified name[1]. However, if you don't
export them (I presume you're useing[2] Exporter?) then they can be considered
'private' to all intents and purposes.
[1] This is not strictly true. Perl allows you to create closures that are
completely invisible outside the current lexical scope, and strictly enforce
whatever privicy requirements you need. But this is rarely useful, to the extent
that I would say that if you knew enough to know you really need it, you'd
know enough to find the answer yourself :) (clue: the Camel Book, as ever)
[2] No, this isn't a typo. It parses as C<use>ing.
Ben
------------------------------
Date: Fri, 06 Dec 2002 14:36:23 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: read from standard-input within one command?
Message-Id: <3DF0FC37.B11ED286@earthlink.net>
news@roaima.freeserve.co.uk wrote:
>
> Helgi Briem <helgi@decode.is> wrote:
> > Why on earth would anyone use "open" to read
> > from the keyboard ?!?
>
> Well, I guess someone might want to read from the terminal rather
> than stdin,
> open (my $tty, '/dev/tty') or die $horribly; # UNIX only
open (my $console, 'con') or die $horribly; # Windoze only
--
$..=q/(?:(?{local$^C=$^C|/.(1<<$_).q/})|)/for.0..4;
$..=q/(?(?{$^C<26.and$*.=substr"\n h!,$^C,1;1}).)/;
$.=~s/!/aktrsreltanPJ,r coeueh"/;BEGIN{$^H|=(1<<21
)}"" =~ $.;print $*;q(Just another Perl hacker,\n);
------------------------------
Date: Fri, 6 Dec 2002 16:13:41 -0400
From: <gshears@eastlink.ca>
Subject: script to telnet to another server and record data from that server
Message-Id: <CA7I9.223682$C8.591137@nnrp1.uunet.ca>
I am trying to create a script which will telnet to another server and run a
series of commands of which I can capture the results to a file on my PC.
Any help appreciated!
George
------------------------------
Date: Fri, 6 Dec 2002 21:21:39 +0000 (UTC)
From: mauzo@mimosa.csv.warwick.ac.uk (Ben Morrow)
Subject: Re: script to telnet to another server and record data from that server
Message-Id: <asr4d3$4o3$1@wisteria.csv.warwick.ac.uk>
<gshears@eastlink.ca> wrote:
>I am trying to create a script which will telnet to another server and run a
>series of commands of which I can capture the results to a file on my PC.
Net::Telnet
Ben
------------------------------
Date: Fri, 6 Dec 2002 14:55:22 -0600
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: script to telnet to another server and record data from that server
Message-Id: <slrnav23lq.26h.tadmc@magna.augustmail.com>
gshears@eastlink.ca <gshears@eastlink.ca> wrote:
> I am trying to create a script which will telnet to another server and run a
> series of commands of which I can capture the results to a file on my PC.
OK.
> Any help appreciated!
Help with what?
What part are you stuck on?
Show us the code you have so far, and we'll help you fix it.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 06 Dec 2002 21:27:55 GMT
From: Rafael Garcia-Suarez <rgarciasuarez@free.fr>
Subject: Re: Whee, a new JAPH
Message-Id: <slrnav25o6.sv.rgarciasuarez@rafael.example.com>
Benjamin Goldberg wrote in comp.lang.perl.misc :
> The only thing that worries me in this is that I'm not sure
> how bad it is to fiddle with $^H, instead of use re 'eval'.
It's BAAAAAAAAAAAAAAAD.
(OTOH Abigail already wrote a $^H-based japh. So...)
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.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 4228
***************************************