[8264] in Perl-Users-Digest
Perl-Users Digest, Issue: 1880 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 12 19:07:57 1998
Date: Thu, 12 Feb 98 16:00:27 -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: 1880
Today's topics:
Re: (deep breath first...) Understanding "pack" <franzen@pmel.noaa.gov>
Re: (deep breath first...) Understanding "pack" <doug@tc.net>
Re: ? Regular Expressions ? <gbarr@ti.com>
Re: ? Regular Expressions ? (Martien Verbruggen)
Re: ? Regular Expressions ? (Jonathan Stowe)
[Q] Next loop from an error handler? (Maestro)
Re: Can anyone recommend a good perl ODBC book? <mtolives@trendline.co.il>
Re: Credit Card Check (Martien Verbruggen)
Re: FAQless Forays (was: Code Example Needed) <palincss@nicom.com>
Re: FAQless Forays (was: Code Example Needed) <rra@stanford.edu>
Re: Fork/Threads <zenin@best.com>
Re: FTP as filehandle <gbarr@ti.com>
getting perl script work on AS/400 <polobruce@earthlink.net>
Re: getting strings (Jonathan Stowe)
Re: Good Perl editors <rpsavage@ozemail.com.au>
Re: How do I export environment variables? (Jonathan Stowe)
How do I tell if a process is running in WIN32 perl??? (Steve Bourgeois)
Re: How the Hell do I...? dkoch@amcity.com
Re: Killfile Triage <noel@integrityonline.com>
Moderated ng [Was: Re: So what about last summer's RFD? (Malcolm Hoar)
Re: More regular expressions <pdcawley@bofh.org.uk>
MS Visual Perl (A Satire!) (Stuart Bullock)
Re: New Perl Debugger for Win32 !! (Martien Verbruggen)
Re: on reading FAQs and gurus answering questions <nyoung@silcom.com>
Re: on reading FAQs and gurus answering questions (Nathan V. Patwardhan)
Re: on reading FAQs and gurus answering questions <shimpei+this+address+is+NOT+munged+.mil+.gov@socrates.caltech.edu>
Re: Pattern matching using * wildcard how? (Steve)
Re: PERL in Windows 3.11 (Jonathan Stowe)
Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 12 Feb 1998 15:17:09 -0800
From: Nathan Franzen <franzen@pmel.noaa.gov>
To: Douglas McNaught <doug@tc.net>
Subject: Re: (deep breath first...) Understanding "pack"
Message-Id: <Pine.SOL.3.96.980212144224.21911D-100000@corona.pmel.noaa.gov>
Douglas McNaught wrote, regarding documentation on binary storage:
> I don't know if there's any such primer. I got a lot of what I know
> by reading Usenet, and a lot more by solving real-world problems. A
> bit of assembly-language hacking in my younger days didn't hurt,
> either.
I think the primer that you just wrote will be good enough for my
purposes. Thank you very much! I am printing out your message - after
careful study I'll tuck it away into blue camel for the future.
Perl is indeed very easy to use for quick trial and error tests. I
wouldn't say its very pretty, but I've now got a working template for the
status line:
($mode, $bytes, $type,
$year, $month, $day, $hour, $minute, $second,
$version, $serial, $nrec, $nbytes)
= unpack "H4nnH4H2H2H2H2H2xnA5NN",$x;
One remaining question is that there are some 1-byte integers stored in
that $x variable. I see two ways to get them out. First, with
$temp = unpack( "n" $x0 ) # $temp = 527
$one = int($temp/256); # $one = 2
$two = $temp % 256; # $two = 15
or second, with
($onex, $twox) = unpack ("H2", $x0);
$one = hex($onex);
$two = hex($twox);
Is there a one-step way? Am I overlooking something obvious?
Such help! Thanks again,
-Nathan
------------------------------
Date: 12 Feb 1998 18:28:55 -0500
From: Douglas McNaught <doug@tc.net>
Subject: Re: (deep breath first...) Understanding "pack"
Message-Id: <m2hg64bdxk.fsf@ono.tc.net>
Nathan Franzen <franzen@pmel.noaa.gov> writes:
> I think the primer that you just wrote will be good enough for my
> purposes. Thank you very much! I am printing out your message - after
> careful study I'll tuck it away into blue camel for the future.
That's high praise--thanks!
> One remaining question is that there are some 1-byte integers stored in
> that $x variable. I see two ways to get them out. First, with
>
> $temp = unpack( "n" $x0 ) # $temp = 527
> $one = int($temp/256); # $one = 2
> $two = $temp % 256; # $two = 15
>
> or second, with
> ($onex, $twox) = unpack ("H2", $x0);
> $one = hex($onex);
> $two = hex($twox);
>
> Is there a one-step way? Am I overlooking something obvious?
How about the 'c' and 'C' specifiers? On my machine:
ono:~ [1008] $ perl -e 'print unpack("C", "\07"), "\n"'
7
ono:~ [1009] $ perl -e 'print unpack("C", "\300"), "\n"'
192
ono:~ [1010] $ perl -e 'print unpack("c", "\300"), "\n"'
-64
[You might not have considered them because the manual refers to them
in the context of "(un)?signed char values". In C, a char is just a
small (one-byte) integer, and the literal char expression
'a'
is the ASCII value of lowercase "A".]
-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: Thu, 12 Feb 1998 12:32:01 -0600
From: Graham Barr <gbarr@ti.com>
Subject: Re: ? Regular Expressions ?
Message-Id: <34E34021.DB9ADACA@ti.com>
John Moreno wrote:
> Tom, maybe what should be done is to add in a bit of self-moderation -
> create a X header that says you've read the perl faq (or maybe even more
> generally X-FAQs-Read: perl, cgi, etc,) and then you can killfile or
> autorespond to anybody that post without it.
And so everyone who uses a reader which does not allow you to
add your own headers is doomed to not get a responce because
they will be killfiled.
I think that is not very fair is it.
--
Originality is the ability to conceal your source.
------------------------------
Date: 12 Feb 1998 21:57:08 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: ? Regular Expressions ?
Message-Id: <6bvr7k$ac5$1@comdyn.comdyn.com.au>
In article <1d4c5o9.1tnppmthaqejN@roxboro0-019.dyn.interpath.net>,
phenix@interpath.com (John Moreno) writes:
> Tom, maybe what should be done is to add in a bit of self-moderation -
> create a X header that says you've read the perl faq (or maybe even more
> generally X-FAQs-Read: perl, cgi, etc,) and then you can killfile or
> autorespond to anybody that post without it.
The people who should see those headers probably won't even realise
there is such a thing as a header to a post. They probably use some
program that by default doesn't display X- headers anyway, and
probably wouldn't know how to view them.
Oh well.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | A Freudian slip is when you say one
Commercial Dynamics Pty. Ltd. | thing but mean your mother.
NSW, Australia |
------------------------------
Date: 12 Feb 1998 23:39:27 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: ? Regular Expressions ?
Message-Id: <6c017f$4t$1@mendelevium.btinternet.com>
In article <6bvr7k$ac5$1@comdyn.comdyn.com.au>, mgjv@comdyn.com.au says...
>
> ... <snip> They probably use some
>program that by default doesn't display X- headers anyway, and
>probably wouldn't know how to view them.
>
And conversely programs that do not allow the creation of X- headers.
This one for instance shows the whole post, headers and all but has no
mechanism wherein I can manipulate them. Perhaps it really is time I trash
the Windows and go back to linux ...
/J\
------------------------------
Date: 12 Feb 1998 22:14:26 GMT
From: thalerj@wwa.com (Maestro)
Subject: [Q] Next loop from an error handler?
Message-Id: <6bvs82$9oo$1@hirame.wwa.com>
I am attempting to do what I consider some advanced Perl programming. I
have a perl program that loops through a set of test cases. These tests
utilize a 3rd party C library (HP's SICL library, but that's not important).
This library provides a way to define a C error handler, which I want to
call a Perl error handler. On an error, I want to instantly fail the test
case and move on to the next.
So, I wrote a tiny C library consisting of an error handler that calls my
Perl function. That works (amazingly), but now I'm running into trouble
trying to figure out how to abort the current test and go to the next
one in the loop. I tried using a label TEST: in the loop and having my
Perl error handler do a "next TEST", but that does not return back to
the C error handler, and it may be the next function call that I get a
Perl Panic(tm) "panic: corrupt saved stack index."
I am wondering what the best way to handle this situation is. I have
considered using a User Defined signal to do the next TEST after I
return from the C handler, but that seems kind of hokey.
I am trying to avoid explicit checking for errors after every possible
error-producing call to the C library.
I'm using perl version 5.004_01 on a HP745 running HP-UX 9.05.
Any suggestions would be appreciated.
-Jay Thaler
------------------------------
Date: Thu, 12 Feb 1998 20:51:28 +0200
From: "Ibrahim Dawud" <mtolives@trendline.co.il>
Subject: Re: Can anyone recommend a good perl ODBC book?
Message-Id: <6c12qq$hkl2@Gallery.trendline.co.il>
For win32, follow the ftp link below:
ftp://ftp.rge.com/pub/languages/perl/authors/Dave_Roth
I hope that helps
Ibrahim Dawud
--
Mount of Olives Hotel - Jerusalem
http://www.mtolives.com
info@mtolives.com
Nathan Stitt wrote in message <34DFD351.23638F27@wavecomputers.net>...
>I'm looking for either a good perl ODBC book or some links on the web.
>I really need something that would describe how to do efficient (read
>FAST) ODBC queries with the ActiveState distribution of perl version 5
>and the Dave Roth ODBC module.
>
>Thanks in advance,
>Nathan Stitt
>nate@wavecomputers.net
>
------------------------------
Date: 12 Feb 1998 22:15:46 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: Credit Card Check
Message-Id: <6bvsai$ac5$2@comdyn.comdyn.com.au>
In article <6bvcfn$a71$1@hermes.is.co.za>,
"Whatsup@now" <Whatsup@icon.co.za> writes:
> Suggest you go shopping in alt.binaries.cracks I doubt anyone but a hacker
> could help you here.
It's not 'hacker'. A hacker is something else. Why do you think it's
called alt.binaries.CRack? :)
This confusion, which nowadays pops up everywhere in the media, is
really bad. Please try to use the word hacker only in its right
meaning.
Thanks,
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | In a world without fences, who needs
Commercial Dynamics Pty. Ltd. | Gates?
NSW, Australia |
------------------------------
Date: Thu, 12 Feb 1998 17:18:11 -0800
From: Steve Palincsar <palincss@nicom.com>
To: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <34E39F53.4217@nicom.com>
Tom Christiansen wrote:
>
> :FreeBSD, and has about 10 users. PC user != idiot.
>
> When the majority of Wintel users make RTFM questions, and the majority
> of RTFM questions come from Wintel users, it's time to educate them of
> the spectactular fact that they the answer within their very own computer.
The analysis you posted does not support this assertion.
You analyzed only postings that started threads, not postings that
answered questions. For all you know, the data might very well have
shown
that every helpful answer except yours was posted from a Wintel machine
using Netscape or M$IE. (Not that I believe that, of course, but you
haven't ruled it out.)
Please do not take offense: I fully sympathize with your impatience
with RTFM questions, but I really blanket assertions implying PC users
are all idiots grating.
------------------------------
Date: 12 Feb 1998 15:34:58 -0800
From: Russ Allbery <rra@stanford.edu>
Subject: Re: FAQless Forays (was: Code Example Needed)
Message-Id: <m3hg64e6sd.fsf@windlord.Stanford.EDU>
Bart Lateur <bart.mediamind@tornado.be> writes:
> Actually I was thinking of the "White hats and black" (about Netscape's
> release of the source code) and the Y2K problem articles. Both a very
> good read, but not specifically Perl related.
Good point. Although I'd say the Y2K post was on-topic for this group
given the number of questions we're getting on perl5-porters and here
about whether or not Perl is Y2K-compliant.
--
#!/usr/bin/perl -- Russ Allbery, Just Another Perl Hacker
$^=q;@!>~|{>krw>yn{u<$$<[~||<Juukn{=,<S~|}<Jwx}qn{<Yn{u<Qjltn{ > 0gFzD gD,
00Fz, 0,,( 0hF 0g)F/=, 0> "L$/GEIFewe{,$/ 0C$~> "@=,m,|,(e 0.), 01,pnn,y{
rw} >;,$0=q,$,,($_=$^)=~y,$/ C-~><@=\n\r,-~$:-u/ #y,d,s,(\$.),$1,gee,print
------------------------------
Date: 12 Feb 1998 22:30:34 GMT
From: Zenin <zenin@best.com>
Subject: Re: Fork/Threads
Message-Id: <887322898.419981@thrush.omix.com>
Morgan Sackett - SHN <msackett@shn.net> wrote:
>snip<
Umm, you neither test the fork(), nore store it's return value.
You might want to do this more like:
my $pid = fork();
defined ($pid) or die "fork: $!";
if ($pid) {
## Parent here, $pid == the child's pid
} else {
## Child here. Parent pid can be gotten from getppid().
exit(); ## Don't forget this
}
: if ($ppid == $$ ) { # check if my pid is the same as the
: shell
Huh? Shell? Or perl...? BTW, where (and when) did you pick
up the $ppid veriable? You never set it until later?
>snip<
: if (fork) { # test to see if we have forked.
: $ppid = getppid; # pid of parent
: print "This is the child process\n" ;
: print "My PID is $$\n" ;
: print "My Parent's PID is $ppid\n" ;
: exit 0 ;
: }
Read "perldoc -f fork"
Fork() can return one of three states. Undefined when there is
an error (check $! in this case), 0 when it works and you're the
child, or a pid number when it works and you're in the perent.
If your "if (fork) {" statement is true, you're in the parent so
you're $ppid from getppid will be the shell you ran this program
from.
: when I run this I get two answers back. One from the parent process,
: and one from the child. Just as one would expect.
Kind of, but I'm pretty sure that the messages where not comming
from the processes you thought they were.
: I wanted to find a way so that the parent perl process
: is is the "true" parent, and not my shell,
It is, but I don't think you understand exactly what is forking.
You're not forking off the shell, you're forking from perl.
Shell->fork()/exec()->
Perl Perent->fork()->
Perl Child
: and fork the process so that
: only the child gives output.
Fork the child, then close all your standard file discripters in
the perent (STDOUT, STDERR, STDIN).
: Very important as I would like to use this
: in a CGI script that queries a database. I want to use the parent
: process to send a holding page to keep the user entertained until the
: child process has finished retrieving the data and can send it on it's
: way.
Umm, didn't you just say you only wanted the child to give output,
but now you're saying the perent is to send output too...?
: I read M.J.T. Guy's post about using select() to communicate between the parent
: and the child. But there was no clear example on how to do this....
I don't think you need select() for this. Just waitpid() the child
(provided the child actually exits).
--
-Zenin
zenin@best.com
------------------------------
Date: Thu, 12 Feb 1998 16:27:42 -0600
From: Graham Barr <gbarr@ti.com>
Subject: Re: FTP as filehandle
Message-Id: <34E3775D.6567316D@ti.com>
Reilly Shea wrote:
>
> I've been pulling my hair out on this one,
And so you should be :-)
> reading pg 191-194 of the Camel
> book over and over, and still no luck. The answer is probably simple but....
>
> I open an ftp process as a filehandle doing the following..
> open(FTP,|ftp somemachine");
so you open a handle to the child process
> I've got a .netrc file in my home directory that has the correct info & format
> and everything works just fine.
> What I want to know is how can I tell if the open fails (i.e. from an
> incorrect login, etc.)
To do that you need to be able to read the output of your child
process. This *cannot* be done with just a simple open command
> Can someone help?
Look on CPAN for the libnet distribution, it contains Net::FTP
which will probably do everything you want
Graham.
--
Originality is the ability to conceal your source.
------------------------------
Date: Thu, 12 Feb 1998 17:10:57 -0500
From: Bruce Stenberg <polobruce@earthlink.net>
Subject: getting perl script work on AS/400
Message-Id: <34E37371.A9C7974A@earthlink.net>
Please Help!
I have written a cgi script in Perl, for a client that has an as/400.
Their tech installed the perl 5.03 into the IFS. I am know trying to
execute it, and the http as/400 server wants be to download the program
instead of executing it. I read that I needed to write a small cl
program to execute the perl script, but not not write in cl... Nor do I
know what to do next. Can you help me?
Thanks,
Bruce Stenberg
------------------------------
Date: 12 Feb 1998 22:46:21 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: getting strings
Message-Id: <6bvu3t$gvr$1@uranium.btinternet.com>
In article <19980212184108.AAA11298@rick.internetx.net>, rick@internetx.net
says...
>
>I am trying to get info from a text file . . . the format is as
>follows
>
example data file ommitted.
>the script is as follows:
>
>$query_string = "$ENV{'QUERY_STRING'}";
>
># Open logs and get the info you need
>open(SESSIONIX, "/etc/local/logscripts/userdata/sessionlog.ix");
>while(<SESSIONIX>) {
> ($userid, $therest) = split(//,$Line,2);
> if($query_string eq $userid) {
> print $_;
> print "\<br\>"
> }
> }
>next;
>close(SESSIONIX);
>
>the script always returns no data . . . can anyone help me with this?
>
get the CGI module from CPAN install it, read the documentation and then
use it. Your query string does not just contain your string but you knew
that didnt you?
/J\
------------------------------
Date: Fri, 13 Feb 1998 09:47:55 +1000
From: Ron Savage <rpsavage@ozemail.com.au>
Subject: Re: Good Perl editors
Message-Id: <34E38A2B.2DE5@ozemail.com.au>
[snip]
Try this free software...
Programmer's File Editor 0.07.001
[snip]
Alan Phillips ( A.Phillips@lancaster.ac.uk )
( http://www.lancs.ac.uk/people/cpaap/pfe )
1. ABSTRACT
-----------
This is the 0.07.001 release of Programmer's File Editor, a large-capacity
multi-file programming oriented editor for Windows 95, Windows NT 3.51 and
4.0 on Intel and PowerPC platforms, and Windows 3.1x
PFE includes the following features:
- The size of file it can handle is limited only by the total amount of
virtual memory available
- No arbitrary limit on the number of lines a file can contain
- It can edit multiple files, the number being limited only by the
available system resources
- Allows multiple edit windows showing the same file
- Multi-level undo facility
- Can read and write files in UNIX format using LF as line terminator, with
automatic format detection
- Line numbers can be shown in any edit window if required
- Text can be copied and moved by dragging and dropping
- Right-click mouse menus give access to commonly required functions
- DOS commands such as compilers, can be run with the output captured
in an edit window
- Commonly-used text can be inserted in a simple operation from template
libraries
- Fully-remappable keyboard, including two-key operation similar to MicroEMACS
and mapping of Alt keys to functions
- Keystrokes and menu commands can be recorded in replayable keyboard macros
which can be collected into libraries
- Files can be printed either in total, by line range, or selected text only
- Automatic line indenting and removal of trailing spaces
- Automatic configuration of edit options depending on file type
- Automatic configuration of tab sizes depending on file type
- Automatic brace alignment when editing C source
- Text indent/undent operations
- Optional automatic text wrapping at configurable margin
Additionally, the editor can be controlled by another application across a
DDE client-server link.
--
Cheers,
Ron Savage
Office: savage.ron.rs@bhp.com.au
Home (preferred): rpsavage@ozemail.com.au
------------------------------
Date: 12 Feb 1998 23:21:26 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: How do I export environment variables?
Message-Id: <6c005m$t0m$1@mendelevium.btinternet.com>
In article <887312290.611033@thrush.omix.com>, zenin@best.com says...
>
> I'm surprised Tom, how could it miss the "X-Mailer: Mozilla 4.01
[en] (WinNT;
> U)" header line? Personally,
<etc>
Now, I have a theory about this (admiitedly crap) newsreader I'm using....
/J\
------------------------------
Date: 12 Feb 1998 22:42:59 GMT
From: sbourgeo@ici.net (Steve Bourgeois)
Subject: How do I tell if a process is running in WIN32 perl???
Message-Id: <6bvttj$m27$1@bashir.ici.net>
Hi,
I'm trying to get a perl-based utility working that needs to run on UNIX and
Windows NT. On UNIX, I could use the "ps" command or kill a process with
the null signal "kill -0" to see if it's running.
Is there a clever way to do this in NT??? I tried the "kill -0" approach,
but NT's lack of POSIX compliance seems to make the null signal
unavailable.
Any info would be appreciated
steve
------------------------------
Date: Thu, 12 Feb 1998 17:36:51 -0600
From: dkoch@amcity.com
Subject: Re: How the Hell do I...?
Message-Id: <6c012j$d5g$1@nnrp2.dejanews.com>
In article <34e46c2d.44072901@news.virgin.net>,
dave.power@adpdesign.com (Dave Power) wrote:
> Maybe I've not had enough time to do a proper read thro' but pls tell
> me how - in simple terms - do I delete a file? I don't want a full
> course in the language - just one answer to one question.
>
> DP
>
The perl function to delete a file is 'unlink'. Use 'perldoc -f unlink' to
read more.
Dan Koch <dkoch@amcity.com>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
------------------------------
Date: Thu, 12 Feb 1998 14:53:57 +0000
From: Mike Noel <noel@integrityonline.com>
Subject: Re: Killfile Triage
Message-Id: <34E30D05.BECB7CA8@integrityonline.com>
Of course, the problem with posting killfiles is that people who want you to
read their post but still don't have anything good to say now know how to
avoid your killfile. That is, the posting could have been titled, "What not
to put in your message if you want the smart people to read it".
:-)
_M_
noel@integrityonline.com
------------------------------
Date: Thu, 12 Feb 1998 23:22:03 GMT
From: malch@malch.com (Malcolm Hoar)
Subject: Moderated ng [Was: Re: So what about last summer's RFD? Let's go moderated.]
Message-Id: <6c006s$8nj$1@nntp1.ba.best.com>
In article <fl_aggie-1202981709470001@aggie.coaps.fsu.edu>, fl_aggie@thepentagon.com (I R A Aggie) wrote:
>Ummm...create "comp.lang.perl.wizards", make it moderated and all posts,
>including xposts, go into /dev/null.
Ummmm, "comp.lang.perl.moderated" sounds better to me.
It's a more accurate description and doesn't smack of elitism!!!
OK, maybe we need a "comp.lang.perl.elite" group too ..... yuk!
--
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| Malcolm Hoar "The more I practice, the luckier I get". |
| malch@malch.com Gary Player. |
| http://www.malch.com/ Shpx gur PQN. |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------
Date: 09 Feb 1998 15:24:40 +0000
From: Piers Cawley <pdcawley@bofh.org.uk>
Subject: Re: More regular expressions
Message-Id: <m34t28pzrb.fsf@tower.bofh.org.uk>
9 Feb 1998 07:21:26 GMT cberry@cinenet.net (Craig Berry) comp.lang.perl.misc
> Kevin Scott (scottj@mthcsc.wfu.edu) wrote:
> : Doesn't
> :
> : $word =~ s/(:=|=)/ $1 /g;
> :
> : do what you want?
>
> Or even mor directly,
>
> $word =~ s/(:?=)/ $1 /g;
Can I suggest:
$word =~ s/\s*(:?=)\s*/ $1 /g
at this point?
--
Piers Cawley
If a `religion' is defined to be a system of ideas that contains
unprovable statements, then Godel taught us that mathematics is not
only a religion, it is the only religion that can prove itself to be
one. -- John Barrow
------------------------------
Date: Thu, 12 Feb 1998 23:23:13 GMT
From: stuart_bullock@bigfoot.com (Stuart Bullock)
Subject: MS Visual Perl (A Satire!)
Message-Id: <34e3836f.1032564@news.demon.co.uk>
Microstuff Announce MS Visual Perl 2.0 - A Satire
=================================================
As part of Microstuff's effort to control the server environment
Robert Nob, VP of MS Scripting Languages, announced MS Visual Perl
2.0.
Pundits of the old UNIX Perl world will recall the reaction of
disbelief amongst the Perl community when Bill Greats announced that
Microstuff was releasing MS Perl. The initial release was not without
its problems, as seems typical of new products from the software
giant. The initial criticism was the size of the MS Perl package,
being nearly 300Mb, and that benchmarks proved that it ran nearly
twice as slowly as the UNIX version. There were also a number of bugs
that did not exist in the UNIX version.
However, Microstuff have not been complacent and their benchmarks
indicate that it now runs quicker that the older Perl5 for win32.
"We have improved the IDE and the interpreter." He stated. "We have
also added new extensions to enable it to run more efficiently in the
windows environment.
"It also has COM+ extensions and Active HTML libraries."
The fact that Microstuff has bought heavily into Perl is seen, by
analysts, as part of Bill Great's vision to dominate the internet.
After the failed attempt to remove Java as the web language of choice,
Microstuff have chosen the "alternative" web language of Perl. Its
advantages were clear for Microstuff. Unlike Java, Perl was
controlled by a corporate body and the rights to use and extend the
language were freely available without the distraction of license
agreements.
Robert Nob added. "By next summer we will see MS Visual Perl 3.0 beta
released, which will have Active Channel controls and enhanced
functionality."
When asked why Visual Perl did not run on the SIN's (previously
Nitscape) browser, Rob Nob replied. "I cannot comment for them, but
obviously we would welcome any integration of Visual Perl and
Communicator, pending licensing agreements."
Critics of Microstuff moan for the "freeware" days of Perl. But Rob
Nob brushed off their comments by saying. "We have contributed more
to the development of Perl since MS Visual Perl than was previously
done before. They are just repeating old arguments that are not valid
in the software industry of today."
Observers are now looking at the possibility of MS Linux as part of
Microstuff's continuing internet strategy.
------------------------------
Date: 12 Feb 1998 22:17:39 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: New Perl Debugger for Win32 !!
Message-Id: <6bvse3$ac5$3@comdyn.comdyn.com.au>
In article <34E30C30.1121@hotmail.com_no_spam>,
jim <jim@hotmail.com_no_spam> writes:
> "The Logos Perl Debugger is a 32-bit Windows
> application and an OLE Automation server..."
Any debugger on windows should start with printing lots and lots of
warnings on your screen that you're not using an OS.
:)
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | Inside every anarchy lurks an old boy
Commercial Dynamics Pty. Ltd. | network - Mitchell Kapor
NSW, Australia |
------------------------------
Date: Thu, 12 Feb 1998 13:59:01 -0800
From: Nathan Young <nyoung@silcom.com>
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <34E370A5.7E0DC901@silcom.com>
There are two complexities I'd like to add here.
Part one:
The community has grown incredibly quickly. So many are new to the
subject that the experienced voices DO get drowned out. But I think
that Randal's comments sound a little like "I wish it was still small"
(not that I find fault with that, I wish L.A. was still only 100 miles
across).
Hopefully all the beginning users who are posting now will still be
posting in 3 years, answering instead of asking. The volume in these
groups is going to continue to grow.
******** As the volume grows, concise, descriptive subjects become even
more important **********
Part two:
If you read all the documentation, think about things carefully, and
play around a bunch, you should be able to answer any question
yourself. Practicality aside, if everyone did that there would be no
newsgroup. We grew to love newsgroups because they provided us with a
helpful community. I can't count the number of times I've consoled
myself in a search I felt hopeless about by thinking "If nothing else
works, I'll post to the newsgroup." Usually I work out my own problems,
but having a resource like this group is helpful psychologically as well
as technically.
*********Work on your own problems, help other people out, and maybe
we'll still be rolling next year.**********
Maybe we need to break the groups down into more sub-sections?
Thank you to all the gurus and wizards (and little people who just
happenned to know) who've answered my questions, both in real life and
on the net.
Randal Schwartz wrote:
>
> I used to answer about 5 to 30 messages a day in clpm. If you've
> noticed, I don't any more.
>
> I pull up the daily postings, see 200 messages, and it's all I can do
> just to quickly scan through them before I have to run off to do the
> day's activities.
>
> It's my impression that this group is populated with:
>
> 20% FAQs
> 20% answers to above telling them to read the FAQ/manual/etc
> 20% stuff that should have been asked in ciwa.cgi or ciwa.html
> 20% answers to above telling them to go to ciwac or ciwah
> 10% *interesting stuff* -- well formed questions that aren't FAQs
>
> I'm sorry. I don't get enough time to clearly locate that last 10%.
>
> Now, if the people that *do* bother to read the available
> documentation, and *do* bother to post to the right group don't mind
> being *drowned out* by the other 90% of the postings, more power to
> you, but I won't see your question, and you won't get my answer.
>
> And for me, that's sad. Tom gets angry. I just get sad.
>
><snip>
>
> 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@teleport.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: 12 Feb 1998 22:32:32 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <6bvta0$9g1@fridge.shore.net>
Nathan Young (nyoung@silcom.com) wrote:
: The community has grown incredibly quickly. So many are new to the
: subject that the experienced voices DO get drowned out. But I think
There's no community that people have joined. There's a handful of
folks left around from the old, old days, a pocket of some fine,
helpful folks, and lots of others who perpetuate chaos and
ill-feelings. Not to mention the countless old-timers who've left and
ignore Usenet completely.
Again, I'll ask you, when's the last time that you've seen Larry
around these parts?
Those of us who want a community migrate to mailing lists or moderated
newsgroups, it seems. These means of communications filter out the
noise and allow our relations to be more reciprocal.
--
Nathan V. Patwardhan
please don't send spam to president@whitehouse.gov
------------------------------
Date: 12 Feb 1998 23:04:30 GMT
From: Shimpei Yamashita <shimpei+this+address+is+NOT+munged+.mil+.gov@socrates.caltech.edu>
Subject: Re: on reading FAQs and gurus answering questions
Message-Id: <6bvv5u$78l@gap.cco.caltech.edu>
Marc Haber <Marc.Haber-usenet@gmx.de> writes:
>
>Randal Schwartz <merlyn@stonehenge.com> wrote:
>>I think for me it means more the passing of an era. When people
>>*used* to understand that Usenet was more than a "help desk". That
>>"give a little, get a little" was the norm, instead of the exception.
>
>"Give a little, get a little" is the formular that makes Usenet work.
>But you gotta see Usenet as a whole, not only clpm. Who doesn't have a
>clue about perl might be a Windows NT, X or hardware wizard and may
>perhaps spend as much time as you do here "answering" FAQs in "his"
>home group.
Well, maybe, but people who do have enough clue in some subject to
answer questions in any newsgroup tend to have enough clue to scan
through the FAQ before posting questions in a newsgroup they are not
familiar with. At least I hope so.
--
Shimpei Yamashita <http://www.patnet.caltech.edu/%7Eshimpei/>
The address I have listed in the headers is a working address. It just
looks like it's an invalid address in order to fool spammers collecting
addresses from newsgroups.
------------------------------
Date: Thu, 12 Feb 1998 20:45:46 GMT
From: nospamtovanhalen@coredcs.com-nospammy (Steve)
Subject: Re: Pattern matching using * wildcard how?
Message-Id: <34e35f6b.330554044@snews2.zippo.com>
Have you tried glob?
Steve
On Mon, 09 Feb 1998 21:09:43 GMT, sjuneau@microtec.net (Sylvain
Juneau) wrote:
>
>
>
>I have this file :
>
>emask A700*P
>imask *P dbim 2 Y food/cis dbadd
>imask *C dbim 2 Y food/cis dbadd
>
>
>I have another file. I open that file and I want to search in it:
>
>A700*P where I want to have * to be a wildcard so that it can have
>any value (abcdef.....12345....)
>
>then I would like same for *P and *C.
>
>My question is how do I search through this file using a wildcard?
>
>I assume you use a pattern matching but how???
>
>
>Thank you very much
>Sylvain
>
>e-mail sjuneau@microtec.net
------------------------------
Date: 12 Feb 1998 22:52:20 GMT
From: Gellyfish@btinternet.com (Jonathan Stowe)
Subject: Re: PERL in Windows 3.11
Message-Id: <6bvuf4$gvr$2@uranium.btinternet.com>
In article <6bvgfu$r0f$1@bignews.shef.ac.uk>, A.Migueis@shef.ac.uk says...
>
>
>I have installed the server winhttpd1.4 in my PC Penthium, and added the
>bigperl version4.
>
etc
Its alright the angry folks on the other side of the atlantic are asleep
right now so if you tiptoe down the hall to
comp.infosystems.www.servers.ms-windows they might not have noticed ...
oh oh I can hear TC starting up Pnews better run ...
/J\
------------------------------
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 1880
**************************************