HDTenEightyP/NetNews huggingface dataset:
From: nobled@rebecca.its.rpi.edu (David Noble)
Subject: Re: timing problem with $SIG{'CHLD'}
Organization: Rainsallyearpolytorturetechnitute, Troy, NY
Date: Sat, 12 Dec 1992 23:34:55 GMT

In article <1992Dec9.102933.27264@hemlock.cray.com> mlo@cray.com writes:
>Which calls reaper to do a 'wait'.  This interfered with my daemon.
>I'd get 'interrupted system call' errors.
>
>The real problem has to do with hanging on the 'accept'.  You're stuck
>in a system call until something comes in.

Instead of bailing out whenever accept() returns an error, you can
special-case the interrupted system call error. Here's what I do:

    until ($addr = accept(NS,S))
	{ die $! unless $! eq 'Interrupted system call'; }

Of course, this breaks if the text of the error message varies for
different platforms. In that case, you would have to check for any
variants on the interrupted system call message. Anybody know offhand
whether the text of $! is defined by perl or the operating system?

--
Dave                         <dnoble@rdrc.rpi.edu>
            Computer & Systems Engineering, class of '92 and a half
 Visual Technologies Program, Rensselaer Design Research Center, RPI, Troy NY
///// "Hardware, n.: The parts of a computer system that can be kicked." \\\\\
From: ccechk@nuscc.nus.sg (Heng Kek)
Newsgroups: comp.lang.perl
Subject: Re: timing problem with $SIG{'CHLD'}
Date: 11 Dec 92 07:33:01 GMT
Organization: National University of Singapore
X-Newsreader: Tin 1.1 PL4

mlo@cray.com (Mick Oyer) writes:
: I'm trying to set up a daemon, written in perl, that will listen
: for messages coming across the network.  I used the client/server
: model in the Camel book as a starting point, but am running into
: a sticky situation.
: 
[..deleted..]
: I'm setting $SIG{'CHLD'} to reap the zombies.
: The problem:
: my code is blocking on the 'accept' call.  When the child
: exits, the CHLD signal causes reaper to get called, interfering
: with the accept:
: 	Interrupted system call at ./modinfod line 45.
: 
: 	(line 45):	($addr = accept(NS,S)) || die $!;
: 

I had EXACTLY the same problem.  My work-around was to re-invoke
'accept()' when it dies as per the problem above.  I use:

  ($addr = accept(KK,S)) || ($addr = accept(KK,S)) || 
                             die "accept:$!\n";
            # ..to avoid accept() dying and killing the prog.

Any criticism on this method is most welcome as I'd like to learn
too.

Sincerely
Heng Kek
Newsgroups: comp.lang.perl
From: ptm@xact.demon.co.uk (Paul Thomas Mahoney)
Subject: dbm/dbz missing?
Organization: X-Act Solutions Limited
X-Newsreader: Tin 1.1 PL3
Date: Fri, 18 Dec 1992 07:40:55 GMT

I built perl version 4.035 and ran the regression tests... 1 failure

 op/dbm...No dbm or ndbm on this machine at ./op/dbm.t line 15, <_GEN_0> line 1

I'm running ISC SysVR3 version 3.1 - it has libdbm.a but no dbm.h and no dbm(1)
I do have dbz.h and dbz.o but building dbzperl doesn't help. I noticed that
zhash.c is compiled with -DWANT_DBZ but this define does not appear in 
anywhere in the code.

I now need dbm functions... so can anyone help?

-- 
Paul Mahoney, X-Act Solutions Limited
smail: 20 Shipley Lane, Cooden, Bexhill-on-Sea, East Sussex, TN39 3SR
email: ptm@xact.demon.co.uk ... pmahoney@cix.compulink.co.uk
phone: +44 424 3 6368
Newsgroups: comp.lang.perl
From: jfh@netcom.com (Jack Hamilton)
Subject: Perl on ibm operating systems?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 18 Dec 1992 03:09:59 GMT

I think this question has been asked before, but I'll ask it again:

Has anyone compiled Perl on an MVS or VM/CMS system?  I can imagine all
kinds of problems with terminal i/o, but if you restricted it in some
horrible way, you might be able to get a reasonable subset.  Has anyone 
tried it? 

