[8257] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1875 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 12 13:08:36 1998

Date: Thu, 12 Feb 98 10:01:35 -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, 12 Feb 1998     Volume: 8 Number: 1875

Today's topics:
    Re: Text parsing brian.russo@nextel.com
    Re: Un crypt <doug@weboneinc.com>
    Re: which sub calls my sub in perl module ? (Honza Pazdziora)
    Re: White Hats and Black <moises@texas.net>
    Re: Why is Tom Christiansen so rude? <tmh@possibility.com>
    Re: Why is Tom Christiansen so rude? (Francois Trousset)
    Re: Why is Tom Christiansen so rude? <doug@tc.net>
    Re: Why is Tom Christiansen so rude? <tchrist@mox.perl.com>
    Re: Why is Tom Christiansen so rude? <moises@texas.net>
    Re: Why is Tom Christiansen so rude? (Marc Haber)
    Re: Why is Tom Christiansen so rude? <spt@cstr.ed.ac.uk>
        Zero-width positive lookahead assertion Q <griffin@i33.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 12 Feb 1998 10:22:03 -0600
From: brian.russo@nextel.com
To: pjach@erac.com
Subject: Re: Text parsing
Message-Id: <887295727.1181679620@dejanews.com>

The data and headers are seperated by whitespace. My problem is searching
for the beginning of these stats and then only storing the numeric data.
The C7 headers are constant throughout the file but the numeric data that
follows, changes 48 times throughout the file. I need to gether all the
numeric data into another file (possibly in one delimited line per
occurance) and then use it later. I will probably graph the data.

Any help is appreciated,

-Brian

In article <34e2119e.0@news1.ibm.net>,	"Phil Jach - Reverse to get
address" <moc.care@hcajp - Reverse to get address> wrote:

>
> Is the information separated by comma, white space, tab, etc.  Obviously
> tabs would be hidden but you can still uses them to split data in a string
> into an array.  Let me know.
>
> brian.russo@nextel.com wrote in message <887215449.44433418@dejanews.com>...
> >Hello. I am attempting to write a perl script to read a log file (from
> >a Nortel Switch) and parse out a couple different pieces of data. The
> >log file is formatted in such a way that the headers and the data are
> >seperated. For example:
> >
> >C7SCCP C7RTFALL  C7RTFNTN  C7RTFNTA  C7RTFNWF C7RTFNWC  C7RTFSS
> >C7RTFSSC  C7RTFUEQ  C7UDTTX  C7UDTTX2  C7UDTRX C7UDTRX  C7UDTSTX
> >C7UDTSRX  C7MSGHDL  C7MSGHD2  C7MSGGT  C7MSGGT C7CLS0TX  C7CLS0T2
> >C7CLS0RX  C7CLS0R2  C7CLS1TX  C7CLS1T  C7CLS1RX  C7CLS1R2  C7SYNERR
> >C7RTBKSS  C7LOCSS  C7LOCSS
> >
> >    0
> >        24          0          2          0          0         2
> >               0           0       6531          0       2101         0
> >               1451        0      53540          0       1407         0
> >               5928        0        669          0        603         0
> >               1432        0          0          0      45532         0
> >
> >---------------------------------------------------------------------------
> -
> >
> >So, my problem is, how can I parse the file and search for the begining
> >of these stats and then save the numeric data in an array? These values
> >exist in the log file 48 (every 30 minutes for 24 hours) seperate times
> >and I would like to print out the results.
> >
> >Any help would be greatly appreciated,
> >
> >-Brian
> >
> >-------------------==== Posted via Deja News ====-----------------------
> >      http://www.dejanews.com/     Search, Read, Post to Usenet

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Thu, 12 Feb 1998 11:08:47 -0500
From: Douglas Clifton <doug@weboneinc.com>
Subject: Re: Un crypt
Message-Id: <34E31E8F.5B2773AA@weboneinc.com>

Edward Harris wrote:
> 
> If anyone has a good formula for uncrypting information previously
> crypted using perls "crypt" command, I would appreciate knowing it.

You can't, however if you have a encrypted string that you want to
check for a match (password?), then encrypt the incoming string with
the same salt and check those two for a match. 

-- 
Douglas Clifton
Unix/C/Perl/CGI/HTML Programmer
doug@weboneinc.com

===================
Web One Inc.
Website Development
Phone: 888-699-WEB1
Phone: 616-552-9999
Fax:   616-552-9920
sales@weboneinc.com
www.weboneinc.com
===================


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

Date: Thu, 12 Feb 1998 12:20:35 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: which sub calls my sub in perl module ?
Message-Id: <adelton.887286035@aisa.fi.muni.cz>

andreasw@prosolvia.se writes:

