[6347] in Perl-Users-Digest
Perl-Users Digest, Issue: 969 Volume: 7
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 18 20:18:09 1997
Date: Tue, 18 Feb 97 17:00:28 -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 Tue, 18 Feb 1997 Volume: 7 Number: 969
Today's topics:
Capturing mouse co-ords. <pdenman@ims.ltd.uk>
Re: Capturing mouse co-ords. (Nathan V. Patwardhan)
Re: CGI.pm TABLEs help please (Chris Nandor)
Re: Class library to make C++ more Perlish? (Alan Ezust)
Compiled Perl <robert.pankratz@plexus.com>
Re: Compiled Perl <dean@tbone.biol.sc.edu>
Re: Database entry ID - how to? (Piotr Piatkowski)
doh! Strange socket problems... <93272008@brookes.ac.uk>
extra spaces (Steve)
Re: Getting a HTML file from another server with PERL <merlyn@stonehenge.com>
Re: Help With Perl Mail (Robert Sweeney)
Re: HELP: limitaion of the numbers of key in all the DB <kom_dp@ix.netcom.com>
Re: How do I ...? (newbie question) <jander@jander.com>
how to create file based on date/time calderongv@net-quest.com
little problem - please... (Marko Cuzi)
Re: little problem - please... (Tad McClellan)
Login Script ? <Shadow@r56h108.res.gatech.edu>
PERL / OLE <brian@shepmark.com>
Perl on Windows 95 <mdperry@cougar.netutah.net>
Re: Perl-Users Digest, Issue: 968 Volume: 7 ("Winston M. Sia")
Re: PRE-ANNOUNCE and RFC for new module File::Vpp <borup@borup.com>
Re: regexp's in XEmacs vs. Perl <merlyn@stonehenge.com>
Re: regexp's in XEmacs vs. Perl <regism@bedford.progress.com>
Screen I/O library <root@rostkl.rndavia.ru>
Re: Screen I/O library (Nathan V. Patwardhan)
Set operations (union, intersection, etc...) <stupid+@andrew.cmu.edu>
Re: Set operations (union, intersection, etc...) (Dave Thomas)
system call problems <b.leguen@ctr.renault.fr>
valid URL regexp <dhawley@plains.nodak.edu>
Re: Why can i run Perl in Linux? (Dave Thomas)
Re: Why can i run Perl in Linux? (Nathan V. Patwardhan)
Re: Why doesn't gethostbyaddr return a value? <matti-hu@dsv.su.se>
Win32: starting and killing a second script? <dmhartma@amp.com>
Re: Win32::Spawn problem (Reinoud van Leeuwen)
Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 18 Feb 1997 16:10:00 GMT
From: "Paul Denman" <pdenman@ims.ltd.uk>
Subject: Capturing mouse co-ords.
Message-Id: <01bc1db7$d67454a0$9d02a8c0@192.168.2.1.ims.ltd.uk>
Hello,
I am trying to track the co-ordinates of a mouse-pointer when
positioned over an image (for a spot-the-ball competition.)
I have tried using an 'ISMAP' with the <IMG SRC... > HTML command,
and then have it call a Perl CGI program which will temporarily (for my
debugging purposes) output these to the screen.
When you move the mouse pointer over the image, on the status
screen of the browser you can see the target URL with
?xxx,yyy (x & y co-ords) appended on to the end.
I thought that this would pass the following to the CGI program;
URL?xxx,yyy
but I can't seem to capture any of the information.
Does anyone know why this isn't working, or does anyone have a
program which already does this?
Regards,
Paul Denman
------------------------------
Date: 18 Feb 1997 16:34:42 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Capturing mouse co-ords.
Message-Id: <5ecln2$3q9@fridge-nf0.shore.net>
Paul Denman (pdenman@ims.ltd.uk) wrote:
: I am trying to track the co-ordinates of a mouse-pointer when
: positioned over an image (for a spot-the-ball competition.)
You should try (1) <INPUT TYPE="image">, and (2) re-direct future CGI
questions to comp.infosystems.www.authoring.cgi.
HTH!
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: Tue, 18 Feb 1997 09:55:57 -0500
From: pudge@pobox.com (Chris Nandor)
Subject: Re: CGI.pm TABLEs help please
Message-Id: <pudge-ya02408000R1802970955570001@news.idt.net>
In article <330517FD.7A35@cyberspace.com>, cobled@cyberspace.com wrote:
#David Coble wrote:
#> According to the documentation in
#> http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html#html
#> HTML3 table tags should work like any other matched-pair tag, e.g.:
#> This code fragment (assuming use CGI ':standard') seems like it should
#> make output like:
#> But it doesn't. I have smashed my head against this one for several
#> hours. I can't get $query->table to give me any output whatever. If
#> anyone has the solution to this one, I'd love to hear it
Simple. The TABLE tags are not "standard". See the CGI.pm docs, or go to
CGI.pm itself and look at the %EXPORT_TAGS lines:
%EXPORT_TAGS = (
':html3'=>[qw/table caption th td TR super sub strike applet PARAM
embed basefont/],
);
use CGI qw(:all);
or
use CGI qw(:html);
or
use CGI qw(:standard :html3);
:standard, as the docs say, includes only :html2, :form and :cgi.
#================================================================
Just as irrigation is the lifeblood of the Southwest, lifeblood
is the soup of cannibals.
--Jack Handey
Chris Nandor pudge@pobox.com
PGP Key 1024/B76E72AD http://pudge.net/
Keyfingerprint = 08 24 09 0B CE 73 CA 10 1F F7 7F 13 81 80 B6 B6
------------------------------
Date: 18 Feb 1997 18:50:26 -0500
From: ezust@learnix.ca (Alan Ezust)
Subject: Re: Class library to make C++ more Perlish?
Message-Id: <5edf82$nje@sparky.learnix.ca>
Associative Arrays are provided in STL, the standard template library.
Regular Expression pattern matching is avaiilable in the Gnu C++ library.
Scalars are just strings. Use standard string class.
What else do you want to do? :-)
--
Alan Ezust, Senior Instructor ezust@learnix.ca Toronto, Canada
(416) 486-0596 x 225 (voice) http://www.learnix.ca (416) 486-1754 (fax)
-------------------------------------------------------------------------
"In cyberspace, no-one can hear you scream" -Zippy
------------------------------
Date: Tue, 18 Feb 1997 08:32:09 CST
From: Robert J Pankratz <robert.pankratz@plexus.com>
Subject: Compiled Perl
Message-Id: <VA.000000e0.13063c8c@trjp>
A long time ago I read about a hack that created a pre-tokenized
perl image that was similar to compiling a C program. We have
a large web based perl application that gets call thousands of
time a day and would like to avoid having it tokenized on every
call. Could someone post the trick for doing this.
Thanks in advance.
Robert
------------------------------
Date: 18 Feb 1997 18:18:04 -0500
From: Dean Pentcheff <dean@tbone.biol.sc.edu>
Subject: Re: Compiled Perl
Message-Id: <m1hgj9snyr.fsf@nauplius.psc.sc.edu>
Robert J Pankratz <robert.pankratz@plexus.com> writes:
> A long time ago I read about a hack that created a pre-tokenized
> perl image that was similar to compiling a C program. We have
> a large web based perl application that gets call thousands of
> time a day and would like to avoid having it tokenized on every
> call. Could someone post the trick for doing this.
>
> Thanks in advance.
There _is_ a Perl compiler. Start at <URL:http://www.perl.com/perl>
and you'll find links to it.
An alternative approach that might work much better for you is to use
the "FastCGI" spec, which allows your WWW browser to talk with a
single Perl process that handles the multiple WWW requests. The Perl
program only starts up once, then acts as a server for the requests.
For info on FastCGI, see: <URL:http://www.fastcgi.com/>.
Hope those pointers help!
-Dean
--
N. Dean Pentcheff <pentcheff@acm.org> WWW: http://tbone.biol.sc.edu/~dean/
Biological Sciences, Univ. of South Carolina, Columbia SC 29208 (803-777-3936)
PGP ID=768/22A1A015 Keyprint=2D 53 87 53 72 4A F2 83 A0 BF CB C0 D1 0E 76 C0
Get PGP keys and information with the command: "finger dean@tbone.biol.sc.edu"
------------------------------
Date: 18 Feb 1997 14:52:22 +0100
From: kompas@galaxy.uci.agh.edu.pl (Piotr Piatkowski)
Subject: Re: Database entry ID - how to?
Message-Id: <5ecc6m$bng@galaxy.uci.agh.edu.pl>
Jussi Kallioniemi <ktjuka@uta.fi> wrote:
: What would be the best way to create IDs for the records?
: At the moment the solution I've been thinking about is as simple as this:
: x to have a file in which there is the last record's ID and
: x to have a file in which I've got the deleted - free - record IDs
I wouldn't bother about deleted ID's - you don't need to have your
IDs continuously, do you? So make it simpliest, and just:
sub get_next_id {
lock_file_with_id(); # To avoid simultanous access to file - if your
# application will always run alone, you can skip it
my $id = read_id_from_file();
$id++;
write_id_to_file($id):
unlock_file_with_id();
return $id;
}
HTH - I'm using such method in my applications and it works :-)
--
Piotr Pi1tkowski, Uczelniane Centrum Informatyki, AGH Krakow, POLAND
------------------------------
Date: Tue, 18 Feb 1997 15:39:31 +0000
From: "Andrew J. Stewart" <93272008@brookes.ac.uk>
Subject: doh! Strange socket problems...
Message-Id: <3309CD33.1A6E@brookes.ac.uk>
Hi,
The FAQ says that to solve the Solaris "Protocol not supported" error, I
should add:
use Socket;
to my script, which I've done. However, I'm _still_ getting the same
error. Does anyone know what could be causing this? I suspect that
prehaps my env needs tweaking - but how?
My version of Perl is 5.003_07, my OS is SunOS 5.5.1
Here's my script:
#!/usr/bin/perl -w
use Socket;
require 'lchat.pl';
&chat'open_port("127.0.0.1", 25) or die "$!";
&chat'close();
Andrew J. Stewart
93272008@brookes.ac.uk
------------------------------
Date: Tue, 18 Feb 1997 14:53:46 GMT
From: spoors@rl.af.mil (Steve)
Subject: extra spaces
Message-Id: <5ecjg3$ecq@news.rl.af.mil>
I am trying to write a script that will email me a file to be uploaded
into an Access Database. The script itself works, but blank spaces
are added to the end of the file. This creates problems when importing
the database. The print statement looks like this:
open (OUT, ">>newfile");
print OUT "128.132.$subnet.$ip,$net,$hinfo,$mx10\n"
close (OUT);
Each time a record is appended to the file it adds an extra space. My
question is how do you get rid of that extra space? Or is space being
added for each of the variables? If so how do I fix this problem?
Thanks in advance
Steve
------------------------------
Date: 18 Feb 1997 07:42:58 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: dico@isn.net (Dico Reyers)
Subject: Re: Getting a HTML file from another server with PERL
Message-Id: <8cpvxyyy31.fsf@gadget.cscaper.com>
>>>>> "Dico" == Dico Reyers <dico@isn.net> writes:
Dico> I need some help please. No one has been able to help me.
You've just been asking the wrong people, apparently. :-)
Dico> I would like to write a perl script that goes to a specified URL and
Dico> gets a specified file and then takes that information and just stores
Dico> it in an array.
use LWP::Simple;
@result = split /^/m, get "http://www.stonehenge.com/";
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 560 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 18 Feb 1997 22:11:56 GMT
From: rsweeney@zeus.anet-stl.com (Robert Sweeney)
Subject: Re: Help With Perl Mail
Message-Id: <5ed9fc$7vb@opus.anet-stl.com>
Nathan V. Patwardhan (nvp@shore.net) wrote:
: Romualdo Ortiz (rom_ortiz@icepr.com) wrote:
: : How I Can send a email with a subject and a from through a Telnet
: : Section?
:
: What does this have to do with Perl? Sounds like you're junkmailing,
: anyways.
:
If you are attempting to figure out how to do this for legitimate reasons
(not junkmail), you may wish to look at formmail.pl, a script that I
believe I found on Matt's Script Archive. Dissecting this script could
give you the answer you seek.
From:
# Form-mail.pl, by Reuven M. Lerner (reuven@the-tech.mit.edu).
Apparently, formmail.pl opens a pipe to the sendmail program.
-----------------------code-------------
open (FILE, "infile.txt");
@infile = <FILE>;
open (MAIL, "| /usr/bin/sendmail");
print MAIL ("Subject: We hate junk email spam.\n");
print MAIL "@infile";
close (MAIL);
close (FILE);
------------------------------
Date: Mon, 17 Feb 1997 20:26:37 -0800
From: administrator <kom_dp@ix.netcom.com>
To: "Nathan V. Patwardhan" <nvp@shore.net>
Subject: Re: HELP: limitaion of the numbers of key in all the DBMish packages?????
Message-Id: <33092F7D.12A4@ix.netcom.com>
Nathan V. Patwardhan wrote:
>
> adminstrator (kom_dp@ix.netcom.com) wrote:
>
> : I wrote a program to create a data base. When I use NDBM, then the
> : *.db.dir stop at size of 4096Kb, and *.db.data stop at certain size.
> : When I use GDBM, the *.db stop at 4440141Kb. In both case the program
>
> In this case, "size matters." :-) You might look into berkeley dbm,
> and Perl's DB_File module.
>
> --
> Nathan V. Patwardhan
> nvp@shore.net
> "Outshined outshined outshined!"
> --Chris Cornell from Soundgarden
Well, agree with you on "size matters" only on NDBM. According to Camel
Book, there is no block size limitation for both GDBM and berkeley DBM.
I am not quite sure whether the block size stands for the limits of
numbers of key in single database. Can anyone help me to prove that?
I will try berkeley dbm today.
Besides, there are something that I can't understand when the program
warning me about:
"Use uninitialized value value at <program name> line <line #>, <db hash
name> chunk 9913"
Does that suggest that I may have other problem in my program?
------------------------------
Date: 18 Feb 1997 09:40:28 -0500
From: Jim Anderson <jander@jander.com>
Subject: Re: How do I ...? (newbie question)
Message-Id: <afp26uub.fsf@jander.com>
"Ian Samson" <IDS@Scrooge.HSRC.ac.za> writes:
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_01BC1DA7.965184C0
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> From books I have bought I can work out how to get a browser's IP Address,
> host name etc.
>
> What I have not been able to find is how to output the result of the script
> to a UNIX file.
>
> The CGI script will be called from an initial HTML file (as a "front end"
> to a database application); the script will obtain the user's IP Address,
> host name (if available), HTTP_USER_AGENT, and HTTP_REFERER; and if
> possible the date/time of launching the CGI script, and then output the
> results to a UNIX file in a specific directory.
Season to taste:
=========================================================================
[...]
$file = 'my-pathname-here';
open OUT, ">$file" or die "open failed for $file: $!\n";
print OUT <<EOD;
HTTP_USER_AGENT: $ENV{HTTP_USER_AGENT}
HTTP_REFERER: $ENV{HTTP_REFERER}
EOD
close OUT;
[...]
=========================================================================
--
Jim Anderson jander@jander.com
PGP Public Key Fingerprint: 0A 1C BB 0A 65 E4 0F CD
4C 40 B1 0A 9A 32 68 44
------------------------------
Date: Tue, 18 Feb 1997 18:01:24 -0600
From: calderongv@net-quest.com
To: calderongv@net-quest.com
Subject: how to create file based on date/time
Message-Id: <856310039.23910@dejanews.com>
I'm trying to create an dynamic archive file of a text file based on the
current date and time... am quite new to perl/cgi...
i want the cgi to archive a portion of a chat file once it reaches a
certain size... create the new filename based on the current date and
time (mmddhhmm.txt) and reduce the remaining file size...
this sub just won't create the file... nor will it reduce the $chat_file
size... am running the cgi at the telnet prompt, other cgi's work, the
entire cgi runs without errors, and without creating the file too...
you can see the cgi in action at:
http://www.net-quest.com/~gdotao/cgi-bin/chatterbox.cgi
current $chat_file size is > 42000
any suggestions would be much appreciated? (am new at this... but love
it!)
###########################
[snip]
# Create filename based on mmddhhmm
$ndate = '$date_command +"%m%d%I%M"'; chop($ndate);
[snip]
sub create_archive
{
if (length($chat_file) >= 35840)
{
# Keep < 15k
@ARC_TEMP = substr($chat_file, 0, 15359);
# Archive > 15k
@NEW_TEMP = substr($chat_file, 15360);
# Create new file based on date
open (NEWFILE, ">$ndate\.txt") || die "Can't write to NEWFILE!!\n";
# Write > 15k to archive file, Close new archive
print NEWFILE @NEW_TEMP;
close (NEWFILE);
# Open existing file, Write < 15k to file, Close existing file
open (LOBBY, ">$chat_file") || die "Can't write to LOBBY!!\n";
print LOBBY @ARC_TEMP;
close (LOBBY);
}
}
###########################
Thanks, Steven
Webmaster for Many Paths
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
------------------------------
Date: Tue, 18 Feb 1997 20:56:27 GMT
From: Marko@comtocom.com (Marko Cuzi)
Subject: little problem - please...
Message-Id: <5ed56h$chb@sparcserver.lrz-muenchen.de>
Hello,
could anyone help please?
I get input from a html-form to cgi-bin (Perl) into $input{'Field1'},
$input{'Field2'}, ....
Now I would like to access each Field using:
for($i = 0; $i < 5; $i++) {
print MAIL "$input{'Field$i'}"; #<- and here's the problem (**)
}
(**) I couldn't get the value of $input{'Field1'}.
Thank you.
Marko
------------------------------
Date: Tue, 18 Feb 1997 16:30:53 -0600
From: tadmc@flash.net (Tad McClellan)
Subject: Re: little problem - please...
Message-Id: <tiade5.ji3.ln@localhost>
Marko Cuzi (Marko@comtocom.com) wrote:
: Hello,
: could anyone help please?
Yep.
: I get input from a html-form to cgi-bin (Perl) into $input{'Field1'},
: $input{'Field2'}, ....
: Now I would like to access each Field using:
: for($i = 0; $i < 5; $i++) {
: print MAIL "$input{'Field$i'}"; #<- and here's the problem (**)
: }
: (**) I couldn't get the value of $input{'Field1'}.
That doesn't work because single quotes do not interpolate, and you
want $i to be interpolated.
But, if you use double quotes instead, then you'll have nested double
quotes.
qq() to the rescue:
print MAIL qq($input{"Field$i"}); #<- and here's NO problem ;-)
--
Tad McClellan SGML Consulting
Tag And Document Consulting Perl programming
tadmc@flash.net
------------------------------
Date: 18 Feb 1997 23:23:40 GMT
From: "Shadow" <Shadow@r56h108.res.gatech.edu>
Subject: Login Script ?
Message-Id: <01bc1523$cc08d1e0$0f02000a@shadow>
How do I use a cgi with htaccess to allow user registration, and validation
------------------------------
Date: 18 Feb 1997 23:45:26 GMT
From: "Brian Shepard" <brian@shepmark.com>
Subject: PERL / OLE
Message-Id: <01bc1dfe$b77925c0$6c55b5cf@default>
Does Perl come with OLE set up? or are there OLE extensions?
Where would I find the OLE extensions and is their a web site with info
pertaining to this?
Any help would be greatly appreciated!
Thanks in advance!!
------------------------------
Date: Mon, 17 Feb 1997 15:51:00 -0700
From: Mark Perry <mdperry@cougar.netutah.net>
Subject: Perl on Windows 95
Message-Id: <3308E0D4.371F@cougar.netutah.net>
I am setting up a website and I want to use some scripts. I want to
test them to make sure they work befor sending them to the ISP. I
downloaded Perl for Windows 95/NT. I can see if a script compiles and
what its output is in a dos box by typing C:\>perl myscript.pl.
I would like to also see how it works by loading the page into Netscape
locally and then running the script (like it would on a server). Is
this possible. When I tried clicking on the button that calls the
script nothing happened.
Any suggestions?
Thanks.
------------------------------
Date: Wed, 19 Feb 1997 08:07:52 -0800 (GMT+8)
From: win@ph.net ("Winston M. Sia")
Subject: Re: Perl-Users Digest, Issue: 968 Volume: 7
Message-Id: <Pine.LNX.3.91.970219075459.23713A-100000@rizal.ph.net>
Dear Perl Experts,
Please help me to convert the following scripts to perl: (tableit file
(A1) and mkt1.rule (A3) to come out with the sample output (A5)).
Also please help me to make a new tableit program that will extract the
BGP summary lines found in the sample logfile (A4).
Sorry for the inconvenience.. I need your help badly. Thanks in advance.
==========================================================================
A1. 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
=============================================================================
A2. 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
============================================================================
A3. 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}
=============================================================================
A4. 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]
=============================================================================
A5. Sample output of the shell script: (just a few lines)
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
[1;44;33mWinston M. Sia[0;37m
------------------------------
Date: Tue, 18 Feb 1997 16:05:49 +0100
From: Christian Borup <borup@borup.com>
To: Dominique Dumont <domi@marlis.grenoble.hp.com>
Subject: Re: PRE-ANNOUNCE and RFC for new module File::Vpp
Message-Id: <3309C54D.3FD2@borup.com>
Dominique Dumont wrote:
>
> I'm wondering whether File::Vpp is a good choice for naming this
> module. I don't want to conflict with any other File::xxx module.,
>
>From a quick read-through of your pod it seems to me, to be more logical
to put into the Text:: namespace, as this is where most textprocessing
modules should go IMHO.
Yours
Borup
------------------------------
Date: 18 Feb 1997 07:36:51 -0700
From: Randal Schwartz <merlyn@stonehenge.com>
To: C Matthew Curtin <cmcurtin@research.megasoft.com>
Subject: Re: regexp's in XEmacs vs. Perl
Message-Id: <8csp2uyyd8.fsf@gadget.cscaper.com>
>>>>> "C" == C Matthew Curtin <cmcurtin@research.megasoft.com> writes:
C> Tom Christiansen <tchrist@mox.perl.com> writes:
>> "EMACS belongs in <sys/errno.h>: Editor Too Big!" -me
C> You mean you can edit files with Emacs? :-)
Yeah, you know, like when you're posting news or replying to mail, or
passing a document in IRC, or sending encrypted/anonymous mail via
PGP.. up comes this window with a *built-in* editor! It's so cool!
No need to go to a separate utility! It even comes up when you visit
a file from dired.
Now if I could just figure out how to handle "talk", I'd never even
leave my emacs for the entire session!
"Emacs: Eighteen Megs And Constantly Swapping"
(or was it... EscapeMetaAltControlShift? :-)
print "Just another Perl hacker," # but not what the media calls "hacker!" :-)
## legal fund: $20,495.69 collected, $182,159.85 spent; just 560 more days
## before I go to *prison* for 90 days; email fund@stonehenge.com for details
--
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@ora.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me
------------------------------
Date: 18 Feb 1997 15:48:51 -0500
From: Regis McEwen <regism@bedford.progress.com>
Subject: Re: regexp's in XEmacs vs. Perl
Message-Id: <3t914lj0wc.fsf@bedford.progress.com>
Randal Schwartz <merlyn@stonehenge.com> writes:
> >>>>> "C" == C Matthew Curtin <cmcurtin@research.megasoft.com> writes:
[...]
> Now if I could just figure out how to handle "talk", I'd never even
> leave my emacs for the entire session!
Then try ETalk by Eric Ludlam:
ftp.ultranet.com:/pub/zappo/etalk-0.11.a7.tar.gz
-Regis
------------------------------
Date: Tue, 18 Feb 97 16:58:49 +0300
From: "System Administrator" <root@rostkl.rndavia.ru>
Subject: Screen I/O library
Message-Id: <AA9XPpsK0H@rostkl.rndavia.ru>
Hello everybody,
I want to know if there is any perl package implementing screen input/output
functions: menus, windowed input controls, etc. for UNIX platforms?
Any information is welcome.
--
Best regards,
Dmitry Diskin, <dda@rostkl.rndavia.ru>
System Administrator of Rostov-Clearing LTD <root@rostkl.rndavia.ru>
------------------------------
Date: 18 Feb 1997 16:39:26 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Screen I/O library
Message-Id: <5eclvu$3q9@fridge-nf0.shore.net>
System Administrator (root@rostkl.rndavia.ru) wrote:
: I want to know if there is any perl package implementing screen input/output
: functions: menus, windowed input controls, etc. for UNIX platforms?
: Any information is welcome.
Indeed. There's a menu.pl package available, which requires that you're
using Curses. You might do a yahoo (or whatever) search for where this
package is currently distributed.
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: Tue, 18 Feb 1997 09:00:15 -0500
From: Michael George Schwern <stupid+@andrew.cmu.edu>
Subject: Set operations (union, intersection, etc...)
Message-Id: <In2PLje00YUn06akg0@andrew.cmu.edu>
Is it just me, or are there no functions for set operations in Perl?
Just for something simple, like finding the intersection or union of two
sets (ie. lists). I couldn't find anything in CPAN either. Am I
missing something?
Anyhow, in the Perl tradition, I wrote my own... but I'd like to know if
I'm wasting my time before I go through the trouble of spiffing it up,
and packaging it, a'nat. (like noticing Text::ParseWords after writting
my own parser.)
"If you could imagine anyone obtaining this power of becoming invisible, and
never doing any wrong or touching what was another's he would be thought by
the lookers-on to be a most wretched idiot..."
Glaucon, Plato's _Republic_ Book II
auveyron@cmu.edu stupid@andrew.cmu.edu schwern@envirolink.org
Floggo the Stupid aka Milko aka Schwern aka Auveyron aka Dupre
OpMngr&Mac Wrangler @ EnviroLink http://www.envirolink.org/home/schwern
------------------------------
Date: 18 Feb 1997 14:51:52 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Set operations (union, intersection, etc...)
Message-Id: <slrn5gjgb4.c2m.dave@fast.thomases.com>
On Tue, 18 Feb 1997 09:00:15 -0500, Michael George Schwern <stupid+@andrew.cmu.edu> wrote:
> Is it just me, or are there no functions for set operations in Perl?
> Just for something simple, like finding the intersection or union of two
> sets (ie. lists). I couldn't find anything in CPAN either. Am I
> missing something?
Do the Set::... modules not do what you want. Set::Scalar seems pretty
complete (though I've never used it)
# Public: &new &inverse(unary -) &null &universal
# (overloads) &members &values &valued_members &grep &map
# &union(+) &intersection(*) &difference(binary -)
# &symmetric_difference(%)
# &as_string("") &display_attr
# &insert(+=) &delete(-=)
# &in &power_set
# &is_null &is_universal &is_valued
# &compare(<=>) &equal(==) &disjoint(!=)
# &proper_subset(<) &proper_superset(>)
# &subset(<=) &superset(>=)
# &intersect &DESTROY
Regards
Dave
--
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: Tue, 18 Feb 1997 16:34:36 +0100
From: Bertrand Le Guen <b.leguen@ctr.renault.fr>
Subject: system call problems
Message-Id: <3309CC0C.41C6@ctr.renault.fr>
hi there !
i'm having some problems with a system call
system "$filetoexec";
wait()
$filetoexec is in fact a #!/bin/csh shell script !
where can i find explanations or examples of this function !
(i've already look at the perlfunc manual ! )
i would like more explaination or examples :-)
thank's
--
Bertrand Le Guen
CAD/CAM & SGI/Unix Admin
Web Master (Intranet)
mailto:b.leguen@ctr.renault.fr
------------------------------
Date: Tue, 18 Feb 1997 17:32:54 -0600
From: Darin Hawley <dhawley@plains.nodak.edu>
Subject: valid URL regexp
Message-Id: <330A3C26.5236009A@plains.nodak.edu>
A while back I remember seeing a huge regexp for a valid URL, as well as
a more modularized version for validating a given string as a URL. I've
looked around in libwww.pl for an easy way of doing this without
success. I've been hard pressed to find any examples laying around
either. If anyone has a good answer, please post it. This would also
make a good addition to the FAQ. Thanks...
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Darin R Hawley | ................ __o
NDSU, Computer Science | ................ _~\<,_
email: dhawley@plains.nodak.edu | ................ (_)/
(_)
http://www.cs.ndsu.nodak.edu/~dhawley |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
------------------------------
Date: 18 Feb 1997 14:46:31 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Why can i run Perl in Linux?
Message-Id: <slrn5gjg15.c2m.dave@fast.thomases.com>
On Tue, 18 Feb 1997 20:50:01 +0800, ryan <ryan@www.puli.com.tw> wrote:
> Hi:
> I miss a trouble about My Perl Program can't run in linux.
> I must place Perl command before my Perl Program ex: Perl myprogram.pl.
> I Can't derictly run myprogram.pl.I alreadly add a prfix symbol "#!"in
> the header of my perl progarm.How can I do for this problem?
1. Make sure perl is where you say it is one the #! line:
#!/usr/local//bin/perl
^^^^^^^^^^^^^^^^^^^^--- ensure this is where perl is
2. Make sure your script file is marked as executable:
chmod +x my_script.pl
3. Run it:
my_script.pl
Should work fine.
Regards
Dave
--
_________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 18 Feb 1997 15:01:29 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Why can i run Perl in Linux?
Message-Id: <5ecg89$r4v@fridge-nf0.shore.net>
Dave Thomas (dave@fast.thomases.com) wrote:
Also, make sure that . is in your path (I put mine at the end as
the last entry). This way you won't have to run your Perl scripts
as ./scriptname.pl.
: 1. Make sure perl is where you say it is one the #! line:
: #!/usr/local//bin/perl
: ^^^^^^^^^^^^^^^^^^^^--- ensure this is where perl is
:
: 2. Make sure your script file is marked as executable:
: chmod +x my_script.pl
:
: 3. Run it:
: my_script.pl
--
Nathan V. Patwardhan
nvp@shore.net
"What is your favorite color?
Blue ... I mean yellow ... aieeeee!
--From the Holy Grail"
------------------------------
Date: Tue, 18 Feb 1997 21:31:18 +0100
From: Matti Hultstrand <matti-hu@dsv.su.se>
Subject: Re: Why doesn't gethostbyaddr return a value?
Message-Id: <330A1196.167E@dsv.su.se>
Honza Pazdziora wrote:
>
> Matti Hultstrand <matti-hu@dsv.su.se> writes:
>
> > I have written a small cgi-script that parses the output of the unix
> > command "netstat -n" and prints all remote hosts connected to the web
> > server. Just "netstat" cuts the host name after 16 characters, so I have
> > to do "netstat -n" and translate each IP-address to a host name using
> > the perl function gethostbyaddr. The problem is that gethostbyaddr
> > doesn't return any value in my script.
> > I use it like this: $hostname = gethostbyaddr($ipaddr, AF_INET);
> > Why doesn't that work? Does gethostbyaddr only return host names that
> > are withing the local network? Is there some other way to do this?
>
> According to perlfunc man page, gethostbyaddr returns a list:
> ($name,$aliases,$addrtype,$length,@addrs);
> Will it start working when you do this change?
Nope.
gethostbyaddr can also return only the host name if used in scalar
context. So that's not the problem.
-Matti Hultstrand
------------------------------
Date: Tue, 18 Feb 1997 10:07:41 -0500
From: Darren Hartman <dmhartma@amp.com>
Subject: Win32: starting and killing a second script?
Message-Id: <3309C5BD.B13@amp.com>
I have a script that retrieves an HTML document for the Web. Sometimes
it waits quite a long time until there's a response. I would like to
kill the script and return an error message after a specific period of
time. Any suggestions? Remember, this is Perl for Win32.
I've tried using Win32::Process which I can start a second script and
can kill it after a delay, but I can not pass anything back (ie. data in
variables) to the first script.
Darren Hartman
dhartman@amp.com
------------------------------
Date: Tue, 18 Feb 1997 22:31:33 GMT
From: reinoud@xs4all.nl (Reinoud van Leeuwen)
Subject: Re: Win32::Spawn problem
Message-Id: <330b2d97.719354@news1.xs4all.nl>
On Mon, 17 Feb 1997 09:10:04 -0500, Sameh R Boutros
<boutros+@andrew.cmu.edu> wrote:
>i've been trying to use the Win32::Spawn for quite a bit now....
>
>here is the code....
>
>$make = "C:\\fax\\make\\2fax.exe";
>$args = "C:\\fax\\out\\out.txt C:\\fax\\out\\out.fax";
>use Win32;
>Win32::Spawn($make, $args, $pid);
>print ("<P>" . $make . "<P>" . $pid);
>
>
>it launches the 2fax.exe but the 2fax.exe does not do as it is supposed
>to....
>
>when i run 2fax.exe from a prompt with the above params it runs fine?
>
>can you help?
Could it be a rights problem? Under what user id is the second
(spawned) process running?
__________________________________________________
Reinoud van Leeuwen reinoud@xs4all.nl
http://www.xs4all.nl/~reinoud
I specifically DO NOT give anyone permission to use my email adress
for any commercial or non commercial mailings. I will bill everyone
who sends me this kind of mail for wasting my time. Under Dutch law,
people who don't let me know they disagree with such a bill are obliged
to pay it.
------------------------------
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 969
*************************************