-- 

-----------------------------------------------------------------------
Jack Hamilton   jfh@netcom.com   P. O. Box 281107   SF, CA   94128-1107
From: hasse@dit.lth.se (Hans Lindkvist)
Newsgroups: comp.lang.perl
Subject: Perl versions
Date: 15 Dec 92 13:52:51 GMT
Reply-To: hasse@dit.lth.se (Hans Lindkvist)
Organization: Dept of Computer Engineering, Lund University, Sweden.
Originator: hasse@dit.lth.se


When I type perl -v I get the following:


	This is perl, version 4.0
 
	$RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
	Patch level: 19


I suppose there is a newer version or patchlevel. What is the latest?
What differences are there? How compatible are they?

-- 
Hans Lindkvist                      Tel: int'l:  +46 46 109510
Dept. of Computer Engineering       Tel: local:     046 109510
Lund University                     Fax: int'l:  +46 46 104714
P.O. Box 118                        Fax: local:     046 104714
S-221 00  Lund, Sweden              Email:  hasse@dit.lth.se
-- 
Hans Lindkvist                      Tel: int'l:  +46 46 109510
Dept. of Computer Engineering       Tel: local:     046 109510
Lund University                     Fax: int'l:  +46 46 104714
P.O. Box 118                        Fax: local:     046 104714
From: aahz@hal.COM (Tom Wylie)
Newsgroups: comp.lang.perl
Subject: copy() primitive?
Date: 17 Dec 92 19:35:57 GMT
Organization: HaL Computer Systems, Inc.
NNTP-Posting-Host: perv.hal.com

Is there some reason there isn't a primitive for copying files?
(along the lines of unlink and rename).  firing off backticked /bin/cp's
seems amazingly inefficient, and while yes I could use filehandles, it
seems to me that a primitive that just horks in the file and spits it
out somewhere else would be much faster.  I can't imagine that this
hasn't come up, so I figure there must be a good reason why there isn't
a copy() primitive, just wondering what it is.

Grepping the FAQ for 'cp' and 'copy' didn't turn up anything relevant,
and I don't remember seeing anything about it in the Camel book.


Thanks,
Tom Wylie	| What is the difference between apathy and ignorance?
aahz@hal.com	| I don't know, and I don't care.
Newsgroups: comp.lang.perl
From: jon@cas.org (Jon Vander Hill)
Subject: Re: C comment parser?
Organization: Chemical Abstracts Service, Columbus, Ohio
Date: Mon, 14 Dec 1992 18:23:00 GMT

>>>>> On Sun, 13 Dec 1992 00:54:54 GMT, mcook@fendahl.dev.cdx.mot.com (Michael Cook) said:

> You can do it with index():

>   $pos = 0;
>   while (($pos = index($_, "/*", $pos)) >= 0)
>   {
>     $end = index($_, "*/", $pos + 2);
>     $end >= 0 || die "unterminated comment";
>     substr($_, $pos, $end - $pos + 2) = '';
                                          ^^
>   }

For what it's worth, I believe the ANSI C standard says that a comments
turn into blanks.

Jon Vander Hill
jon@cas.org
Newsgroups: comp.lang.perl
From: rodney@cabot (Rodney Peck)
Subject: Re: Feature request for perl V
Organization: New York State Institute for Sebastian Cabot Studies
X-Newsreader: Tin 1.1 PL4
Date: Fri, 18 Dec 1992 21:50:39 GMT

#!/bin/perl

@lines = (
"folta@cs.umd.edu (Wayne Folta) writes:",
": Could grep have an added option/mode that would allow me to get an array",
": of indices instead of an array of items? I want to read a file into an",
": array, then do some greps in the array, some calculations, and then if",
": everything is right, make a couple of changes in the array, then write it",
": back out to the file. If I could do this:",
": ",
":    @line_numbers = grepi (/IN A/, @lines) ;",
": ",
": I'd be pretty happy. How's it sound?");

# I think the subroutine below does what you want.  I can't see any reason
# to make this an internal function.  I imagine the internal version would
# do roughly the same thing.
#  rodney
#
#  here's the output of grepi looking for " array" in the above message:
#
# cabot> perl f
# 1, 2, 3, 4
# : Could grep have an added option/mode that would allow me to get an array
# : of indices instead of an array of items? I want to read a file into an
# : array, then do some greps in the array, some calculations, and then if
# : everything is right, make a couple of changes in the array, then write it
# 