> Is there another $<anything>, which I did not find in the documentation,
> or do you see another possibility (except for brute-force manual
> debugging) ?

Check the perlfunc man page for function caller.

Hope this helps,

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Thu, 12 Feb 1998 10:47:29 +0000
From: "Moises G. Solis" <moises@texas.net>
To: Bart Lateur <bart.mediamind@tornado.be>
Subject: Re: White Hats and Black
Message-Id: <34E2D341.6C14E2EB@texas.net>

Let's draw a line in the sand.

$ began with DOS.  They added Word, Excel, and other applications which
people needed.   Intel went from the 8088 to the Pentium2 and the Merced is
around the corner.

They next bundled everything together into a cohesive package and asked the
OEMs to use it.

Now, they control the PC and our livelihood!

What is required is a cohesive package that is better and easier.   This
means an OS, a GUI, and business applications wrapped into one common
metaphor.

I truly believe that this can be done by us.   Secondly, imagine what would
happen if this was done under the guidance of a steering committee that
published a specification.   If we built it to the spec, it would eventually
become a standard in the corporate world and our daily lives.   When we
develop to a standard, the playing field becomes open.    Thirdly, it can
also be platform independent.   Built it once, run everywhere!

Then, we can truly say, Free at last!  Thank God almighty, were free at
last!

The question is, when do we begin?

Moises.


Bart Lateur wrote:

> I think it's a statement. A statement that you can't compete with
> Microsoft. No matter how good your product is, no matter if you
> initially have the monopoly for the world, once Microsoft smells the
> possibility, it will hunt you down.They will copy the functionality of
> your product, improve on it in some parts, and market it for a similar
> (or preferably cheaper) price. Until YOU give up. Or go bust.
>
> Looks what's happened to Novell, Borland, Lotus, WordPerfect, maybe even
> Unix. Once, they had it all. They ruled the world. Now, Microsoft owns
> the world, in what once was their speciality.
>
> M$ even employ dirty tricks, like encorporating Internet Explorer into
> Win95, and claim that it can't be removed from the OS. While it can.
>
> So, this is Netscape's statement: when up against Microsoft, you just
> can't win.
>
> Unless when it's free. Perl stands pretty strong against M$'s offerings,
> so does Apache (web server). Let the world know:
>
>         The best things in life are free.
>
> Even software.
>
> "Free the web".
>
>         Bart.





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

Date: Thu, 12 Feb 1998 07:34:12 -0800
From: Todd Hoff <tmh@possibility.com>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <34E31674.2244B8A8@possibility.com>

David Rawle wrote:
> 
> Well?

Those of us who have worked in the service industry recognize it
as a condition known as "contempt for the customer." It occurs 
even in the nicest people after prolonged exposure to a public 
which can appear lazy, stupid, pathetic, and incompetent,
especially to those who particularly intelligent and skilled.
Treatment is a long vacation so one can appreciate the god within
everyone and the beauty of each simple blade of grass.

------------------------------------------------------------------
      tmh@possibility.com   http://www.possibility.com/Tmh
I have no interest in any ship that does not sail fast, for I 
plan to go in harm's way. -- J.P. Jones


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

Date: 12 Feb 1998 16:39:08 GMT
From: trs@eerie.fr (Francois Trousset)
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <6bv8jc$pke$1@anais.eerie.fr>

In article <7xlnvgvpbm.fsf@beavis.vcpc.univie.ac.at>,
	Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at> writes:
> Probably because most (hmm, maybe) of the questions on this
> group have answers which can be found in the documentation
> you get with the language.

	The probleme, is that when you look at the perl documentation
in the CPAN distribution, you see that it is about 30 Megabytes of
compressed stuff. If you want perl to be a democratic language (in the
sense that it is used by the majority), you cannot ask people first to
read all of these docs, and I thing that for the majority of the
question, it should have been answer somewhere here or outside this
list. And even if it well organized et caetera et caetera, seeing all
of these informations is discourageant for beginners, ans I think it
is the aim of this list to help beginners and other people to find
the information. Saying ``it is in perldoc number n item/chapter/paragraph
(as you want) xxx'' is one way to give the information. Giving directly
the answer is another way. Both are valid as they give answer. Saying
``It's somewhere in the doc'' from my point of view should never be an
answer, because it looks like ``we don't care of your problems because
you have not learned enought of perl'', and someone that doesn't know
manything of perl seems to be a definition of a beginner.

> And a lot of the rest turn out to be WWW server or CGI or
> browser specific anyway.

	It is also true that some question have no relation with perl.

	That's just my point of view, I don't have answer nor a perl
	program that is able to understand english questions (and
	sometime decrypt the text to find the real question) and
	automaticaly search in the whole doc and find the right
	answer if present. I only know humans able to do that ;-)

		Francois Trousset



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

