[6359] in Perl-Users-Digest
Perl-Users Digest, Issue: 981 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 20 14:27:27 1997
Date: Thu, 20 Feb 97 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 Thu, 20 Feb 1997 Volume: 7 Number: 981
Today's topics:
[Q] Array and system <wouter.deboer@pi.net>
[Q] Array and system <wouter.deboer@pi.net>
[Q] Array and system <wouter.deboer@pi.net>
[Q] Array and system <wouter.deboer@pi.net>
[Q] Is it possible to insert <br> in a pod? (Con Lam)
Re: A form-to-mail perl script needed! Heeeeeeeeeeelp! <hanklem@ibm.net>
Re: ARGV fails on Win32/NT (Jonathan Peterson)
Re: Camel eats my bits (with contest) <fredrik_lundh@ivab.se>
Re: Can I use sockets with Perl for Win95/NT? (Scott McMahan - Softbase Systems)
HELP (convert to PERL) (Winston Sia)
Re: Help needed - Modifying existing test files (Tad McClellan)
How to get CGI_Lite.pm to run on NT. <rshankar@mgl.ca>
Re: perl help ... (Tad McClellan)
Perl not working as cgi on local server <bgraham@bgraham.com>
Re: Q: Adding method to external class <nealnach@dlgef.cr.usgs.gov>
Re: RegEx, Email & Friedl's "Mastering..." Book (Jeffrey)
sybperl and HTML (Irene Barg)
Re: tail -f in perl <dduncan@realogic.com>
Re: Why is perl different from perl -w on shebang line? (Kevin Buhr)
Windows NT 4.0 and perl web site <xaren@ascentech.com>
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 20 Feb 1997 18:59:03 +0100
From: Wouter de Boer <wouter.deboer@pi.net>
Subject: [Q] Array and system
Message-Id: <330C90E7.794BDF32@pi.net>
Hello,
I've two questions:
I have a module which returns three array, but when I want to use the
second array from my module is it empty, because all the values are
strored in the first array. The second and the thirth array are empy.
I use this code:
sub test {
------------------------------
Date: Thu, 20 Feb 1997 19:08:09 +0100
From: Wouter de Boer <wouter.deboer@pi.net>
Subject: [Q] Array and system
Message-Id: <330C9225.15FB7483@pi.net>
Hello,
I've two questions:
I have a module which returns three array, but when I want to use the
second array from my module is it empty, because all the values are
strored in the first array. The second and the thirth array are empy.
I use this code:
sub test {
------------------------------
Date: Thu, 20 Feb 1997 19:12:24 +0100
From: Wouter de Boer <wouter.deboer@pi.net>
Subject: [Q] Array and system
Message-Id: <330C9408.59E2B600@pi.net>
Hello,
Sorry, but I see only a little part of the message, so I try it for the
thirth time
I've two questions:
I have a module which returns three array, but when I want to use the
second array from my module is it empty, because all the values are
strored in the first array. The second and the thirth array are empy.
I use this code:
sub test
------------------------------
Date: Thu, 20 Feb 1997 19:15:49 +0100
From: Wouter de Boer <wouter.deboer@pi.net>
Subject: [Q] Array and system
Message-Id: <330C94D5.1CFBAE39@pi.net>
Hello,
Sorry, but I can't sent my complete message, I try it again.
I've two questions:
I have a module which returns three array, but when I want to use the
second array from my module is it empty, because all the values are
strored in the first array. The second and the thirth array are empy.
I use this code:
sub test {
code....
$string = .....
$string1 = .....
$array1[0] = ......
$array2[0] = ......
$array3[0] = ......
etc.
return ($string, $string1, @array1, @array2, @array3);
}
($string, $string1, @array1, @array2, @array3) = test;
But when I look in @array2 it is still empty, why ?? Do I something
wrong, or can it be done else ?? Can anybody help me to solve this
problem ??
Second question:
when I use the shutdown command in a simple perl script it works, but
when I use the same command in a CGI/Perl program it waits when the the
shutdown command ends. My program:
first the simple perl program
#!/usr/bin/perl
system("shutdown -r +10");
All my users will see a warning that the system is going down, and my
program ends. I can do other things.
the CGI program:
#!/usr/bin/perl
use CGI;
print form header etc.
system ("shutdown -r +10");
print "<H1>System is going down</H1>\n";
end form header
But I see never the message "System is going down". My CGI program waits
when the system command is ended. If I kill the shutdown command I see
the message. Why ?? Can anybody help me ??
Thanks,
Woute
------------------------------
Date: 20 Feb 1997 18:28:00 GMT
From: conlam@monitor.CS.Berkeley.EDU (Con Lam)
Subject: [Q] Is it possible to insert <br> in a pod?
Message-Id: <5ei53g$369@agate.berkeley.edu>
I am trying to convert a nroff format manpage to a pod preserving as much of the
original format as possible. I would like to have a multi-line item by breaking
a line into a couple of lines. I have went through perlpod, the manpages for
pod2*, and some of the pods that came along with perl, but can't seem to find the
answer.
Specifically, this is what I would like to have manpage look like:
NAME
prog - brief description
SYNOPSIS
prog arg1 [arg2 ...]
...
DIAGNOSTIC
===>> line 1
===>> line 2
===>> line 3
explanation
...
I have tried something like:
=over 8
=item line 1 <br> line 2 <br> line 3
explanation
=back
and
=over 8
=item line 1
line 2
line 3
explanation
=back
and
=over 8
=item line 1
=item line 2
=item line 3
explanation
=back
for the lines marked by the arrows. However, none of them are doing what I
want. Is what I want possible?
I would appreciate if someone can point me to some other resources that I have
failed to check with, or just inform that this is not possible.
--
-Con
------------------------------
Date: Thu, 20 Feb 1997 11:37:19 -0700
From: Hank LeMieux <hanklem@ibm.net>
To: Thodoris Tsioupros <thodoris@hol.gr>
Subject: Re: A form-to-mail perl script needed! Heeeeeeeeeeelp!
Message-Id: <330C99DF.6EB4@ibm.net>
Howdy,
There are examples of this sort of script all over the web. You just
have to be persistent. Here are two places I know of:
<http://www.jmarshall.com/easy/cgi/>
<http://www.ncsa.uiuc.edu/General/Training/PerlIntro/> (includes a good
tutorial)
Good luck,
Hank
Thodoris wrote:
> Hi all
>
> I am a 17 year old boy from Greece and I have uploaded my
> personal web page to a local WWW server (www.chalkida.hol
> gr/people/user_pgs/thodoris).
>
> I really want to add a form to it, requesting the
> visitor's NAME, EMAIL address and COMMENTS about the page.
> The Webmaster has told me that I have to make the form-to
> -mail script using PERL. I have no idea about this
> language but I am familiar to Unix-like systems.
> Is it easy to make a script that will take the text from
> the form and send it to my email address ?
> (thodoris@hol.gr) ? Could any1 help? Does anyone have
> allrady such a script made ? Pleeeeease lend a hand!
--
Hank LeMieux
Freelance Web Design/JavaScript/CGI
Santa Fe, NM, USA
(505) 986-8166
http://members.aol.com/HankWeb/
------------------------------
Date: 20 Feb 1997 18:04:01 GMT
From: jon@amxdigital.com (Jonathan Peterson)
Subject: Re: ARGV fails on Win32/NT
Message-Id: <jon-2002971800490001@amx11.amxdigital.com>
In article <01bc1e78$1932ce00$15e17a94@troruud.sol.no>, "Trond Ruud"
<troruud@online.no> wrote:
> Hi,
> Does anyone know about this problem on NT installations:
> The script argument list ARGV is always empty!
I'm only guessing here, but have you tried:
perl script.pl arg1 arg2
I think it is a problem to do with the way NT invokes perl.
------------------
Opinions expressed above are not necessarily those of AMXdigital ltd.
Jonathan Peterson || jon@amxdigital.com || (+44) 0171 613 5300
"You wouldn't believe the things I've seen with your eyes."
------------------------------
Date: 20 Feb 1997 14:23:57 GMT
From: "Fredrik Lundh" <fredrik_lundh@ivab.se>
Subject: Re: Camel eats my bits (with contest)
Message-Id: <01bc1f3a$246515e0$6fadb4c1@fl-pc.image.ivab.se>
> The Zeroeth Milleniumial Undelete The 8th Bit Perl Contest
Hmm. Why restrict this contest to Perl?
Cheers /F
PS. For an alternative solution, check out
<http://www.lysator.liu.se/ettabitars>
(or <http://www.lysator.liu.se/%e5ttabitars>,
for those of you who haven't yet upgraded
to ISO Latin-1)
------------------------------
Date: 20 Feb 1997 18:14:58 GMT
From: softbase@mercury.interpath.com (Scott McMahan - Softbase Systems)
Subject: Re: Can I use sockets with Perl for Win95/NT?
Message-Id: <5ei4b2$c@redstone.interpath.net>
Chris (webmaster@surewould.com) wrote:
Subject: Re: Can I use sockets with Perl for Win95/NT?
: Well can I?
Yes. As long as you are set up on a TCP/IP network of some sort.
Scott
PS: This does not mean you can use fork() or the UNIX server
paradigm, though. You can use the sockets.
------------------------------
Date: 20 Feb 1997 16:34:09 GMT
From: win@ph.net (Winston Sia)
Subject: HELP (convert to PERL)
Message-Id: <5ehue1$mro@gomez.ph.net>
Dear Perl Experts:
Please help me convert the following shell scripts to Perl.
1. tableit.file
2. Rule file mkt1.rule
Below are the tableit file, the rule file mkt1.rule, mkt1.serial,
a sample log file, and a sample output.
Can you please help me make a new tableit program which
will extract the BGP summary lines found in the logfile? A new
tableit program will be created which will take the BGP line
found in the log file and output it to a file.
I'm still in the process of learning Perl but I'm afraid I don't
have enough time to do this myself. I need this scripts very badly
soon.
==============================================================
The tableit file:
-----------------
today=`date | awk '{print $3 $2 $6}'`
monthyr=`date | awk '{print $2 $6}'`
data=/usr/local/IPDATA
dir=/usr/local/IPACCT
mkdir -p $dir/oldLogs
# Extract pertinent data for Makat1
for i in `cat $dir/mkt1.serial`
do
mkdir -p $data/tables/mkt1/` echo $i | tr '/' '.'`
awk '{print}' $data/logs/mkt1* | tr '\r' ' ' |\
awk -f $dir/mkt1.rule | grep $i |\
awk '{sub("/255","",$5)} {print $0}' |\
awk '{printf"%9s %3s %5s %5s %8s %15s %8s %15s\n",
$1, $2,substr($3,1,5), $5, $6, $7, $8, $9}' | sort +0 -1 +2 -3 >\
$data/tables/mkt1/` echo $i | tr '/' '.'`/$today
done
# Extract pertinent data for Makati 2
for i in `cat $dir/mkt2.serial`
do
mkdir -p $data/tables/mkt2/$i
awk '{print}' $data/logs/mkt2* | tr '\r' ' ' |\
awk -f $dir/mkt2.rule | grep $i |\
awk '{sub("/255","",$5)} {print $0}' |\
awk '{printf"%9s %3s %5s %5s %8s %15s %8s %15s\n",
$1, $2,substr($3,1,5), $5, $6, $7, $8, $9}' | sort +0 -1 +2 -3 >\
$data/tables/mkt2/$i/$today
done
#
# Extract pertinent data for pasig1
for i in `cat $dir/pasig1.serial`
do
mkdir -p $data/tables/pasig1/` echo $i | tr '/' '.'`
awk '{print}' $data/logs/pasig1* | tr '\r' ' ' |\
awk -f $dir/pasig1.rule | grep ` echo $i | tr '/' '.'` |\
awk '{sub("/255","",$5)} {print $0}' |\
awk '{printf"%9s %3s %5s %5s %8s %15s %8s %15s\n",
$1, $2,substr($3,1,5), $5, $6, $7, $8, $9}' | sort +0 -1 +2 -3 >\
$data/tables/pasig1/` echo $i | tr '/' '.'`/$today
done
# Generate warnings
mkdir -p $data/warnings
awk '{print}' $data/logs/* | tr '\r' ' ' |\
awk -f $dir/warn.rule > $data/warnings/$today
#put aside old logs
tar rhpf $data/oldLogs/mkt1-`echo $monthyr`.tar $data/logs/mkt1*
rm $data/logs/mkt1*
tar rhpf $data/oldLogs/mkt2-`echo $monthyr`.tar $data/logs/mkt2*
rm $data/logs/mkt2*
tar rhpf $data/oldLogs/pasig1-`echo $monthyr`.tar $data/logs/pasig1*
rm $data/logs/pasig1*
#tar rhpf $data/oldLogs/usa-`echo $monthyr`.tar $data/logs/usa*
#rm $data/logs/usa*
# Reset the counter
echo 0 > $data/logs/count
========================================================================
Rule file mkt1.rule:
-------------------
/GMT/{day=$1; mon=$2; date=$3; time=$4; year=$6} #set the date/time variable
/line/{printf"%s%s%s %s %s %8s ",date, mon, year, day, time,$1} #print date/time & interface
/load/{printf"%8s ", $13} #print loading
/packets input/{printf"%8s %12s ",$1,$4}
/packets output/{printf"%8s %12s\n ",$1,$4}
=======================================================================
mkti.serial:
------------
Serial0/1
Serial0/3
Serial0/7
Serial1/2
Serial1/3
Serial1/7
Serial2/0
Serial2/1
Serial2/2
Serial2/3
Serial2/4
Serial2/5
Serial2/6
Serial2/7
========================================================================
sample log file:
----------------
Fri Feb 14 13:50:02 GMT+8 1997
User Access Verification
Password:
Password:
makati1>term len 0
makati1>sh int ser 0/1
Serial0/1 is up, line protocol is up
Hardware is cxBus Serial
Description: Makati2
Internet address is 165.220.222.2, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 4000 Kbit, DLY 20000 usec, rely 255/255, load 11/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:57
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 122000 bits/sec, 107 packets/sec
Five minute output rate 174000 bits/sec, 88 packets/sec
65141 packets input, 9810148 bytes, 0 no buffer
Received 59 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 513 ignored, 0 abort
53109 packets output, 12557420 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 0/3
Serial0/3 is up, line protocol is up
Hardware is cxBus Serial
Description: GlobalOne IPL to the Internet
Internet address is 204.59.160.250, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 256 Kbit, DLY 20000 usec, rely 255/255, load 185/255
Encapsulation HDLC, loopback not set, keepalive set (30 sec)
Last input 0:00:00, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:57
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 251000 bits/sec, 96 packets/sec
Five minute output rate 186000 bits/sec, 137 packets/sec
53947 packets input, 18780679 bytes, 0 no buffer
Received 30 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 76 ignored, 0 abort
79407 packets output, 13797251 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 0/7
Serial0/7 is up, line protocol is up
Hardware is cxBus Serial
Description: XU and Cagayan On Line
Internet address is 165.220.245.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 196/255, load 71/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:02, output hang never
Last clearing of "show interface" counters 0:09:57
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 8000 bits/sec, 19 packets/sec
Five minute output rate 18000 bits/sec, 19 packets/sec
12422 packets input, 683307 bytes, 0 no buffer
Received 57 broadcasts, 0 runts, 0 giants
7520 input errors, 7520 CRC, 0 frame, 0 overrun, 24 ignored, 1112 abort
13055 packets output, 1539399 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 1/2
Serial1/2 is up, line protocol is up
Hardware is cxBus Serial
Description: IRF
Internet address is 165.220.242.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 11/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 10000 bits/sec, 8 packets/sec
Five minute output rate 3000 bits/sec, 7 packets/sec
5504 packets input, 615178 bytes, 0 no buffer
Received 60 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
5389 packets output, 1002580 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 1/3
Serial1/3 is up, line protocol is up
Hardware is cxBus Serial
Description: DOST
Internet address is 165.220.252.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 51/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:03, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 7000 bits/sec, 6 packets/sec
Five minute output rate 13000 bits/sec, 4 packets/sec
5277 packets input, 448430 bytes, 0 no buffer
Received 59 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
4710 packets output, 1195125 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 1/7
Serial1/7 is up, line protocol is up
Hardware is cxBus Serial
Description: MAKATI CITY HALL
Internet address is 165.220.220.10, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 39/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:03, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 2 packets/sec
Five minute output rate 10000 bits/sec, 1 packets/sec
2826 packets input, 276425 bytes, 0 no buffer
Received 59 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
2561 packets output, 1125820 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/0
Serial2/0 is administratively down, line protocol is down
Hardware is cxBus Serial
Description: GSI
Internet address is 165.220.220.33, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
lcp state = CLOSED
ncp ipcp state = CLOSED ncp osicp state = NOT NEGOTIATED
ncp ipxcp state = NOT NEGOTIATED ncp xnscp state = NOT NEGOTIATED
ncp vinescp state = NOT NEGOTIATED ncp deccp state = NOT NEGOTIATED
ncp bridgecp state = NOT NEGOTIATED ncp atalkcp state = NOT NEGOTIATED
Last input never, output never, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS down, CTS up, DTR down, DCD down, DSR up
makati1>sh int ser 2/1
Serial2/1 is up, line protocol is up
Hardware is cxBus Serial
Description: Pasig1
Internet address is 165.220.222.6, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 256 Kbit, DLY 20000 usec, rely 255/255, load 36/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 1/75, 0 drops
Five minute input rate 31000 bits/sec, 32 packets/sec
Five minute output rate 37000 bits/sec, 31 packets/sec
32188 packets input, 2963505 bytes, 0 no buffer
Received 60 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 116 ignored, 0 abort
32364 packets output, 3746911 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/2
Serial2/2 is up, line protocol is up
Hardware is cxBus Serial
Description: Mosaic
Internet address is 165.220.243.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 59/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:04, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 11000 bits/sec, 12 packets/sec
Five minute output rate 15000 bits/sec, 4 packets/sec
8366 packets input, 869891 bytes, 0 no buffer
Received 60 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 2 ignored, 0 abort
4435 packets output, 753135 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/3
Serial2/3 is up, line protocol is up
Hardware is cxBus Serial
Description: ADB
Internet address is 192.189.223.129, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 51/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:01, output hang never
Last clearing of "show interface" counters 0:09:58
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 57000 bits/sec, 19 packets/sec
Five minute output rate 13000 bits/sec, 13 packets/sec
13895 packets input, 4304254 bytes, 0 no buffer
Received 60 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 3 ignored, 0 abort
10254 packets output, 1355146 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/4
Serial2/4 is up, line protocol is up
Hardware is cxBus Serial
Description: AIM
Internet address is 165.220.222.21, subnet mask is 255.255.255.252
MTU 1500 bytes, BW 512 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
lcp state = OPEN
ncp ipcp state = OPEN ncp osicp state = NOT NEGOTIATED
ncp ipxcp state = NOT NEGOTIATED ncp xnscp state = NOT NEGOTIATED
ncp vinescp state = NOT NEGOTIATED ncp deccp state = NOT NEGOTIATED
ncp bridgecp state = NOT NEGOTIATED ncp atalkcp state = NOT NEGOTIATED
Last input 0:00:01, output 0:00:01, output hang never
Last clearing of "show interface" counters 0:09:59
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 1000 bits/sec, 1 packets/sec
Five minute output rate 2000 bits/sec, 1 packets/sec
2969 packets input, 256010 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
2102 packets output, 410806 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/5
Serial2/5 is up, line protocol is up
Hardware is cxBus Serial
Description: PDX
Internet address is 165.220.238.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 35/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:01, output hang never
Last clearing of "show interface" counters 0:09:59
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 3000 bits/sec, 12 packets/sec
Five minute output rate 9000 bits/sec, 10 packets/sec
8315 packets input, 698339 bytes, 0 no buffer
Received 60 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
7904 packets output, 1141841 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/6
Serial2/6 is up, line protocol is up
Hardware is cxBus Serial
Description: ECSB
Internet address is 165.220.232.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 147/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:00, output hang never
Last clearing of "show interface" counters 0:09:59
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 11000 bits/sec, 18 packets/sec
Five minute output rate 37000 bits/sec, 15 packets/sec
14313 packets input, 1223690 bytes, 0 no buffer
Received 105 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 21 ignored, 0 abort
12381 packets output, 2456627 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS up, CTS up, DTR up, DCD up, DSR up
makati1>sh int ser 2/7
Serial2/7 is administratively down, line protocol is down
Hardware is cxBus Serial
Description: EPIC NET shutdown for non-payment
Internet address is 165.220.234.2, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters 0:09:59
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets, 0 restarts
0 carrier transitions, RTS down, CTS down, DTR down, DCD down, DSR down
makati1>sh ip bgp sum
BGP table version is 322, main routing table version 322
100 network entries (101 paths) using 15876 bytes of memory
6 BGP path attribute entries using 392 bytes of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State
204.59.160.249 4 4003 7246 1055 322 0 0 13:28:21
makati1>enable
Password:
makati1#clear counters
Clear "show interface" counters on all interfaces [confirm]
makati1#!
makati1#quit
========================================================================
Sample output:
--------------
14Aug1996 Wed 23:30 119 55886550 812953168 59419583 1953057331
14Aug1996 Wed 23:40 123 55907659 817650407 59447786 1955901888
14Aug1996 Wed 23:50 127 55928709 822343094 59474185 1957975134
15Aug1996 Thu 00:00 175 55951042 827037790 59501417 1961002424
15Aug1996 Thu 00:10 199 55972259 831726473 59529699 1964680163
15Aug1996 Thu 00:20 163 55992990 836421094 59559339 1967880031
15Aug1996 Thu 00:30 163 56015710 841117387 59589002 1971415383
15Aug1996 Thu 00:40 207 56036642 845817908 59618215 1974884863
15Aug1996 Thu 00:50 187 56056618 850535605 59643856 1978312461
15Aug1996 Thu 01:00 159 56074656 855193836 59669933 1981389441
------------------------------
Date: Thu, 20 Feb 1997 12:38:17 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Help needed - Modifying existing test files
Message-Id: <pm5ie5.043.ln@localhost>
Tad McClellan (tadmc@flash.net) wrote:
: Bruce Ritchie (bruce@zeuter.com) wrote:
: : I am trying to modify an existing text file on a unix web server that is
: : in the multimegabyte size range.
: : What I need to do is delete a variety of lines from this file from time
: : to time, but I would like to do it without reading the whole file into
: : memory and then rewriting it back to disk minus the offending lines - I
: : have limited memory to work with and I am concerned with running out of
: : memory.
[ snip ]
: If this was my job to do, I would just scrap all of the above, and
: process it line by line (UNTESTED, but it should be close):
: ------------
: open(ATEXTFILE, "./textfile.bak") || die "could not open $!";
: # use all UPPER CASE for filehandles
: open(NEW, ">tempfile")|| die "could not open tempfile $!";
: while (<ATEXTFILE>) {
: if (m/$input{aName}/) {
: foreach (1..9) { <> } # skip 9 more lines
Well, I said it was untested ;-)
foreach (1..9) { <ATEXTFILE> } # skip 9 more lines
: next;
: }
: print NEW $_;
: }
: rename "tempfile", "./textfile.bak"; # mv tempfile over the original
: ------------
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 20 Feb 1997 13:13:48 -0500
From: "RSS" <rshankar@mgl.ca>
Subject: How to get CGI_Lite.pm to run on NT.
Message-Id: <01bc1f59.d1783e00$c20365cc@raja2.worldlinx.com>
I just want to use that file so that I can send files from the browser.
Thanks
Raja
------------------------------
Date: Thu, 20 Feb 1997 09:39:49 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: perl help ...
Message-Id: <58rhe5.p12.ln@localhost>
Your Subject: is sub-optimal.
Nearly *every* post here wants 'perl help'. Your Subject adds no value...
If you expect people to take the time to even read your posts,
then we expect you to be able to take the time to put an actual
subject in your Subject...
There is an article posted to this newsgroup regularly about choosing
a good Subject line.
If you don't want to be ignored, it would be a good idea to follow
the suggestions outlined therein.
ck lam (cklam@tmi.com.sg) wrote:
: hi
: can anybody know how to use perl to replace some text with new text
: after matching a pattern ".subckt pdp" and do matching only
: between .subckt....to ens subckt only for example
: ..subckt pdp012232
: xm01 avs avd
: xm2 1 3
: xm3 3 4 5 6
: ..ends subckt
: ..subckt and2
: xm12 34 4 4
: xms 1 2 3 4
: ..ends subckt
: ..
: ..
: ..
: ..
: ..
: ..
: I just want to replace the all "xm3" found in sub circuit
: pdp...something and change it to xm5. So I need a perl to match
: expression subckt pdp and begin replace operation until I come across
: a ends subckt.
------------
#! /usr/bin/perl -w
$/ = "..ends subckt\n\n"; # set input record seperator
while (<DATA>) {
s/xm3/xm5/g if /^\.\.subckt pdp/;
print;
}
__DATA__
..subckt pdp012232
xm01 avs avd
xm2 1 3
xm3 3 4 5 6
..ends subckt
..subckt and2
xm12 34 4 4
xms 1 2 3 4
..ends subckt
------------
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: Thu, 20 Feb 1997 08:58:34 -0800
From: Bo Graham <bgraham@bgraham.com>
Subject: Perl not working as cgi on local server
Message-Id: <330C82BA.7859@bgraham.com>
Hello,
I have set up perl5 on my NT and am using Peer Web Service. Perl runs
fine under cmd.exe but when I put hello.pl in my cgi-bin and type in
http://localhost/cgi-bin/hello.pl I get the "file save menu" in
netscape. This happens even though I have set applications/x-perl to
run ../perl5/perl.exe
If I type hello.pl at the command line the program runs as expected.
What can I do to make this work? I feel like I tried everything.
Thanks
Bo Graham
bgraham@bgraham.com
http://bgraham.com
------------------------------
Date: Thu, 20 Feb 1997 18:24:55 GMT
From: Neal Nachtigall <nealnach@dlgef.cr.usgs.gov>
To: kevinz@cwe.com
Subject: Re: Q: Adding method to external class
Message-Id: <330C96F7.2962@dlgef.cr.usgs.gov>
Kevin Zwack wrote:
>
> I've reread chapter 5 and still and figure out if/how I can do this.
> I want to implement an additional method (as opposed to overriding) an
> existing class/module.
>
> For example:
>
> #!/usr/local/perl
> use Stuff;
> my $thing = Stuff->new(); # New is already implemented in Stuff
> $thing->foo; # Foo is my own method
> exit;
> sub foo {
> ...
> };
> __END__
>
> How can I make foo a method of Stuff? (Without changing Stuff.pm?)
You don't. One of the main capabilities with object-oriented
is Inheritance, so if you like some or all of the functionality of
a given class inherit them and add on your own. But you have to
create your own class in which to do this.
First create your class (MyStuff.pm):
package MyStuff;
require Stuff;
@ISA = qw(Stuff); #Inherit methods from Stuff
sub foo { #Add my new method
...
}
__END__
Then in you script you change Stuff to MyStuff:
> #!/usr/local/perl
use MyStuff;
my $thing = MyStuff->new(); # New is already implemented in Stuff
> $thing->foo; # Foo is my own method
> exit;
> __END__-
You access the Stuff methods the same way as you did before since
MyStuff has inherited them all.
Check out: Steve's Object-Oriented Perl Page:
http://genome-www.stanford.edu/~sac/perlOOP/
And the perlbot manpage for more info.
HTH,
--
Neal L. Nachtigall * nealnach@dlgef.cr.usgs.gov
Hughes STX (EROS Data Center)
No wonder nobody comes here--it's too crowded. -Yogi Berra
------------------------------
Date: 20 Feb 1997 15:26:44 GMT
From: jfriedl@tubby.nff.ncl.omron.co.jp (Jeffrey)
Subject: Re: RegEx, Email & Friedl's "Mastering..." Book
Message-Id: <JFRIEDL.97Feb21002644@tubby.nff.ncl.omron.co.jp>
Abigail <abigail@ny.fnx.com> wrote:
|> On 18 Feb 1997 10:47:35 GMT, Jeffrey wrote in comp.lang.perl.misc:
|> ++ %header = $header =~ m/^(^[^:]+):\s+)(.*)/g;
|>
|> I looked at this expression for a while, but I can't see any reason
|> why the regex starts with two anchors. Did I miss some deeper magic?
No, I just thought it made a cute smiley.
(yeah, that's it, that's the answer :-)
Jeffrey
----------------------------------------------------------------------------
Jeffrey Friedl <jfriedl@omron.co.jp> Omron Corp, Nagaokakyo, Kyoto 617 Japan
See my Jap<->Eng dictionary at http://www.wg.omron.co.jp/cgi-bin/j-e
O'Reilly's Regular Expression book: http://enterprise.ic.gc.ca/~jfriedl/regex/
------------------------------
Date: 20 Feb 1997 17:39:00 GMT
From: barg@nickel.as.arizona.edu (Irene Barg)
Subject: sybperl and HTML
Message-Id: <5ei27k$l1o@news.ccit.arizona.edu>
Hello,
I'm running sybperl-2.05 on a Sun SPARCstation 20, Solaris 2.5.
I get the following error when I try to load a
CGI form which will eventually call some sybperl subroutines.
Error: HTTPd: malformed header from script /d4/sybase/www/docs/htdocs/cgi-bin/test/target
The top of the CGI form looks like this:
#!/net/nickel/d0/barg/bin/perl
# Sybperl stuff
use Sybase::CTlib;
BEGIN {$ENV{SYBASE} = "/d0/sybase/sybase10"; unshift @INC, "../../lib";}
&display_form ();
#------------------------------------------------------------------------
# display_form -- Display form where the user enters the SQL query.
#------------------------------------------------------------------------
sub display_form
{
....
}
If I comment out the line "use Sybase::CTlib;", then my form displays
correctly.
Does anyone know what's happening?
Thanks,
--irene
-------------------------------------------------------------------
Irene Barg Email: ibarg@as.arizona.edu
Steward Observatory Phone: 520-621-2602
University of Arizona FAX: 520-621-1891
Tucson, AZ 85721
-------------------------------------------------------------------
------------------------------
Date: Thu, 20 Feb 1997 10:22:16 -0500
From: Diana Duncan <dduncan@realogic.com>
Subject: Re: tail -f in perl
Message-Id: <330C6C28.7B38@realogic.com>
Torfinn Keringen wrote:
>
> Hey, I some help,
>
> I have this script who makes logfiles, D0220 - D0221 - DYYMM and
> so on, one each day.
>
> What I need is a script that work like tail -f, but in addition
> find out if there is a new file, if there is continue reading
> that file, else wait for a new file.
>
> I think you understand the problem.
Check out the Blue Perl 5 book, pg. 209 (function definition of seek),
or the perlfunc manpage under seek.
--
Diana Duncan | My opinions are my own.
Sr. Consultant |
REALOGIC, Inc. | Excitement, Adventure and
dduncan@realogic.com | Really Wild Things - Z.B.
------------------------------
Date: 20 Feb 1997 11:51:09 -0600
From: buhr@stat.wisc.edu (Kevin Buhr)
Subject: Re: Why is perl different from perl -w on shebang line?
Message-Id: <vbasp2rnz76.fsf@mozart.stat.wisc.edu>
lehman@visi.com (Todd Lehman) writes:
>
> Here's a weird Perl/Unix question. I want to invoke a perl script add.pl
> on the shebang line and feed the rest of the script not to perl but to
> add.pl.
Shebangs are queer things. The shebang line:
> #!/bin/perl add.pl
runs "/bin/perl" with first argument "add.pl" and second argument
"addtest1" (the name of the script). But the shebang line
> #!/bin/perl -w add.pl
at least on many systems, runs "/bin/perl" with first argument "-w
add.pl" and second argument "addtest2" (the name of the script), where
you *really* wanted the first argument to be "-w", the second to be
"add.pl", and the third to be "addtest2". On your system, it
evidently ignores the "add.pl" entirely.
Perl tries to make up for shebang stupidities by checking the shebang
line for switches when it runs the script. Of course, it won't manage
to do that correctly here, since the script "add.pl" doesn't *have* a
shebang line.
There are other problems with your method, too. Let's say you're in
another directory and "addtest1" is in your path. If you try to run
"addtest1" this way, it'll fail, because "perl" won't be given the
pathname to "add.pl".
You could try:
addtest1:
#/full/path/to/add.pl
1
2
3
4
5
add.pl:
#/bin/perl -w
use strict;
etc.
This is a little more reliable, but you have to specify the switches
in "add.pl" instead of "addtest1". If you specify the "-w" switch in
"addtest1" instead of "add.pl", the effective command line will be:
/bin/perl /full/path/to/add.pl addtest1 -w
and Perl will try processing "-w" as a file rather than a switch.
Depending on your needs, this might be good enough, though.
Kevin <buhr@stat.wisc.edu>
------------------------------
Date: Thu, 20 Feb 1997 10:49:10 -0700
From: Wayne Will <xaren@ascentech.com>
Subject: Windows NT 4.0 and perl web site
Message-Id: <330C8E96.6084@ascentech.com>
I have scripts that work in UNIX, and I've adjusted them to work with a
web application in NT. They work fine from an NT DOS window, but on the
web server, they insist on opening a seperate DOS window from the
Browser (Netscape), running, then closing. I know I'm missing something
in setup, (or seems that way). Does any one have a few suggestions?
Thanks greatly.
------------------------------
Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 8 Jan 97)
Message-Id: <null>
Administrivia:
The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc. For subscription or unsubscription requests, send
the single line:
subscribe perl-users
or:
unsubscribe perl-users
to almanac@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
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 V7 Issue 981
*************************************