[8201] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1819 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 5 21:07:42 1998

Date: Thu, 5 Feb 98 18:00:24 -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, 5 Feb 1998     Volume: 8 Number: 1819

Today's topics:
    Re: A regex problem <rjk@coos.dartmouth.edu>
        best way of doing sort|uniq (sort -u) in perl <T.Nugent@sct.gu.edu.au>
    Re: Converting data to an array <Jan@ChipNET.cz>
    Re: Converting data to an array (Craig Berry)
    Re: Crazy Idea (Ilya Zakharevich)
    Re: Delimiting file entries <westxga@ptsc.slg.eds.com>
    Re: Delimiting file entries (Craig Berry)
    Re: Help Wanted: Parsing data from oddly formatted file <rpsavage@ozemail.com.au>
        How do you search an array for a string? <Craig@skybound.demon.nl>
    Re: How do you search an array for a string? <ebohlman@netcom.com>
        How to reuse Perl internal methods <blazer@mail.nevalink.ru>
    Re: loading images (Martien Verbruggen)
    Re: LOW LEVEL PERL HELP ben.aveling@fujitsu.com.au
    Re: mkdir and mkdir -p <rpsavage@ozemail.com.au>
    Re: NAWK to PERL conversion <Russell_Schulz@locutus.ofB.ORG>
        Newbie q? h2ph?? sys/socket.ph?? <MetatonCSI@worldnet.att.net>
        non-regex for potentially RFC-compliant email address ( <Russell_Schulz@locutus.ofB.ORG>
    Re: Question: Searching files. (Kuma)
    Re: Question: Searching files. (Philip Freed)
        Random Image Generator cowboy@cnnw.net
    Re: solution for multiline comments??? (Brendan O'Dea)
        SSI Perl help (Alex Oliva)
        Syntax-coloring editor for NT <smcmahon.nospam@pplsi.com>
    Re: Syntax-coloring editor for NT (Jim Esten)
    Re: Syntax-coloring editor for NT <latshaw@ibm.net>
        test... sorry <blazer@mail.nevalink.ru>
    Re: Using flock? (Stunt Pope)
        where do subscribe to the perl-msql mailinglist? uhm, i (gravity)
    Re: Wierd Directory Problem <dballing@speedchoice.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Thu, 05 Feb 1998 20:14:53 -0500
From: Chipmunk <rjk@coos.dartmouth.edu>
Subject: Re: A regex problem
Message-Id: <34DA640D.A49F7650@coos.dartmouth.edu>

Eli the Bearded wrote:
> 
> Chipmunk  <rjk@coos.dartmouth.edu> wrote:
> > Peter Kruse wrote:
> > > while(<>) {
> > >         while(s/(<h3>[^<]*)<p>/$1/gi){}
> > >         print;
> > > }
> > > which assumes that <h3> and </h3> are not separated by newline.
> > Actually, it doesn't.  [^<] can match a newline.
> 
> Yes, but $/ is probably still set to \n.

True.  I assumed he was referring specifically to the regex, as that
was the topic of the thread.  (Subject: A regex problem)

> Elijah
> ------
> nearly made the same comment as Chipmunk when he saw that

Chipmunk
Making mistakes so other people don't have to  ;-)


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

Date: 6 Feb 1998 00:45:31 GMT
From: Tony Nugent <T.Nugent@sct.gu.edu.au>
Subject: best way of doing sort|uniq (sort -u) in perl
Message-Id: <6bdmfb$6d9$1@griffin.itc.gu.edu.au>
Keywords: perl programming sort uniq

I have a perl array, @RAWDATA.

It's easy to grep() it, but I really need to do a "sort | uniq" to sort
the array and delete any duplicated lines.

What's the best/easiest way to do this with perl?

Many thanks, in advance.

(PS: the only perl FAQ I could find was the one for tcl.  Where is the
actual perl FAQ now kept?)

Tony Nugent <T.Nugent@sct.gu.edu.au>


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

Date: Thu, 05 Feb 1998 23:03:25 -0800
From: Jan Krynicky <Jan@ChipNET.cz>
Subject: Re: Converting data to an array
Message-Id: <34DAB5A8.1819@ChipNET.cz>

> >one
> >two
> >three
> >four
> >(This is all that is in the file.)
> 
> >Now I want to make that into the array, @numbers.  Any suggestions?
> 
> 
>         open(FIL,'stuff.data') or die $!;
>         @numbers = grep { chomp } <FIL>;
>         close(FIL);

Do not use 'grep' if you mean 'map'. Grep means
"walk through a list and filter out the items that do not satisfy a
condition."
while map is
"apply a function to all items of a list".

In this example it doesn't matter cause chomp returns "\n" always,
but it is a bad habit.

> 
>         Assuming, of course, that there's one array item per line, and
> you didn't want to turn the English representation of the numbers into
> their integer counterparts, which is another problem altogether.
> 
>         And as an added bonus, you can also strip out blank lines
> (especially handy if there's an extra newline or two at the end of file)
> by the highly enigmatic edition:
> 
>         @numbers = grep { !/^$/ and chomp } <FIL>;

Yeah this is it. :-)

> 
> Actually, now that I look at it, it's perfectly readable.
> 
> jma (I just love being able to say "grep { chomp }")
> 
> --
> Jim Allenspach              Hacking Perl since 1994.

Jenda


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

Date: 6 Feb 1998 00:38:49 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Converting data to an array
Message-Id: <6bdm2p$ai9$1@marina.cinenet.net>

Jan Krynicky (Jan@ChipNET.cz) wrote:
: > >Now I want to make that into the array, @numbers.  Any suggestions?
: > 
: >         open(FIL,'stuff.data') or die $!;
: >         @numbers = grep { chomp } <FIL>;
: >         close(FIL);
: 
: Do not use 'grep' if you mean 'map'. Grep means "walk through a list 
: and filter out the items that do not satisfy a condition." while map is
: "apply a function to all items of a list".
: 
: In this example it doesn't matter cause chomp returns "\n" always,
: but it is a bad habit.

It matters a lot!  Using map in place of grep in the code above would 
fill @numbers with N instances of "\n", where N is the line count.

In any case, I believe the prefered idiom here is

  chomp(@numbers = <>);

In general, uses of map and grep with side effects on the underlying list 
are to be avoided.

: >         @numbers = grep { !/^$/ and chomp } <FIL>;
: 
: Yeah this is it. :-)

I'd much prefer doing it in two steps:

  chomp(@numbers = <>);
  @numbers = grep length, @numbers;

That way it's a bit clearer what's going on, and you avoid the error- and
confusion-prone grep with side effects.  Also, it's nice (IMHO) to avoid
regexes when there's a trivial functional equivalent. 

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: 5 Feb 1998 22:19:13 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Crazy Idea
Message-Id: <6bddt1$qtg$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Vladimir Alexiev 
<vladimir@cs.ualberta.ca>],
who wrote in article <omsopxan2k.fsf@tees.cs.ualberta.ca>:

