[10560] in Perl-Users-Digest
Perl-Users Digest, Issue: 4152 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Nov 4 20:07:28 1998
Date: Wed, 4 Nov 98 17:00:20 -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 Wed, 4 Nov 1998 Volume: 8 Number: 4152
Today's topics:
Re: ActivePerl (b 506) & IIS4 cgi keeps browser waiting <firmanf@nospam.usa.net>
ANNOUNCE:ParseYapp-0.16 released !! <desar@club-internet.fr>
Array problems for newbie <tim.hicks@lineone.net>
Re: Change UID during execution <rootbeer@teleport.com>
Re: Check this out... <r28629@email.sps.mot.com>
Re: close() and the file pointer <rootbeer@teleport.com>
Re: converting rfc822 files to MAPI messages ? (Martien Verbruggen)
Re: Decimal to Hex conversion <r28629@email.sps.mot.com>
Easy Way? Or More Efficient Way? ywang@maingate.net
Re: Easy Way? Or More Efficient Way? (Sam Holden)
Re: Easy Way? Or More Efficient Way? (Brand Hilton)
Re: file sorting sar files in AIX <rootbeer@teleport.com>
Re: From Unix to WinNT <r28629@email.sps.mot.com>
Re: HELP: perl script fails on setuid binary <J.D.Gilbey@qmw.ac.uk>
Re: How to run Perl/CGI under NT? <rootbeer@teleport.com>
Re: http requests hangup (Jude Crouch)
Re: Locale warning messages (Brand Hilton)
Re: need help with unbuffering <rootbeer@teleport.com>
Need Perl help on which 'box'. <rwilliamson@uno.gers.com>
Re: Not to start a language war but.. (John Edstrom)
Re: PERL manual - html (Martien Verbruggen)
Re: redirect output (Martien Verbruggen)
Re: Regex Explaination... <rootbeer@teleport.com>
Re: regexp question - re: {n} <rootbeer@teleport.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 04 Nov 1998 19:13:07 -0500
From: firmanf <firmanf@nospam.usa.net>
Subject: Re: ActivePerl (b 506) & IIS4 cgi keeps browser waiting!!
Message-Id: <3640ED93.8E29C3A4@nospam.usa.net>
Please read my post carefully first.
The page's contents have been generated completely,
but the browser's status bar shows that it's still
waiting for some more text (e.g. "80% of 12k"),
even though there is NONE!!
I think this has to do with the way that PerlIS
generates the page. Here's an example of a script:
>print "Content-type: text/html\n\n";
>print "<html>\n<body>\n</body>\n</html>\n";
Under a regular perl, or non PerlIS environment, this
is what I should get:
>Content-type: text/html
>
><html>
><body>
></body>
></html>
This is what I get with PerlIS:
>Content-type: text/html
>
> <html>
> <body>
> </body>
> </html>
Note the extra spaces. I think this might have messed
up the content count that is sent by the server.
Anybody has any other ideas?
Ferry
Tom Phoenix wrote:
>
> On Tue, 3 Nov 1998, firmanf wrote:
>
> > Subject: ActivePerl (b 506) & IIS4 cgi keeps browser waiting!!
>
> When you're having trouble with a CGI program in Perl, you should first
> look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
> such problems. It's available on CPAN.
>
> http://www.perl.com/CPAN/
> http://www.perl.org/CPAN/
> http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
> http://www.perl.org/CPAN/doc/manual/html/pod/
>
> Hope this helps!
>
> --
> Tom Phoenix Perl Training and Hacking Esperanto
> Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Remove "nospam." from the e-mail address
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pursuant to US Code Title 47, Ch 5, Subch 2, _227: Unsolicited
commercial Email received at this address is subject to a US$500
download and archival fee.
By Emailing such, you agree to these terms.
------------------------------
Date: Wed, 04 Nov 1998 22:13:22 +0100
From: Francois Desarmenien <desar@club-internet.fr>
Subject: ANNOUNCE:ParseYapp-0.16 released !!
Message-Id: <3640C371.571E8083@club-internet.fr>
I'm proud to announce that Parse-Yapp-0.16 module has just been
uploaded to CPAN.
It is now on its way and should be available very soon on your
nearest CPAN mirror site.
Major enhancements in this version are:
- Standalone parser modules:
You can now generate standalone parser modules, so you don't need
anymore the
Parse-Yapp module itself to have them run.
- Debugging Driver is now fully thread safe (the runtime driver was
already)
- Runtime Driver is now loaded at compile time, not 'evaled' no more
Here is the README file that comes with it:
Parse::Yapp - Yet Another Perl Parser compiler
Compiles yacc-like LALR grammars to generate Perl OO parser modules.
COPYRIGHT
(c) 1998 Francois Desarmenien, all rights reserved.
(see the Copyright section in Yapp.pm for usage and distribution rights)
IMPORTANT NOTES
THIS IS ALPHA SOFTWARE.
Though it has been tested a lot, there are probably bugs in it ;-)
I need FEEDBACK for every problem or bug you could encounter so I can
fix
them in the next release. Comments are welcome too.
But I also need FEEDBACK if you use it and have it work fine so I can
step
to beta and production releases. Just drop me a mail.
The Parse::Yapp pod section is the main documentation and it assumes
you already have a good knowledge of yacc. If not, I suggest the GNU
Bison manual which is a very good tutorial to LALR parsing and yacc's
grammar syntax.
The documentation is only a draft and should be rewritten (I think).
Any help on this issue would be very welcome.
DESCRIPTION
This is the alpha release 0.16 of the Parse::Yapp parser generator.
It lets you create Perl OO fully reentrant LALR(1) parser
modules (see the Yapp.pm pod pages for more details) and has
been designed to be functionnaly as close as possible to yacc,
but using the full power of Perl and opened for enhancements.
REQUIREMENTS
Requires perl5.004 or better :)
It is written only in Perl, with standard distribution modules,
so you don't need any compiler nor special modules.
INSTALLATION
perl Makefile.PL
make
make test
make install
WARRANTY
This software comes with absolutly NO WARRANTY of any kind.
I just hope it can be useful.
FEEDBACK
Send feedback, comments and bug reports to:
Francois Desarmenien
desar@club-internet.fr
------------------------------
Date: Wed, 4 Nov 1998 23:00:56 -0000
From: "Tim Hicks" <tim.hicks@lineone.net>
Subject: Array problems for newbie
Message-Id: <u1502.17545$357.367@news-reader.bt.net>
(Apologies if this message has appeared twice, it didn't seem to show up the
first time I tried to send.)
Hi all,
I am currently reading through 'Learning Perl' for Unix (despite running
Win95, which was a mistake!) and trying to do the exercises at the end of
chapters. Can anyone tell me what is wrong with this solution to chapter 6,
question 1. It is supposed to have someone enter a list of words, and then
print out those words in reverse order. The problem is, it doesn't print
the last word that has been entered. Here is the code.
#!/usr/bin/perl -w
print "Enter your word list followed by 'control' Z\n";
while (<>) {
push (@array, $_);
}
@arrayr = reverse (@array);
print @arrayr;
Incidentally, the same thing happens with this bit of code as well.
#!/usr/bin/perl -w
print "Enter your column width...\n";
chomp ($width = <STDIN>);
print "Enter your word list...\n";
while (<>) {
push (@array, $_);
}
foreach (@array) {
printf "%${width}s", $_;
}
I wonder if it's the same problem?!?
Thanks to anyone who can help.
Tim
------------------------------
Date: Fri, 30 Oct 1998 20:52:50 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Change UID during execution
Message-Id: <Pine.GSO.4.02A.9810301250090.3421-100000@user2.teleport.com>
On 29 Oct 1998, Joakim Hove wrote:
> my program needs to be run with root priveliges, as the sole purpose
> of the program is to "delete other peoples files".
>
> However, during program execution I would like to change UID to some
> innocent unpriveliged user
See perlvar's entries for these variables: $< $> $( $)
> to do something on the net,
Hmmm. You know, a net connection doesn't have a user-id.
> and then afterwards reassume the priveliged status.
You may or may not be able to reassume the privs, depending upon how you
gave them up. And how you should give them up depends upon what you'll be
doing as that other uid. Maybe you want to fork a child process to do the
work as the un-privileged user. See your system's docs about changing
uid for more information. Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 18:15:41 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: Check this out...
Message-Id: <3640EE2D.F51899F5@email.sps.mot.com>
Anthony F. Sanchez wrote:
>
> Hi!
>
> Does anyone know how I can reformat an in coming variable by replacing
> blank spaces with + signs?
>
> example: (test1 test2 test3) would become (test1+test2+test3)
>
tr///
Which book do you read to learn perl? <sigh>
-tk
------------------------------
Date: Fri, 30 Oct 1998 20:30:45 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: close() and the file pointer
Message-Id: <Pine.GSO.4.02A.9810301225380.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, David Proffitt wrote:
> Has anyone come across any circumstances where an explicit close on a file
> handle doesn't reset the file pointer to the first line?
Huh? Once you close the file, it's not open, so there's no file pointer.
> sub getcase {
> open(DB,$dbfile) or die "couldn\'t open $dbfile : $!";
You know, you don't have to backwhack an apostrophe in a double-quoted
string. But it doesn't hurt.
> while (<DB>) {
> # assign various variables from file data
> }
> close(DB);
> }
>
> this works fine the first time it is called but any subsequent calls
> exit immediately
If you can replicate this, that's a bug in Perl. Make a small, stand-alone
program which demonstrates this behavior under 5.004_04 or later, then use
perlbug to report it. But I suspect that you've got a bug in the code
you're not showing us. For example, could you have done 'last' or 'return'
within that while loop?
> - i did get it to print out the value of $. and it is reading through
> the correct number of lines on the first pass then none at all on the
> second so i am assuming that the problem is related to the pointer
> sticking at eof
$. is not the file pointer. I don't think it has anything to do with your
problem.
Good luck with it!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Thu, 05 Nov 1998 00:36:16 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: converting rfc822 files to MAPI messages ?
Message-Id: <4q602.42$s86.183149@nsw.nnrp.telstra.net>
[comp.lang.perl is log dead. You should inform your news admin]
[You should tell your news reader to format posts a bit better]
In article <363fdf7c.109656928@news.concentric.net>,
muzok@nospam.pacbell.net (muzo) writes:
> I am not really expecting a positive answer to this question but
> hopefully I'll get bits and pieces which I can put together. Here is
> my problem: I have a mail client which stores incoming messages in
> files with rfc822 content and it has a weird folder hierarchy of its
> own. I would like to upgrade from this client to Outlook 98. I need
upgrade is a word that we could have a debate about. But not here :)
You could have a look at http://www.perl.com/CPAN/. The modules list
there lists all modules that are publically available. You could look
for things like Mail, MAPI, MIME and stuff.
You could also visit www.activestate.com and see what win32 specific
modules they have available.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Wed, 04 Nov 1998 18:13:16 -0600
From: Tk Soh <r28629@email.sps.mot.com>
To: Eric Hagen <ehagen@Hawaii.Edu>
Subject: Re: Decimal to Hex conversion
Message-Id: <3640ED9C.1EF1E2D@email.sps.mot.com>
[posted to comp.lang.perl.misc and copy emailed]
Eric Hagen wrote:
>
> I have found hex () to convert from hex to decimal, and printf to print
> out hex values, but for the life of me I can not find in any of my docs on
> how to covert decimal values to hex values.
>
> I'm so desperate I would be happy with a unix tool or system call to get
> the hexed value.
>
So you know about printf, huh? Then you must have heard about sprintf,
haven't you?
-tk
------------------------------
Date: Wed, 04 Nov 1998 23:24:32 GMT
From: ywang@maingate.net
Subject: Easy Way? Or More Efficient Way?
Message-Id: <71qnnf$7v5$1@nnrp1.dejanews.com>
Hi,
Is there any easy/efficient way to get the number of certain chars presented
in a given string? For example I have string $a= "abcccd", is there any easy
/ efficient way get the answer which is c occurs 3 times? Of course I can
split the string by c into a dummy array, then get the last index of that
dummy array. However, is there any better way or Perl function can handle
that?
Thanks. Please CC your answer to yxw1@yahoo.com
Y. Wang
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 4 Nov 1998 23:37:21 GMT
From: sholden@pgrad.cs.usyd.edu.au (Sam Holden)
Subject: Re: Easy Way? Or More Efficient Way?
Message-Id: <slrn741p9j.jru.sholden@pgrad.cs.usyd.edu.au>
On Wed, 04 Nov 1998 23:24:32 GMT, ywang@maingate.net <ywang@maingate.net> wrote:
>Hi,
>
>Is there any easy/efficient way to get the number of certain chars presented
>in a given string? For example I have string $a= "abcccd", is there any easy
>/ efficient way get the answer which is c occurs 3 times? Of course I can
>split the string by c into a dummy array, then get the last index of that
>dummy array. However, is there any better way or Perl function can handle
>that?
Have you considered reading the documentation....
perlfaq4 :
How can I count the number of occurrences of a substring within a string?
>Thanks. Please CC your answer to yxw1@yahoo.com
Make my newsreader do it by itself and I would...
--
Sam
Can you sum up plan 9 in layman's terms? It does everything Unix does
only less reliably.
--Ken Thompson
------------------------------
Date: 4 Nov 1998 23:36:53 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Easy Way? Or More Efficient Way?
Message-Id: <71qoel$bh114@mercury.adc.com>
In article <71qnnf$7v5$1@nnrp1.dejanews.com>, <ywang@maingate.net> wrote:
>Hi,
>
>Is there any easy/efficient way to get the number of certain chars presented
>in a given string? For example I have string $a= "abcccd", is there any easy
>/ efficient way get the answer which is c occurs 3 times? Of course I can
>split the string by c into a dummy array, then get the last index of that
>dummy array. However, is there any better way or Perl function can handle
>that?
perlfaq4: "How can I count the number of occurrences of a substring
within a string?"
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: Fri, 30 Oct 1998 21:01:25 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: file sorting sar files in AIX
Message-Id: <Pine.GSO.4.02A.9810301300260.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998 jistdc1@mail.jbhunt.com wrote:
> I would like to create a script that runs on Fridays and uses sar -f
> on files from Thursday to Thursday.
Your system may have cron or a similar utility to do this. Was that what
you needed, or were you asking for something else? Cheers!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 04 Nov 1998 18:18:23 -0600
From: Tk Soh <r28629@email.sps.mot.com>
Subject: Re: From Unix to WinNT
Message-Id: <3640EECF.B29EFD88@email.sps.mot.com>
Steve miles wrote:
>
> Hi all,
>
> I've written all of my Perl scripts for the Unix platform, and now I
> have to install some of them on a WinNT server. Am I in for a big
> surprise or will it be easy to move them to the WinNT server. I'd hate
> to have to program some more...Does anyone have some war stories about
> moving their scripts to WinNT? Or just thoughts on programming on WinNT?
Moving from Unix to NT ??? Are you sure???
-tk
------------------------------
Date: Wed, 04 Nov 1998 23:25:36 +0000
From: Julian Gilbey <J.D.Gilbey@qmw.ac.uk>
Subject: Re: HELP: perl script fails on setuid binary
Message-Id: <3640E270.387D0590@qmw.ac.uk>
Robert S. Campbell wrote:
>
> I've run into a problem with a perl script that I can't seem to get around.
>
> The script formats print jobs for a kodak printer, adds a banner page with
> some specific info, and creates specific postscript function calls the
> printer understands for duplex, stapling, collating, etc, and wraps those
> postscript commands around a postscript print job.
> ie: k1580 -d long -p kodak report.ps
> will print the file report.ps on the kodak printer with duplex folded along
> long edge of the paper.
>
> The script pipes the job to lpr:
> # Send the output to the printer, unless no printer is specified.
> open (STDOUT, "|lpr -P $printer") unless ($printer eq "");
>
> Now, on my Solaris 2.5.1 machines, lpr is separate from lp. On the one
> machine that has Solaris 2.6 and is really the one machine I really need
> this script to work, lpr is a link to /bin/lp, which, for some reason,
> is setuid root.
>
> The script works fine on it's own, and works fine if called from within a
> bourne-shell script:
> # more /tmp/test.sh
> #!/bin/sh
>
> rptid=$1
>
> /usr/local/bin/enscript -r -o - $rptid | eval /usr/local/bin/k1580 -d long -p k1580
>
> Now, here's the rest of the scenario: My users run a program that generates
> reports for them. That program writes reports to a file and calls a
> bourne-shell script which then grabs the file and calls enscript and the
> perl script, just like what you see above.
> So, program -> bourne script -> perl -> lp.
>
> Which fails with the following error:
> Insecure $ENV{PATH} while running setuid at /usr/local/bin/k1580 line 199.
> (line 199 is the "open (STDOUT..." above)
Is the Perl script also setuid, or does it have a -T flag on the
#!/usr/bin/perl line at the start? I would guess so.
Basically, what you want to do is to set $ENV{PATH} explicitly at
the start of the script to a known, safe value, such as
"/usr/local/bin:/usr/bin:/usr/ucb:/bin" or whatever.
For more details, see perlsec(1).
HTH,
Julian
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Julian Gilbey Email: J.D.Gilbey@qmw.ac.uk
Dept of Mathematical Sciences, Queen Mary & Westfield College,
Mile End Road, London E1 4NS, ENGLAND
-*- Finger jdg@goedel.maths.qmw.ac.uk for my PGP public key. -*-
------------------------------
Date: Fri, 30 Oct 1998 20:36:09 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: How to run Perl/CGI under NT?
Message-Id: <Pine.GSO.4.02A.9810301235480.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, David J. Topper wrote:
> So I've set up things with the NT Explorer to associate all files with
> .pl and .cgi to launch perl. But unfortunately, I can't seem to get
> stuff to launch.
When you're having trouble with a CGI program in Perl, you should first
look at the please-don't-be-offended-by-the-name Idiot's Guide to solving
such problems. It's available on CPAN.
http://www.perl.com/CPAN/
http://www.perl.org/CPAN/
http://www.perl.org/CPAN/doc/FAQs/cgi/idiots-guide.html
http://www.perl.org/CPAN/doc/manual/html/pod/
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 4 Nov 1998 17:50:18 -0600
From: jcrouch@MCS.COM (Jude Crouch)
Subject: Re: http requests hangup
Message-Id: <71qp7q$212$1@Mercury.mcs.net>
In comp.infosystems.www.authoring.html mehta@mama.indstate.edu wrote:
> 3/11/98
> Hello:
> I am doing applet/servlet cgi-post communication. It works just fine. I do
> clean request and response closing of the i/o streams setting necessary
> headers like content-length and content-type.
> I though am unable to solve one problem. When I try to make multiple
> consecutive immediate requests to the servlet the applet side stream hangs up
> ...
What makes you think this is a problem with HTML? If it is a possible
cgi problem, post in <news:comp.infosystems.www.authoring.cgi>; if
you think it might be a server problem, check in the
<news:comp.infosystems.www.servers.*> hierarchy. If it's a Micro$oft
issue, they have their own newsgroup hierarchy starting with
<new:microsoft.*>.
You will likely *not* get authoritative answers here, and if you
get *any* answers, they will not undergo peer review.
Jude
--
Jude Crouch (jcrouch@pobox.com) - Computing since 1967!
Crouch Enterprises - Telecom, Internet & Unix Consulting
Oak Park, IL 708-848-0134 URL: http://www.pobox.com/~jcrouch
------------------------------
Date: 4 Nov 1998 23:49:03 GMT
From: bhilton@tsg.adc.com (Brand Hilton)
Subject: Re: Locale warning messages
Message-Id: <71qp5f$1c1@mercury.adc.com>
In article <71ql3h$n31$1@ultra.sonic.net>,
Jeff Patterson <jpat@sonic.net> wrote:
>Ever since I installed redhat 5.1 (linux) which updated perl, everytime I
>run a perl script I get the annoying message
>
>perl: warning: Setting locale failed.
>perl: warning: Please check that your locale settings:
> LC_ALL = (unset),
> LANG = "EN"
> are supported and installed on your system.
>perl: warning: Falling back to the standard locale ("C").
>
>my LANG="EN" and LC_ALL is unset.
>
>I neither want or care about locale. I just want perl to shut about it. Any
>clues?
If you neither want nor care about locale, then you shouldn't have
your LANG variable set to "EN". You need to find out why it's getting
set to "EN" and fix it.
This is actually a Linux question. It's just that Perl is one of the
few programs that actually tries to be smart about locale settings.
You might also have problems with news readers and mail programs and
such if you don't fix the real problem.
My guess is, at some point in the Linux install, you were asked about
your keyboard settings, and you mistakenly chose English instead of US
ASCII. But that's just a guess.
--
_____
|/// | Brand Hilton bhilton@adc.com
| ADC| ADC Telecommunications, ATM Transport Division
|_____| Richardson, Texas
------------------------------
Date: Fri, 30 Oct 1998 20:48:44 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: need help with unbuffering
Message-Id: <Pine.GSO.4.02A.9810301243020.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998 w.wilson@mailexcite.com wrote:
> here's the script portion
> print "\nSelect an entry to edit: ";
> chomp($choice = <STDIN>);
>
> open(TMP, ">$tmpfile") or die "Couldn't open file: $!";
> TMP -> autoflush(1);
>
> $to_edit = $choice_array[--$choice];
> print TMP $to_edit;
> system "vi $tmpfile";
>
> the file opens to vi exactly how I would want it to, but when it's saved,
> more shows up...
That sounds as if more is being printed to TMP after you're done with vi.
If you don't want that, close TMP before you start vi.
> s{^\"my\"\ variable\ .*?\ masks\ earlier\ declaration\ in\ same\ scope}
> {\"my\"\ variable\ \%s\ masks\ earlier\ declaration\ in\ same\ scope}s
> && return 1;
> m{^\"no\"\ not\ allowed\ in\ expression} && return 1;
> and so on and so on.
This looks like some of the internals created in the working of the
diagnostics module, but I can't see how it got here. Could you be using
that module? It shouldn't do that to you in normal operation, but maybe
you're doing something weird with it.
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Wed, 4 Nov 1998 16:50:17 -0800
From: "Rusty Williamson" <rwilliamson@uno.gers.com>
Subject: Need Perl help on which 'box'.
Message-Id: <MA602.82$DA6.19007@news.connectnet.com>
My Perl scripts need to know what they are running on. Does anyone know of
a Perl function which will return the platform and/or OS version it is
running on (i.e. Windows 98 [Version 4.10.1998], Windows NT Version 4.0,
Linux 2.0.30, DG/UX Release R4.11MU04 AViiON, etc)?
Thanks,
Rusty
------------------------------
Date: 4 Nov 1998 23:34:37 GMT
From: edstrom@Poopsie.hmsc.orst.edu (John Edstrom)
Subject: Re: Not to start a language war but..
Message-Id: <71qoad$qi6$1@news.NERO.NET>
In article <909623951.840118@thrush.omix.com>,
Zenin <zenin@bawdycaste.org> writes:
> John Porter <jdporter@min.net> wrote:
>: Andrew M. Kuchling wrote:
...
> Circular references are the only problem, and rarely are actually
> needed in Perl because primitive types are so flexible. There are
> times you need a circular linked list in Perl, but not that often.
> Most uses of circular refs are to build containers that in Perl
> are much better built with basic arrays and hashes.
>
Circular refs are also used to build character.
------------------------------
Date: Thu, 05 Nov 1998 00:53:19 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: PERL manual - html
Message-Id: <3G602.44$s86.183149@nsw.nnrp.telstra.net>
In article <K2302.673$QN1.500633@198.235.216.4>,
jhardy@cins.com (John Hardy) writes:
>
> http://www.perl.com/CPAN-local/doc/manual/html/pod/perltoc.html
>
> is there a place that you can "keyword search" through the above
> HTML document?
1) Load it in your browser, use its search functionality.
2) download it to your local disk, use grep or some other tool
3) if perl is already installed, use perldoc, and the search
functionality of your pager, if any
4) Load the perltoc.pod file in your favourite editor, and use its
search function
5) grep the pod.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Thu, 05 Nov 1998 00:48:59 GMT
From: mgjv@comdyn.com.au (Martien Verbruggen)
Subject: Re: redirect output
Message-Id: <%B602.43$s86.183149@nsw.nnrp.telstra.net>
In article <hoqp17.1td.ln@flash.net>,
tadmc@flash.net (Tad McClellan) writes:
>: $remote->autoflush(1);
>: print $remote "GET $document HTTP/1.0\n\n";
>
> $whole_thing = "GET $document HTTP/1.0\n\n";
This print needs to be left alone.
>: while (<$remote>) {print} #This is the problem area
>
> while (<$remote>) {$whole_thing .= $_}
To be a bit more complete:
# ... blablabla
$remote->autoflush(1);
print $remote "GET $document HTTP/1.0\n\n";
my $result = '';
$result .= $_ while (<$remote>);
print "$result";
Maybe we should suggest that the original poster uses LWP. Available
from CPAN. http://www.perl.com/CPAN/. It's a lot better to use that
sort of module if you don't want to or can't deal with socket
communication.
Martien
--
Martien Verbruggen |
Webmaster www.tradingpost.com.au | "In a world without fences,
Commercial Dynamics Pty. Ltd. | who needs Gates?"
NSW, Australia |
------------------------------
Date: Fri, 30 Oct 1998 20:59:39 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: Regex Explaination...
Message-Id: <Pine.GSO.4.02A.9810301254180.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Danny Groppo wrote:
> I thought I am only using the parentheses for capturing, but it seems
> it is doing some grouping that effects my $1.
Isn't that exactly as documented?
> My understanding of the lookahead is that it matches position in a
> string similar to the way a word boundary does. So since the engine
> begins at the nothingness right before the first character, shouldn't
> it the (?:\d) see that there is a number (1) and evaluate to true.
> Since lookaheads don't consume any of the target string, shouldn't the
> engine then look at the (1) and put it in $1?
I think you've confused (?:...) with (?=...), perhaps? Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: Fri, 30 Oct 1998 20:23:45 GMT
From: Tom Phoenix <rootbeer@teleport.com>
Subject: Re: regexp question - re: {n}
Message-Id: <Pine.GSO.4.02A.9810301201270.3421-100000@user2.teleport.com>
On Fri, 30 Oct 1998, Jack de Valpine wrote:
> /^(\d+)\s+((\S+\s+){\1})/gom
I don't think that /o does what you think it does. And maybe /m isn't
right for what you're doing, either.
> ie - find a number at the beginning of the line, then find what follows
> that many times again
It would be nice if you could do that, I suppose, but Perl's patterns
don't support quantifiers that aren't known at the time the pattern is
compiled. (Can you do that with any other RE engine? I've never seen it.)
But you could still parse something like this in Perl. Here's one possible
way.
$_ = qq{
4\nhere are\n\tfour parameters\n
stuff to not parse yet
};
my $count = $1 if /\G\s*(\d+)\s+/gc; # How many params
die "Couldn't find good count" unless $count;
my @params;
while (@params < $count) {
if (/\G\s*(\S+)/gc) {
push @params, $1;
} else {
die "Can't find parameter";
}
}
print map "$_: '$params[$_]'\n", 0..$#params;
Hope this helps!
--
Tom Phoenix Perl Training and Hacking Esperanto
Randal Schwartz Case: http://www.rahul.net/jeffrey/ovs/
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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 4152
**************************************