Date: 12 Feb 1998 11:40:13 -0500
From: Douglas McNaught <doug@tc.net>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <m2oh0cbwuq.fsf@ono.tc.net>

Todd Hoff <tmh@possibility.com> writes:

> David Rawle wrote:
> > 
> > Well?
> 
> Those of us who have worked in the service industry recognize it
> as a condition known as "contempt for the customer." 

I wasn't aware that we on the newsgroup are Tom's customers.  

Unless you've bought his books, but those of us who have done so (and
read them) tend not to post FAQs and off-topic CGI questions.

>                                                    It occurs 
> even in the nicest people after prolonged exposure to a public 
> which can appear lazy, stupid, pathetic, and incompetent,
> especially to those who particularly intelligent and skilled.
> Treatment is a long vacation so one can appreciate the god within
> everyone and the beauty of each simple blade of grass.

Mmmmm, vacation...  What a concept.

-Doug
-- 
sub g{my$i=index$t,$_[0];($i%5,int$i/5)}sub h{substr$t,5*$_[1]+$_[0],1}sub n{(
$_[0]+4)%5}$t='encryptabdfghjklmoqsuvwxz';$c='fxmdwbcmagnyubnyquohyhny';while(
$c=~s/(.)(.)//){($w,$x)=g$1;($y,$z)=g$2;$w==$y&&($p.=h($w,n$x).h($y,n$z))or$x==
$z&&($p.=h(n$w,$x).h(n$y,$z))or($p.=h($y,$x).h($w,$z))}$p=~y/x/ /;print$p,"\n";


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

Date: 12 Feb 1998 16:49:01 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <6bv95t$ira$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, trs@eerie.fr (Francois Trousset) writes:
:you cannot ask people first to read all of these docs, 

For this, Ken invented grep.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    "Some people think abstraction makes things easier, while others think it
    makes things harder.  It depends on whether you like to think about things."
    	--Larry Wall


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

Date: Thu, 12 Feb 1998 10:59:16 +0000
From: "Moises G. Solis" <moises@texas.net>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <34E2D603.5C291FFC@texas.net>

I have never met the man and I wish everyone joy and success in life.

I was wondering, have you read the 13th line on page xiii from the
camel book?   I find it humorous.

Moises.

P.S.   It probably doesn't apply!


David Rawle wrote:

> Well?





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

Date: Thu, 12 Feb 1998 17:02:59 GMT
From: Marc.Haber-usenet@gmx.de (Marc Haber)
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <6bva0f$n1p$2@nz12.rz.uni-karlsruhe.de>

Remove xx to reply <xxTony.Curtis@vcpc.univie.ac.at> wrote:
>I think Tom wants to help people here - it is mainly
>frustration at this repetition of already answered FAQs.

I can perfectly understand that frustration - I am experiencing it
myself in some of the groups where I hold some of the knowledge
present there. Also I have been rude at some occasions to people who
keep asking FAQs over and over.

I solved that problem by preparing canned answers for the most-FAQs.
These canned answers are a lot less emotional than ones I write at the
moment I get the questions and they can be worded much more carefully.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber          |   " Questions are the         | Mailadresse im Header
Karlsruhe, Germany  |     Beginning of Wisdom "     | Fon: *49 721 966 32 15
Nordisch by Nature  | Lt. Worf, TNG "Rightful Heir" | Fax: *49 721 966 31 29


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

Date: 12 Feb 1998 17:26:36 +0000
From: Richard Caley <spt@cstr.ed.ac.uk>
Subject: Re: Why is Tom Christiansen so rude?
Message-Id: <eyhen18vinn.fsf@liddell.cstr.ed.ac.uk>


He's not. He was implemented by Ken Thompson. You're lucky he was
slightly rewritten later otherwise he'd just be posting 

	?

in each case.

-- 
Mail me as rjc not spt@cstr.ed.ac.uk		_O_
						 |<



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

Date: Thu, 12 Feb 1998 16:26:36 GMT
From: David Griffin <griffin@i33.com>
Subject: Zero-width positive lookahead assertion Q
Message-Id: <34E322B3.D2DEFB28@i33.com>

I'm trying to add commas to long numbers, eg, 1234123545 becomes
1,234,123,545.  It seems to me that this should do the trick:

$num =~ s/(\d{1,3})(\d{3})(?=\d{3})*$/\1,\2/g;

However, (?=\d{3})* never matches, so assuming $num started as
1234123545, it ends up as 1234123,545.  Incidentally,

while ($num =~ s/(.*\d)(\d{3})/\1,\2/) {}

does the trick, so I'm much more interested in why the zero-width
lookahead assertion doesn't work.

##############

dave griffin
i33 communications, inc.
www.i33.com



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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 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.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 1875
**************************************

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