> or `$pat=qr{\d+|(?:\($pat...}dx'

> - is the inner occurrence of $pat lexical or dynamic? Closures don't
>   seem to allow postponed lexicals, eg 
>     my $fact=sub{my$n=shift; $n==1?1:$n*&$fact($n-1)}
>   doesn't work while
>        $fact=sub{my$n=shift; $n==1?1:$n*&$fact($n-1)}
>   works.

Irrelevant.  `my' takes effect only *after* the statement.
     my $fact;
     $fact=sub{my$n=shift; $n==1?1:$n*&$fact($n-1)}
should work.

> - what will it do with perversions such as $a=qr{$b}d; $b=qr{$a}d;
>   just loop forever?

Sure!  Is not it what you asked it to do?

Ilya


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

Date: Thu, 05 Feb 1998 16:23:43 +0000
From: Glenn West <westxga@ptsc.slg.eds.com>
Subject: Re: Delimiting file entries
Message-Id: <34D9E78F.7107@ptsc.slg.eds.com>

john a barbuto wrote:
> 
> Perl gurus,
> 
> I have a data file consisting of dictionary entries, and i'd like to set
> off the entries with a %%.  I've come up with this:
> 
>    open(DAT, $file) or die "Could not open $file!: $!\n";
> 
>    while(<DAT>) {
>       if (/^[A-Z]{3,}/) {  # 3 or more capital entries indicates an entry
>          insert %% and a newline before $_
>       }
>    }
> 
> I'm having trouble with the part indicated by pseudocode.  Any help would
> be appreciated.  Thanks!
> 
> -jab