@line_numbers = &grepi("/ array/",@lines);

print join(", ", @line_numbers),"\n";
grep ((print @lines[$_],"\n"), @line_numbers);

sub grepi {
local ($exp,@ar) = @_;
local (@ans,$_);
local ($count) = 0;

  foreach $_ (@ar)
  {
    push(@ans,$count) if eval($exp);
    $count++;
  }
  @ans;
}
Newsgroups: comp.lang.perl
From: doi@jrd.dec.com (Hitoshi Doi)
Subject: Re: Error: Allocation to large in Perl for DOS -- bug?
Organization: DEC Japan Research and Development Center
Date: Mon, 14 Dec 1992 23:05:40 GMT

In article <mark.724344389@coombs>, mark@coombs.anu.edu.au (Mark) writes:
# pyrros@braindamaged.cis.udel.edu (Christos T. Pyrros) writes:
# 
# >I'm using DOS 5.0 (mem reports 565k avail), and perl for DOS:
# >Is this a bug?  Or am I doing something wrong?

perl with only 565k memory is not very useful. (^_^)

# Unfortunately the perl.386 has problems with little things like changing 
# drives and the 'utime()' command... I use both, and Im very careful when
# programming for the perl.msdos version.. use temp files etc.

I recompiled perl386 with a newer version of DJGPP.
I know it fixed some problems, but I don't know about others.
It should be arriving at the umanitoba.ca ftp site soon.
(I don't know what other ftp sites it is kept at.)
I also built an a2p for 386, and it is included.

# Now if someone would just merge the two..

I don't know enough about MS-DOS..
--
Hitoshi Doi, International Open Systems Engineering        doi@jrd.dec.com
Japan Research and Development Center               decwrl!jrd.dec.com!doi
Digital Equipment Corporation Japan      [from JUNET: doi@jrd.dec-j.co.jp]
From: merlyn@ora.com (Randal L. Schwartz)
Newsgroups: comp.lang.perl
Subject: Re: Thanks to all of you that bought camel books!
Date: 17 Dec 92 01:36:43 GMT
Article-I.D.: romulus.MERLYN.92Dec16173634
Organization: Stonehenge Consulting Services; Portland, Oregon, USA

In article <1992Dec16.160615.2054@cognos.com> alanm@cognos.com (Alan Myrvold) writes:
   But how does 10" of new snow delay things?  
   Were you alpine skiing, telemarking, x-country skate style, 
      x-country classical, or just frustrated at the traffic headaches?
   My bet is on Randal being a radical snowboarding dude. :-)

Nope.  Alpine.  I'm basically lazy when it gets cold. :-) And this is
only my second season (but I've been up 5 times already).  We got 45
inches of *new* snow by last Saturday in one week, and then it was
clear blue no-wind.  Way cool.

Snowboarding looks weird... you spend all your time going sideways.  I
don't want to do that, either on the hill, or on the drive up. :-) I
don't skateboard either, having spent 3000 hours on conventional
roller skates instead.  (Why do you think the example in the Camel
book finds the intersection of skaters and pilots?  Those are all real
names, by the way.)

   I found the tutorial in the Camel book quite good for learning Perl,
   but then again, I had read the man page all the way through first.
   Plus, how long will Learning Perl exist before it is obsoleted by version 5
   changes?

Practically all of the code is unaffected by perl4 to perl5... it's
just that some of the stated limitations may be lifted.  There are
references to Perl 5 in LP already.  In fact, now that the schedule is
out a few extra months, I may get closer cooperation with Larry to
preview the book in light of the real Perl 5, rather than the
theoretical Perl 5.

print "Just another Perl hacker," # and ski bum
--
Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
merlyn@ora.com (semi-permanent) merlyn@reed.edu (for newsreading only)
factoid: "Portland, Oregon, home of the California Raisins and Lone-Star Beer!"
Newsgroups: comp.lang.perl
From: kenc@sol.acs.unt.edu (Ken Corey - Operator)
Subject: A REAL toughy!
Organization: University of North Texas
Date: Thu, 17 Dec 1992 17:46:18 GMT

If you thought that the IP addr was rough...here's one certain to curl your 
toes:

Can anyone tell me how to figure out what actual socket is used for a 
particular tty?

The application is to figure out the IP address of a person logging into a 
systtem.  The application will be launched as a shell, so I can't grab the 
socket myself...  Hence, I'm kinda out in the cold trying to use thing like 
gethostbyaddr (etc).

Talk to y'all later.

Ken == kenc@sol.acs.unt.edu == kenc@vaxb.acs.unt.edu
 There is only one thing in the world worse than being talked about, and
 that is not being talked about.
 		-- Oscar Wilde
Newsgroups: comp.lang.perl
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: Is this a bug...
Originator: tchrist@pixel.convex.com
Date: Mon, 14 Dec 1992 16:18:40 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of thomaso@centerline.com (Thomas Andrews):
:I posted this "bug" but I didn't get any response.  

Sure you did.  You posting was 

    <1fobolINNsqs@armory.centerline.com> 
    Friday, 4 Dec 1992 19:32:37 GMT

and my answer was in

    <1992Dec4.200810.25384@news.eng.convex.com> 
    Friday, 4 Dec 1992 20:08:10 GMT

Maybe the half-hour turnaround was too quick for your news system. :-)