How about:

$_="%%\n".$_;


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

Date: 5 Feb 1998 23:39:18 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Delimiting file entries
Message-Id: <6bdij6$4ks$1@marina.cinenet.net>

john a barbuto (jab@acm.org) wrote:
: Perl gurus,
: 
: I have a data file consisting of dictionary entries, and i'd like to set
: off the entries with a %%.  I've come up with this:
: 
:    open(DAT, $file) or die "Could not open $file!: $!\n";
: 
:    while(<DAT>) {
:       if (/^[A-Z]{3,}/) {  # 3 or more capital entries indicates an entry 
:          insert %% and a newline before $_
:       }    
:    }
: 
: I'm having trouble with the part indicated by pseudocode.  Any help would
: be appreciated.  Thanks!

  while (<DAT>) {
    s/^([A-Z]{3})/%%\n$1/;
    print;     # Or push onto @out, or however you're collecting output.
  }

Note that there's no need to look for {3,} (three or more); finding just 
three is sufficient to know we've got an entry by your definition.

Hope this helps!

---------------------------------------------------------------------
   |   Craig Berry - cberry@cinenet.net
 --*--    Home Page: http://www.cinenet.net/users/cberry/home.html
   |      Member of The HTML Writers Guild: http://www.hwg.org/   
       "Every man and every woman is a star."


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

Date: Fri, 06 Feb 1998 11:12:43 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: Help Wanted: Parsing data from oddly formatted files
Message-Id: <34DA638B.2700@ozemail.com.au>

Bart Lateur wrote:
> 
> riddler@atmnet.net (Terry Bunch) wrote:
> 
> >I have around 300 small ascii files that I need to parse some data out of
> >and I am not quite sure how to go about this. The files do not all[snip]

Another way to do it is to use state machines, aka Discrete Finite Automata.
I've written such a package, and it can generate your program for you, based on
your regular expressions. Let me know if you want it.

-- 
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au


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

Date: Thu, 05 Feb 1998 23:48:49 +0100
From: Craig Manley <Craig@skybound.demon.nl>
Subject: How do you search an array for a string?
Message-Id: <34DA41D1.F67@skybound.demon.nl>

Hi,

I need to search an array for a case-insensitive and full match of a
search string. I'm new to Perl, so I haven't been able to figure out how
that works.

Does anybody have a solution?

Greetings,
Craig Manley.


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

Date: Fri, 6 Feb 1998 00:21:34 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: How do you search an array for a string?
Message-Id: <ebohlmanEnxKzy.KrB@netcom.com>

Craig Manley <Craig@skybound.demon.nl> wrote:

: I need to search an array for a case-insensitive and full match of a
: search string. I'm new to Perl, so I haven't been able to figure out how
: that works.

: Does anybody have a solution?

Yep, Larry Wall does.  It's described in detail in the piece of 
documentation known as perlfunc, which came with your Perl distribution 
(there will certainly be a perlfunc.pod, which you can read using the 
perldoc program that also came with your distribution, and depending on 
your platform, it will also be available as either a Unix man page or an 
HTML file).  You'll want the description of the grep() function.



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

Date: Thu, 05 Feb 1998 08:14:21 +0300
From: Mike <blazer@mail.nevalink.ru>
Subject: How to reuse Perl internal methods
Message-Id: <34D94AAD.65CC@mail.nevalink.ru>

Hi all,
I've got this question trying to make some analysis on perl-scripts. The
first goal was to remove all comments from perl-script. It's easy to
remove the whole lines started whith # but even here the mistakes are
possible: some of the lines might be inside here-docs or multilined
definitions.
You got it? And everything is even more complicated if we'll try to
remove end-line comments. # might be a part of pattern, string, $#a
etc., etc.

My idea was: may be it's possible somehow to reuse perl's internal
routines for this purpose?
And not only for removing comments. In general: is there some way to
call methods of Perl syntax analyzer, to run perl.exe (I'm usually
programing on Win32 port) with -c option and get some intermediate
rezults of compiler? Such as text before run-time, list of all used
names (scalars, arrays, hashes)?

I believe that there is some intermediate phase when script is cleared
from comments, spaces, line-breaks but is still valid perl-script.

Thanks for any ideas.
-- 

*******************************************
Mike Blazer
c o n t i n e n t a l   g r o u p   i n c .
blazer@mail.nevalink.ru
*******************************************


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

Date: 5 Feb 1998 02:37:57 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: loading images
Message-Id: <6bb8m5$ber$1@comdyn.comdyn.com.au>

In article <6b5os7$fqs@examiner.concentric.net>,
	Eyeh@cris.com (Edward Yeh) writes:
> has anyone loaded images into a sql server database ?

Yep.

What does this have to do with perl?

Martien
-- 
Martien Verbruggen                  | 
Webmaster www.tradingpost.com.au    | I'm desperately trying to figure out
Commercial Dynamics Pty. Ltd.       | why kamikaze pilots wore helmets - Dave
NSW, Australia                      | Edison 


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

Date: Thu, 05 Feb 1998 18:37:18 -0600
From: ben.aveling@fujitsu.com.au
Subject: Re: LOW LEVEL PERL HELP
Message-Id: <886724515.422313987@dejanews.com>

In article <6b7qld$2bh$3@uranium.btinternet.com>,
  Gellyfish@btinternet.com (Jonathan Stowe) wrote:
> In article <34D7281C.741F7AB3@ist4.co.umist.ac.uk>,
> mcai3ph2@ist4.co.umist.ac.uk says...

> >I have to write a simple Perl script to communicate
> >with a Printed Circuit Board, through a simple serial
> >link (RS232 link).

> >I have been advised to use ioctls.

> ioctl() is generally platform specific.  It would behove you to look at the
> manpage for ioctl.  Questions about controlling stuff via rs232 or (as i see
> it) *seriously* out of the scope of this NG however, I will be prepared to
> take a bite of one of my girlfriends hats if you get much more than this :-}

Depending on how much control you need it may be enough to do something
like  (under Windows )	open( PORT, "+>COM1" ) or die "Can't open port:
$!";  select PORT;  $| = 1;  select STDOUT;

and then use print and read (or sysread)

The $|=1 sets the port to unbuffered.  For some reason I don't understand
you get _really_ wierd results if you both read and write to a port
without unbuffering it.  Like, it starts sending bits of your script! 
(Probably reading from a random location in its own executable.)

Under a real operating system I've been told to use /dev/tty01 instead of
COM1 but I havn't tried it yet.  I don't know if it's as necessary to
unbuffer the line, but it's probably a good idea.

    Regards, Ben Aveling

> Have fun.
>
> Jonathan

PS I don't know if this requires Jon to take that bite out of one of his
girlfriends hats or not?  ( How many girlfriends does he have anyway? ;-)

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


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

Date: Fri, 06 Feb 1998 10:42:03 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: mkdir and mkdir -p
Message-Id: <34DA5C5B.287C@ozemail.com.au>

[snip]

File::Path has a recursive mkpath

-- 
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au


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