:It appears that calling a subroutine with no argument list is not the
:same as calling the subroutine with an empty argument list.  That is,
:	&foo();
:is different from
:	&foo;
:I could not find documentation for this in the camel book.  Is this
:a bug or a feature?

It's a feature.  This way you can cause the new subroutine to
efficiently inherit the old one's arguments.  It's nice for 
making stub routines, for example.  If you call &func w/o parens,
the arglist @_ is not reset.  Use &func() if you want that to happen.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

"Those who do not understand Unix are condemned to reinvent it, poorly."
					--Henry Spencer
From: neumann@dec4.wu-wien.ac.at (Gustaf Neumann)
Newsgroups: comp.lang.perl
Subject: Re: In 5.0, are we gonna get...
Date: Thu, 17 Dec 92 22:47:15 MET
Organization: WU-Wien
Distribution: world
NNTP-Posting-Host: dec4.wu-wien.ac.at

In article <2B2D2498.874E@tct.com> from [Tue, 15 Dec 1992 00:19:36 GMT] you wrote:
 |> >	$sum = reduce {$a+$b} 1,34,$x,45,-8,0.1;
 |> 
 |> Interesting.  That operation would be a generalization of join:
 |> 
 |> 	$x = join(":", @foo);
 |> 
 |> and
 |> 
 |>         $x = reduce {$a.":".$b} @foo;

how about 

	    $sum = eval join('+ ',1,34,$x,45,-8,0.1);

ok, the string conversion could be avoided, but you can do it now...
-gustaf
--
Gustaf Neumann          neumann@dec4.wu-wien.ac.at, neumann@awiwuw11.bitnet
Vienna University of Economics and Business Administration 
Augasse 2-6,  A-1090 Vienna, Austria		
Tel: +43 (222) 31-336 x4533  	Fax: 347-555
From: lwall@netlabs.com (Larry Wall)
Newsgroups: comp.lang.perl
Subject: Re: [Q] Ref. to array element ?
Date: 11 Dec 92 17:14:40 GMT
Organization: NetLabs, Inc.

In article <1992Dec10.075930.28572@cs.ruu.nl> piet@cs.ruu.nl (Piet van Oostrum) writes:
: >>>>> pem@yarra-glen.aaii.oz.au (Paul E. Maisano) (PEM) writes:
: 
: PEM> Here's a sub that will return the symbol table entries (globs?)
: PEM> for each scalar passed.
: 
: PEM> Eg. (*a, *b) = &ref($x, $y[1])
: 
: PEM> `a' now refers to whatever `x' did and `b' should refer to whatever
: PEM> y[1] did.
: 
: PEM> I wrote it a long time ago but I have never used it for anything.
: PEM> It uses the fact that the grep function makes $_ a reference to each
: PEM> scalar in the given array.
: 
: Will this also work in perl 5?