Date: Thu, 5 Feb 1998 22:29:04 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: Re: NAWK to PERL conversion
Message-Id: <19980205.222904.1P7.rnr.w164w@locutus.ofB.ORG>

  [ will this get me yet another `welcome, newbie!' message? ]

mgjv@comdyn.com.au (Martien Verbruggen) writes:

>> I have a nawk script that I am trying to convert to perl.  The script
> You might try the a2p translator that comes with perl (awk to perl).

unfortunately, that's not true -- the original script used output
redirection, and a2p doesn't handle that (no known workaround).
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: 6 Feb 1998 00:21:32 GMT
From: "William Lapides" <MetatonCSI@worldnet.att.net>
Subject: Newbie q? h2ph?? sys/socket.ph??
Message-Id: <6bdl2c$3lo@bgtnsc03.worldnet.att.net>

I just installed perl locally, after using perl to create cgi files on
remote servers for 6 months now... and Im kinda stuck.. It's looking for a
sys/socket.ph  when there is no sys/ directory and it says I should use
h2ph, i have no clue what h2ph is and when I run it, nothing happens.  I am
running perl on win95.  Sorry for the inconvenience, and thanks ahead of
time, you all are very helpful.

Later
Metarazor


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

Date: Thu, 5 Feb 1998 22:15:20 +0000
From: Russell Schulz <Russell_Schulz@locutus.ofB.ORG>
Subject: non-regex for potentially RFC-compliant email address (was Re: Quickie: regexp for valid e-mail addresses)
Message-Id: <19980205.221520.6B9.rnr.w164w_-_@locutus.ofB.ORG>

abigail@fnx.com (Abigail) writes:

> Dan Sanderson (dsanders@u.washington.edu) wrote on 1617 September 1993

heh.

> /[\x00-\x7f]+@[\x00-\x7f]+/;
>
> There isn't any symbol from ASCII set that is *not* allowed in an
> email address. Read RFC822 for details.

this is not true, for the domain-part.  and there should be at LEAST
two characters after the `@', and almost always at least one `.'.
-- 
Russell_Schulz@locutus.ofB.ORG  Shad 86c


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

Date: Thu, 05 Feb 1998 22:55:05 GMT
From: tgy@chocobo.org (Kuma)
Subject: Re: Question: Searching files.
Message-Id: <34e03d0b.151023930@news.oz.net>

On 4 Feb 1998 22:23:59 GMT, abigail@fnx.com (Abigail) wrote:

>map {$_ -> [1]}
>     grep {$_ -> [0] =~ /\Q$query/}
>     map {[map {reverse} reverse split /\t/, reverse, 2]} <FILE>;
                 ^
                 list context

map {[map {scalar reverse} reverse split /\t/, reverse, 2]} <FILE>;
or even...
map {[/(.*)\t(.*)/s]} <FILE>;


--
Kuma


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

Date: Thu, 05 Feb 1998 23:10:37 GMT
From: phil@freed.com (Philip Freed)
Subject: Re: Question: Searching files.
Message-Id: <34da45f8.41578142@newsfeed1.cybertours.com>

I just learned a few tricks tracing this one.  A slight correction,
though:

>++ I can handle the forms and opening and closing the data file, but the
>++ search loops are proving a problem. Can anyone help?
>
>map {$_ -> [1]}
>     grep {$_ -> [0] =~ /\Q$query/}
>     map {[map {reverse} reverse split /\t/, reverse, 2]} <FILE>;

The last line should be
  map {[map {scalar reverse} reverse split /\t/, reverse, 2]} <FILE>;

Otherwise, the reverse (in array context) simply takes the one-element
array and returns it.

For the uninitiated, I'd also add an assignement statement - so that
folks have an easier time figuring out what they've got:

@urlList =  map {$_ -> [1]}
  grep {$_ -> [0] =~ /\Q$query/}
  map {[map {scalar reverse} reverse split /\t/, reverse, 2]} <FILE>;


--phil   <phil@freed.com>


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

Date: Thu, 05 Feb 1998 22:56:18 GMT
From: cowboy@cnnw.net
Subject: Random Image Generator
Message-Id: <34da437f.139850795@news.cnnw.net>

Hello All,

I'm wondering if someone out there can help me with a question...I'm
new to perl/cgi and I have been playing with some small scripts....I
have one that displays different images when someone opens my page or
reloads.....what I want to know is how do I write the script for when
a certain image is displayed on my page that it has a hyperlink within
it....in my html it's written to point to the perl script < img src =
"http://www.myname.com/cgi-bin/ranimage.pl" >this code opens the
random image onto the page, what I'm trying to do is when this script
is called that the image will have the link embedded into it also...
 ...I hope I'm making sense and explaining this well enough to
understand...if anyone out there can help me it would be greatly
appreciated.

James L. Taylor


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

Date: 6 Feb 1998 11:42:31 +1100
From: bod@compusol.com.au (Brendan O'Dea)
Subject: Re: solution for multiline comments???
Message-Id: <6bdm9n$ojv$1@duende.compusol.com.au>

In article <6bcm6q$fjv@news.service.uci.edu>,
Earl Hood <ehood@medusa.acs.uci.edu> wrote:
>In article <34df80a4.6150391@news.tornado.be>,
>Bart Lateur <bart.mediamind@tornado.be> wrote:
>>mgjv@comdyn.com.au (Martien Verbruggen) wrote:
>>
>>>BTW. Would you ask on comp.lang.c if it maybe was possible to have
>>>shell style comments in c source?
>>
>>Weeellllll....  "//" style comments are a pretty common feature.

And an ugly one too IMHO.  Perl already has a perfectly satisfactory
comment-to-eol marker (#), why add another which, as pointed out in
another post, causes problems with things like:

    m//;
    s//repl/;

# As far as block comments go, not only does the pod mechanism work, but
# so does adding a `#' to the start of each line as shell and Perl
# programmers have been doing for years.

// As an aside, I have seen a great deal of C++ code which eschews the
// perfectly good block comment syntax of `/* ... */' inherited from C
// in favour of a similar style to that described above anyway.

>C++.  gcc lets you get away with it with C code because gcc is a C++/C
>compiler in one.  However, ANSI C and K&R C do not official support the
>"//" style, unless changes to the language have been done that I am not
>aware of.

I believe that the C9X standard will be including `//' as a comment
delimiter.

Regards,
-- 
Brendan O'Dea                                        bod@compusol.com.au
Compusol Pty. Limited                  (NSW, Australia)  +61 2 9809 0133


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

Date: Thu, 05 Feb 1998 23:32:54 GMT
From: aoliva@uspe.com (Alex Oliva)
Subject: SSI Perl help
Message-Id: <34db4be7.177386575@news.supernews.com>

OK... I am at wits end! :)
 
I am creating an .shtml file via a perl based cgi script. 
The directory the file is being written to has permissions of 777.
Since I have a server side include, I use a `chmod 755` inside my
perl script to change the permission of the subdir the .shtml file is
being accessed from. The problem is I STILL get the

"404 - document not found or INSECURE" error message.
 
It's obvious that even though I changed my permission to 755, it still
won't let me run the SSI file (it runs NON SSI html files fine).
 
Is there something I'm missing here? Also, I can't seem to DELETE the
subdir via FTP if I have set the permissions from within the perl
script.

I am using Apache on a Unix system. The SSI I'm embedding in the
dynamic .shtml file is your standard HTTP_REFERER command.
 
Your help would be GREATLY appreciated... thanks!!
 
Please cc: response to me at aoliva@uspe.com


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

Date: 5 Feb 1998 21:51:33 GMT
From: "Shawn McMahon" <smcmahon.nospam@pplsi.com>
Subject: Syntax-coloring editor for NT
Message-Id: <01bd3280$505c7080$152010ac@pplis015>

Anybody know of a 32-bit NT editor that will do syntax-coloring for Perl?

I know I can program Winedit or AY Pad to do it, but I'd kind of like to
find something already done.  Maybe a config for either of those programs,
or an entirely different program.

I don't care whether it lets me fire up perl.exe or not, just so long as it
colors the keywords.

(Be aware of the anti-spam addition in my email address if you want to
respond via email.)

-- 

Shawn McMahon
Network Systems Administrator
Pre-Paid Legal Services, Inc.


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

Date: 5 Feb 1998 17:35:56 -0600
From: jesten@earth.execpc.com (Jim Esten)
Subject: Re: Syntax-coloring editor for NT
Message-Id: <6bdict$rbr@newsops.execpc.com>

Shawn McMahon (smcmahon.nospam@pplsi.com) wrote:
: Anybody know of a 32-bit NT editor that will do syntax-coloring for Perl?

: I know I can program Winedit or AY Pad to do it, but I'd kind of like to
: find something already done.  Maybe a config for either of those programs,
: or an entirely different program.

: I don't care whether it lets me fire up perl.exe or not, just so long as it
: colors the keywords.

: (Be aware of the anti-spam addition in my email address if you want to
: respond via email.)

: -- 

: Shawn McMahon
: Network Systems Administrator
: Pre-Paid Legal Services, Inc.


I especially like UltraEdit (www.idmcomp.com or www.ultraedit.com). Has
dictionaries for a bunch of language - including Perl..

Jim


-- 
Jim Esten
WebDynamic
jesten@wdynamic.com  http://wdynamic.com


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

Date: Thu, 5 Feb 1998 20:17:01 -0500
From: "Dick Latshaw" <latshaw@ibm.net>
Subject: Re: Syntax-coloring editor for NT
Message-Id: <34da6492.0@news1.ibm.net>


Shawn McMahon wrote in message <01bd3280$505c7080$152010ac@pplis015>...
>Anybody know of a 32-bit NT editor that will do syntax-coloring for Perl?
>
You might like Lemmy - Win32 GUI editor, with syntax highlighting for a
number of languages, including Perl.  Assuming, of course, that you like vi.
Try www.softwareonline.org.

Regards,
Dick




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

Date: Thu, 05 Feb 1998 08:38:56 +0300
From: Mike <blazer@mail.nevalink.ru>
Subject: test... sorry
Message-Id: <34D95070.4BD4@mail.nevalink.ru>

test
-- 

*******************************************
Mike Blazer
c o n t i n e n t a l   g r o u p   i n c .
blazer@mail.nevalink.ru
*******************************************


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

Date: 5 Feb 1998 21:52:25 GMT
From: markjr@mail.PrivateWorld.com (Stunt Pope)
To: "Jerry Davis" <gedavis3@vt.edu>
Subject: Re: Using flock?
Message-Id: <6bdcap$a15$1@newsbell.bellglobal.com>

[Posted and mailed]

------------------------Begin ROT26 Encoded Text

In article <6bcm82$1tb$1@solaris.cc.vt.edu>,
	"Jerry Davis" <gedavis3@vt.edu> writes:
> Question 1)
> Does flock work on NT systems or is it a unix command?

I don't know about NT, most unixes either have it or support it via
some other locking mechanism.

> 
> Question 2)
> As I understand it the syntax for using flock is:
> open(FILE, ">file.txt");
> flock(FILE, 2);
> ##make changes##
> flock(FILE,8);
> close(FILE);

release the lock after you close the file, not before.

> 
> Do you need to check is the file is locked or is that something flock
> handles automaticly?
> If a file is flocked (i.e I run the above script, and while the file is
> flocked, I run another copy
> of the script) and a perl script tries to open a file what happens?  Does it
> wait, until the lock is
> released?

flock is an advisory lock. So if you run your script using flock, and
a second copy runs -also using flock, it will wait for the lock to
clear before opening the file (assuming $LOCK_EX was used).

If some other process that doesn't use flock accesses the file, it will
be able to do so, regardless of any locks set (if it has the perms).

"man flock" should give you more info.

-regards, markjr

------------------------End ROT26 Encoded Text
--

Mark Jeftovic		aka: mark jeff or vic, stunt pope. 
markjr@shmOOze.net	http://www.shmOOze.net/~markjr	
PWC's BOFH		http://www.PrivateWorld.com
irc: L-bOMb		Keep `em Guessing


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

Date: Fri, 06 Feb 1998 00:45:08 GMT
From: tinusz@zinc.demon.nl (gravity)
Subject: where do subscribe to the perl-msql mailinglist? uhm, is there one?
Message-Id: <34dc5cf0.10606697@news.demon.nl>

so?



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

Date: Thu, 05 Feb 1998 16:02:27 -0600
From: Derek Balling <dballing@speedchoice.com>
Subject: Re: Wierd Directory Problem
Message-Id: <57D48647D9BB9124.2B18BC073BCAE5F5.526F93ECF3B1641E@library-proxy.airnews.net>

Guy K. McArthur wrote:
> 
> For some reason, any Perl package I install insists in going into
> /var/tmp/site_perl/usr/lib/perl5 instead of /usr/lib/perl5.
> 
> It's not a big problem, I made one a symlink to the other to get around it, but it is kind of strange and I'd like to fix it.
> 
> I have perl 5.004-01 which is the latest package available for my platform, RedHat SparcLinux 4.2 (with the 2.0.26 kernel).

Is this to imply that 5.004_04 won't compile on Sparcs or that nobody
has packaged up a pretty 5.004_04 RPM for you to install the binaries
and such of?

Derek
(Running the 5.004_04 on Red Hat 4.2/Intel, but without having waited
for someone to RPM it up)


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

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 1819
**************************************

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