There's a good chance of it, though you should realize that it probably
generates symbol table entries that are rarely (if ever) reclaimed.
It would likely be better to use real references in Perl 5.

Larry
Newsgroups: comp.lang.perl
From: thayer@cs.columbia.edu (Charles Thayer)
Subject: Re: Statistic routines ?
Summary: Paper on data manip
Keywords: statistic
Bcc: thayer
Organization: Columbia University Department of Computer Science
Date: Fri, 18 Dec 1992 01:56:52 GMT

In article <Bz7qCA.Gy5@cosy.sbg.ac.at> lendl@cosy.sbg.ac.at (Otmar Lendl) writes:
>Before I start to write my own set of functions (Mean, standard-deviation,
>histograms, ...) I better ask if there are already such beasts.
>I checked the script-archives listed in the FAQs (convex, ohio-state),
>but could not find anything suitable.
>
>Can anyone give me pointers ?
>
>/Otmar

On a related note:

On wingra.stat.wisc.edu via anon ftp you can obtain the paper "Data
Manipulation in Perl" which is a helpful short paper if you are
getting started with perl.

Personally, for the one statistics related chore I do, I use Splus
encased in perl (of course.)  Splus is a terrific package and I highly
recommend it, but it's a commercial product.  So I have a lot of:

    open(PIPE, '| Splus');
    print PIPE <<"EOF";
d<-read.table(\"uptime.$host.data\", header=T, sep=\":\")
attach(d)
...
postscript(\"uptime.month.$host.ps\")
plot(load15 ~ omonths)
...
EOF

What I do is collect simple `uptime` lines from a number of hosts.
Remunge these with perl regex matching.  Feed the data to Splus which
generates postscript plots.  Build a latex file which then uses psfig
to include the plots.

Incidentally.  A nice thing you can do with your statistics is create
data files then run gnuplot on the data files.  It's a simple and flexible
way to take some handwritten stuff and throw a free X-windows front-end
on.  If you get really involved in graphics Wafe and tk have some plotting
widgets.

/charles
PS.  Maybe someone should write numerical recipes in perl :)
-- 
==============================================================================
Charles Thayer, Columbia University, Dept. CS, Tech-staff... my words only.
Newsgroups: comp.lang.perl
From: johnw@bnd2.bnd.oz.au (John Warburton)
Subject: Re: programming challenge
Organization: B&D Doors, Sydney, NSW, Australia
Date: Thu, 17 Dec 1992 03:01:34 GMT

From article <1992Dec16.043128.7616@bby.com.au>, by gnb@baby.bby.com.au (Gregory N. Bond):
> If you are editing man pages, they probably contain things like
> E^HE to make things bold, and _^HE (or E^H_, depending on your
> nroff) to underline them.  Rather than stripping the ^Hs then
> compressing the repeats, what about doing both at once:
> 
> 	perl -pi.bak -e 's/(.)\cH$1/$1/g;s/_\cH(.)/$1/g;' {files}
> 
I did this for a while & was reading the man page for col.
now the above is col -b     :-( had I been wasting some time typing that out!

> 
> Greg.
John

> --
> Gregory Bond <gnb@bby.com.au> Burdett Buckeridge & Young Ltd Melbourne Australia
>       If I hear "Jingle Bell Rock" one more time, I will _scream_!
would that be the Abba or the Chipmunks version?
-- 
John Warburton				Internet:    johnw@bnd2.bnd.oz.au
Systems Administrator			Phone:       +61 2 771 5566
B & D Australia				Fax:	     +61 2 771 6385
		  Living on ice-cream and chocolate kisses...
From: kron@ueshiba.Corp.Sun.COM (Kenneth Kron)
Newsgroups: comp.lang.perl
Subject: using grep to extracting matching elements from an array
Date: 15 Dec 1992 23:28:24 GMT
Organization: Sun Microsystems, Inc.
Distribution: world
Reply-To: kron@ueshiba.Corp.Sun.COM
NNTP-Posting-Host: ueshiba.corp.sun.com

I'd like to count the number of elements in an associative array whose keys match an re.

For example I'd like to know how many of the mounted file systems start with "home".
    Note this is a simple example,  I really need to
        "count the number of keys in an associative array that match an re"

open(LocalDisk, "df -t 4.2|") ;
<LocalDisk> ;    # throw away first line
while(<LocalDisk>) {
	chop ;
	($junk, $junk, $used, $junk, $junk, $Dir )= split ;
	$LocalDisks{$Dir} = "$used" ;
}
@Group = grep("home", keys %LocalDisks) ;
print join(" ", @Group) ;


But group is always ALL the keys.

I know there are other ways to do this but what I want to know is what
don`t I understand about the GREP FUNCTION???


tnx

---
kron@ueshiba.sun.com
'Whatever you can do, or dream you can, begin it.  Boldness
has genius, power and magic in it.'  -  Goethe

Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: copy() primitive?
Organization: Motorola Codex, Canton, Massachusetts
Date: Fri, 18 Dec 1992 03:31:01 GMT

ram@eiffel.com (Raphael Manfredi) writes:

>For instance, 'unlink' can offer me something 'rm' will never be able to
>provide, namely the ability to "unlink" directories.

Really?  You'd better tell the GNU people that.  Their version of "rm" takes
a --directory switch. :-)

(I see your point, though.)

Michael.
Newsgroups: comp.lang.perl
From: Dov Grobgeld <dov@menora.weizmann.ac.il>
Subject: Will there in Perl 5.0 be...
Reply-To: dov@menora.weizmann.ac.il
Organization: The Internet
Date: Tue, 15 Dec 1992 08:54:02 GMT

* Structures with named members, a.k.a. struct in C and record in Pascal?
  I.e.  $employee->name .
  
* Actions associated with these structures.
        do %list->sort

* The possibility to redefine what characters are in the set . in
  regexps?
  
* Possible to use {\1} for recursive regexps e.g. /(5)H.{\1}/ to
  match "5Hello"?
  
Let us all give Larry three big cheers for making this new version
for us! :-)
--
                                                        ___   ___
                                                      /  o  \   o \
Dov Grobgeld                                         ( o  o  ) o   |
The Weizmann Institute of Science, Israel             \  o  /o  o /
"Where the tree of wisdom carries oranges"              | |   | |
                                                       _| |_ _| |_
                                       
Newsgroups: comp.lang.perl
From: lwall@netlabs.com (Larry Wall)
Subject: Re: Is this a perl bug?
Organization: NetLabs, Inc.
Date: Mon, 14 Dec 1992 17:56:49 GMT

In article <mcook.724207619@fendahl.dev.cdx.mot.com> mcook@fendahl.dev.cdx.mot.com (Michael Cook) writes:
: lwall@netlabs.com (Larry Wall) writes:
: 
: >Similarly, `cat $foo` turns into something like backtick('cat ' . $foo),
: >though I haven't actually put in a keyword to access that function yet.
: 
: Cool.  Would we be able to do something like this: backtick('cat',$foo), which
: would be analogous to system('cat',$foo) vs. system("cat $foo")?

At the moment the new internal functions like backtick(), uc(), and
glob() are unary operators, but I'll think about it some.

: And how about having it so the file name in open() can be separated from the
: directive characters: open(FH,">",$foo).  That way, it would still work even
: if the file name had funny characters (such as leading/trailing whitespace).

There might be a 3-arg sysopen, if I get around to it.

: And open(FH,"|-",'cat',$foo) could be like open(FH,"|cat $foo"), except that
: it would be done directly via exec, not via "sh -c".

I don't see the point, when

	open(FH, "|-") || exec 'cat', $foo;

does the same thing.  In fact, so does

	open(FH, "|cat $foo");

as long as $foo contains no shell metacharacters.

Larry
Newsgroups: comp.lang.perl
From: chip@tct.com (Chip Salzenberg)
Subject: Re: negation in Regular Xpr.
Date: Thu, 17 Dec 1992 22:41:19 GMT
Organization: TC Telemanagement, Clearwater, FL

According to hans@symbas.lind.no:
>/^pattern/   matches when the pattern is encountered at the start
>             of the line.
>             But in such cases I eant to  a v o i d  the rule to fire.
>             How do I do that ?

How about /.pattern/?

-- 
Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  "you make me want to break the laws of time and space / you make me
   want to eat pork / you make me want to staple bagles to my face /
   and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"