[10303] in Perl-Users-Digest
Perl-Users Digest, Issue: 3896 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 5 19:07:24 1998
Date: Mon, 5 Oct 98 16:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 5 Oct 1998 Volume: 8 Number: 3896
Today's topics:
Re: Accessing Access97 using ADO DB... <gellyfish@btinternet.com>
Re: Accessing Checkboxes in Perl <anty_84@yahoo.com>
Adding targets to MakeMaker ken@forum.swarthmore.edu
Re: Data Search Question (Larry Rosler)
HELP with variable naming <ap85@cornell.edu>
Re: HELP with variable naming (Larry Rosler)
How do I generate a GIF <slug@labyrinth.net.au>
Re: How to open a command that pipes both in and out ?? <gellyfish@btinternet.com>
How to pass a hash array to a sub program <douglas@home.com>
Re: implementing ceiling and floor (Mike Stok)
libnet bundle and Net::SMTP <Paul.Coleman@CoSeCo.com>
Re: libnet bundle and Net::SMTP <eashton@bbnplanet.com>
Matching Smallest Instance of a Pattern (Jim McAtee)
Re: Matching Smallest Instance of a Pattern (Larry Rosler)
Memory Usage Modual (Garrett Casey)
Re: Memory Usage Modual (Ilya Zakharevich)
Newbie Question about launching new browser window <basden@imagun.com>
Re: Omaha Perl Mongers - First Meeting ! <gellyfish@btinternet.com>
Re: Owning Your Own Adult Interent Business Is Easy (Matthew Bafford)
Re: Passing Variables: $_ vs. @_ <rabell@ti.com>
Re: Passing Variables: $_ vs. @_ (Bart Lateur)
Re: Problems Using a Compare Subroutine with Sort <garry@america.net>
Redirect Question (Dov)
Re: Search for forwardslash...how? <evonzee@tritechnet.com>
Re: Search for forwardslash...how? <gellyfish@btinternet.com>
Re: send geroge reese (was Re: Call for Participation: <zenin@bawdycaste.org>
Re: sequential tracking numbers <jbostwic@valinor.cargill.com>
Re: Split question - retain the pattern? (Craig Berry)
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 5 Oct 1998 22:15:08 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Accessing Access97 using ADO DB...
Message-Id: <6vbcss$4ag$1@gellyfish.btinternet.com>
On Mon, 05 Oct 1998 16:25:03 +0200 haller <haller@broadnet.ascom.ch> wrote:
> Hi all
>
> Note: I'm a newbie...
>
<snip>
>
> I really need some help on this... It seems, that not very much
> documentation is available on this topic... or am I completly wrong?
>
<at the risk of starting this argument again>
No, PerlScript has no separate documentation to that of Perl itself and
the Microsoft Scripting object model - the ADO documentation will be found
at developer.microsoft.com or somewhere like that.
The example PerlScript code (which I assume you have seen) is a good place
to start.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Mon, 5 Oct 1998 16:59:10 -0500
From: "Anthony Smith" <anty_84@yahoo.com>
Subject: Re: Accessing Checkboxes in Perl
Message-Id: <6vbfg9$mv1$1@blue.hex.net>
Thanks for your help
Rick Delaney wrote in message <36183AF5.B3E03A08@shaw.wave.ca>...
>Anthony Smith wrote:
>>
>> Anyone know how to get a checkbox to return a true false statement in
> ^^^^^^^^^^^^^^^^^^^^
>> perl? Does it require the cgi.pm module?
>
>This should be true when false.
>
>use CGI;
>my $query = new CGI;
># insert other necessary code here
>
>print $query->checkbox(-name=>'checkbox_name',
> -checked=>'checked',
> -value=>'FALSE',
> -label=>'true false statement');
># yada yada
>
>print "true" if $query->param('checkbox_name');
>
>But seriously, what the heck are you asking? CGI.pm is a good place to
>start if you want to use cgi with perl.
>
>--
>Rick Delaney
>rick.delaney@shaw.wave.ca
------------------------------
Date: Mon, 05 Oct 1998 21:03:21 GMT
From: ken@forum.swarthmore.edu
Subject: Adding targets to MakeMaker
Message-Id: <6vbc6p$rnr$1@nnrp1.dejanews.com>
Hi,
I'm having trouble adding targets using MakeMaker's WriteMakefile function.
Here's an example Makefile.PL:
WriteMakefile(
'NAME' => 'Taco1',
'VERSION_FROM' => 'Taco1.pm', # finds $VERSION
'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
);
sub MY::start_httpd {
'
start_httpd:
httpd -f httpd.conf
';
}
The start_httpd target doesn't make it into the generated Makefile. According
to the ExtUtils::MakeMaker documentation, this is all I have to do, but I
suspect I have to add something to the WriteMakefile() call too.
Help?
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 5 Oct 1998 14:50:25 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Data Search Question
Message-Id: <MPG.1082deffc4bd23969897e0@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <36192956.269950618@nntp.cts.com> on Mon, 05 Oct 1998 20:29:29
GMT, Garrett Casey <nospamno_adms1@cts.com> says...
> I have 1,000,000 character strings that are 10 random A-Z characters
> in length. For example:
>
> JSUWIGKROD
> KIWPLODGQF
> WOQPLIFJSK
> OQPALSNEUG
> ISOPQKEOSP
> etc...
>
> A user inputs his own 10 character A-Z string:
>
> UQPALRIEOF
>
> And the program returns the closest match. The match, though, must be
> based on PER CHARACTER comparision - not the string as a whole.
>
> For instance,
>
> UQPALRIEOF would match UQPALRIDOF 90% because 9 out of the 10
> characters are the same.
>
> In your opinion, what is the most efficient data structure I can use
> to store the 1,000,000 strings, and the most efficient way to search
> for such a comparison in that data structure?
The best I can do is an array and a linear search. I'd love to be shown
a better way.
#!/usr/local/bin/perl -w
use strict;
my $datum = 'UQPALRIEOF';
my $max = 0;
my $best;
while (<DATA>) {
my $xor = $_ ^ $datum;
next unless (my $n = $xor =~ tr/\0//) > $max;
$best = $_;
last if ($max = $n) == length $datum;
}
print "$max characters of $datum matched in $best";
__END__
JSUWIGKROD
KIWPLODGQF
WOQPLIFJSK
OQPALSNEUG
ISOPQKEOSP
UQPALRIDOF
prints:
9 characters of UQPALRIEOF matched in UQPALRIDOF
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 05 Oct 1998 18:09:09 -0400
From: Andrew Perrella <ap85@cornell.edu>
Subject: HELP with variable naming
Message-Id: <36194385.E55A7EC1@cornell.edu>
Hello,
I have an array (called name_array) with 9 keys and values. All of
the keys are of the form 1_1_i where i is a number from 0-8.
I want to associate a scalar with each array value. All of my scalars
have the form $ai where i is the same as above.
So:
$a0 = $name_array{'1_1_0'};
$a1 = $name_array{'1_1_1'};
etc.
I am trying to write a for loop that goes through my array and
automatically creates these scalars and sets these values. I could do
the 8 by hand, however in the future I will be dealing with many more
values.
The code I have tried is below but doesn't work at all.
for ($i=0; $i != @key_list; $i++){
$a.$1 = $name_array{'1_1_.$i'};
}
If someone can help that would be great.
thanks,
Andrew Perrella
ap85@cornell.edu
------------------------------
Date: Mon, 5 Oct 1998 15:36:30 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: HELP with variable naming
Message-Id: <MPG.1082e9ccc317e0209897e2@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <36194385.E55A7EC1@cornell.edu> on Mon, 05 Oct 1998 18:09:09 -
0400, Andrew Perrella <ap85@cornell.edu> says...
> I have an array (called name_array) with 9 keys and values. All of
> the keys are of the form 1_1_i where i is a number from 0-8.
That is a hash, not an array. Hashes have keys and values; arrays have
elements.
> I want to associate a scalar with each array value. All of my scalars
> have the form $ai where i is the same as above.
>
> So:
> $a0 = $name_array{'1_1_0'};
> $a1 = $name_array{'1_1_1'};
>
> etc.
You need to use symbolic references. Ugh! Why not make those into an
array, and use $a[$i] or whatever. Oh, well...
> I am trying to write a for loop that goes through my array and
> automatically creates these scalars and sets these values. I could do
> the 8 by hand, however in the future I will be dealing with many more
> values.
>
> The code I have tried is below but doesn't work at all.
>
> for ($i=0; $i != @key_list; $i++){
> $a.$1 = $name_array{'1_1_.$i'};
>
> }
for ($i=0; $i != @key_list; $i++){
${"a$i"} = $name_array{"1_1_$i"};
}
or, more Perlishly,
foreach ( 0 .. $#key_list ) { ${"a$_"} = $name_array{"1_1_$_"} }
or, in 5.005,
${"a$_"} = $name_array{"1_1_$_"} foreach 0 .. $#key_list;
So much less punctuation!
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 05 Oct 1998 11:36:41 +1000
From: Reiner <slug@labyrinth.net.au>
Subject: How do I generate a GIF
Message-Id: <361822A8.993211FF@labyrinth.net.au>
I want to generate a GIF from a table of data (not a graph). I have
looked at Jeffrey Friedl's gif.pl and it does what I want except not in
color and I don't have the perl skills (yet) or GIF format information
to modify it to allow x colors. Something like gd.pm might do what I
want but it is too excessive. I just want to write a string of pixels,
no fancy drawing or anything.
Any help/sourc/url appreciated.
-Reiner
------------------------------
Date: 5 Oct 1998 22:32:48 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: How to open a command that pipes both in and out ???
Message-Id: <6vbdu0$4bp$1@gellyfish.btinternet.com>
On 05 Oct 1998 13:47:28 +0200 Michal Rutka <erhmiru@erh.ericsson.se> wrote:
> "Aleksey Zvyagin" <zal@rest.ru> writes:
>> Hi, All!
>>
>> I want to do following:
>> to open the command by 'open' function that this command will be piped by
>> opened file descriptor and pipes this file descriptor. I thought to do this
>> as:
>
> You cannot do this with simple open. What you need is open2 or open3. See
> derldoc open2 for further reference.
>
That'll be IPC::Open2 or IPC::Open3 of course.
Examples abound on DejaNews
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Mon, 05 Oct 1998 21:54:30 GMT
From: Douglas Galbraith <douglas@home.com>
Subject: How to pass a hash array to a sub program
Message-Id: <36193FFC.BF5C898D@home.com>
Hello, and thanks for the help;
How do you pass a hash array to a subprogram? Below is an example that
I
can't get to work.
thanks,
DGalbra862@aol.com
-------------------------------------------------------------
my %hash_array = (
"one" => "1",
"two" => "2",
"three" => "3"
);
print "Here is the hash array in the main program:\n";
while (my ($key,$value) = each %hash_array) {print "$key=$value\n";}
print_hash(%hash_array);
sub print_hash
{
print "Here is the hash array passed into the subprogram:\n";
while (my ($key,$value) = each %_) {print "$key=$value\n";}
}
-------------------------------------------------------------
------------------------------
Date: 5 Oct 1998 22:52:06 GMT
From: mike@mike.stok.co.uk (Mike Stok)
Subject: Re: implementing ceiling and floor
Message-Id: <6vbiim$lh1@news-central.tiac.net>
In article <6vb5qe$nc2$1@aurwww.aur.alcatel.com>,
John Klassa <klassa@aur.alcatel.com> wrote:
>On Sun, 04 Oct 1998 12:33:20 +0000, Xah <xah@best.com> wrote:
> > I'm implementing "ceiling" and "floor", since I don't see them anywhere
> > and the FAQ basically says implement your own.
>I just whipped up a test case to make sure:
>
> use POSIX;
>
> $i = 1.1;
> print "ceil is ", ceil($i), "\n";
> print "floor is ", floor($i), "\n";
>
> $i = -1.1;
> print "ceil is ", ceil($i), "\n";
> print "floor is ", floor($i), "\n";
If you're worried about slurping in the POSIX module just for a few
mathematical odds & ends then you might consider using something like
use POSIX ':math_h';
which only loads up a dozen and a half or so routines (including ceil and
floor)
Hope this helps,
Mike
--
mike@stok.co.uk | The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/ | PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/ | 65 F3 3F 1D 27 22 B7 41
stok@colltech.com | Collective Technologies (work)
------------------------------
Date: Mon, 5 Oct 1998 17:02:30 -0400
From: "-Paul Coleman" <Paul.Coleman@CoSeCo.com>
Subject: libnet bundle and Net::SMTP
Message-Id: <361934ad.0@news3.paonline.com>
Hi,
Where can I find the libnet bundle so that I can use Net::SMTP?
Thanks,
Paul Coleman
------------------------------
Date: Mon, 05 Oct 1998 21:30:36 GMT
From: Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com>
Subject: Re: libnet bundle and Net::SMTP
Message-Id: <36193805.47C3740@bbnplanet.com>
-Paul Coleman wrote:
> Where can I find the libnet bundle so that I can use Net::SMTP?
Have you tried CPAN? http://www.perl.com
e.
And did you get what you wanted from this life,
even so? I did. And what did you want?
To call myself beloved, to feel myself
beloved on the earth. -R. Carver-
------------------------------
Date: Mon, 05 Oct 1998 21:41:58 GMT
From: jmcatee@mediaodyssey.com (Jim McAtee)
Subject: Matching Smallest Instance of a Pattern
Message-Id: <36193b24.148782707@news.supernews.com>
How do I match the smallest instance of a pattern? I'm trying to
replace a filename within an html image tag as follows. The pattern
I've tried below matches from the first '/' through the end of the
'.gif' file extension.
$_ = '<a href="/alpha/beta/gamma.htm"><img src="/graphics/xyz.gif"
width=110 height=29></a>'
s|/.*?\.gif|/abc.gif|;
Thanks,
Jim
------------------------------
Date: Mon, 5 Oct 1998 14:56:57 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Matching Smallest Instance of a Pattern
Message-Id: <MPG.1082e086b87ce6a99897e1@nntp.hpl.hp.com>
[Posted to comp.lang.perl.misc and a copy mailed.]
In article <36193b24.148782707@news.supernews.com> on Mon, 05 Oct 1998
21:41:58 GMT, Jim McAtee <jmcatee@mediaodyssey.com> says...
!> How do I match the smallest instance of a pattern? I'm trying to
!> replace a filename within an html image tag as follows. The pattern
!> I've tried below matches from the first '/' through the end of the
!> '.gif' file extension.
!>
!> $_ = '<a href="/alpha/beta/gamma.htm"><img src="/graphics/xyz.gif"
!> width=110 height=29></a>'
!>
!> s|/.*?\.gif|/abc.gif|;
s|/[^/]+\.gif|/abc.gif|;
will match from the *last* '/' through the end of the '.gif' file
extension.
--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com
------------------------------
Date: Mon, 05 Oct 1998 21:35:52 GMT
From: nospamno_adms1@cts.com (Garrett Casey)
Subject: Memory Usage Modual
Message-Id: <36193b1d.274501271@nntp.cts.com>
Is there a mod like Benchmark that, instead of testing for timing,
tests for memory usage?
If not, how can have a program report the amount of memory it uses?
Garrett Casey
nospamo_adms1@cts.com
Remove "nospamo_" To send me email.
------------------------------
Date: 5 Oct 1998 22:07:43 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: Memory Usage Modual
Message-Id: <6vbfvf$kl0$1@mathserv.mps.ohio-state.edu>
[A complimentary Cc of this posting was sent to Garrett Casey
<nospamno_adms1@cts.com>],
who wrote in article <36193b1d.274501271@nntp.cts.com>:
> Is there a mod like Benchmark that, instead of testing for timing,
> tests for memory usage?
>
> If not, how can have a program report the amount of memory it uses?
perldoc perldebug
(starting from 5.005).
Hope this helps,
Ilya
------------------------------
Date: Mon, 5 Oct 1998 15:48:30 -0700
From: "Bradley Basden" <basden@imagun.com>
Subject: Newbie Question about launching new browser window
Message-Id: <6vbimp$m3e$1@supernews.com>
I am new to PERL and have used it to to create pages on the fly
successfully. My questions is this. I would like the script to launch a
child window similar to the javascript window.open command. It has to launch
a second browser window rather than replacing the current page. It also has
to launch the child window without the browser buttons, scrollbars, etc. If
anyone can point me in the right direction, it would be appreciated.
Thanks in advance,
Brad Basden
basden@imagun.com
------------------------------
Date: 5 Oct 1998 23:16:51 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Omaha Perl Mongers - First Meeting !
Message-Id: <6vbggj$4bv$1@gellyfish.btinternet.com>
On 05 Oct 1998 11:58:10 +0100 Jim Brewer <jimbo@soundimages.co.uk> wrote:
> Jonathan Stowe <gellyfish@btinternet.com> writes:
>
>>
>> I reesed that up like a right gugus - that'll be flamingos of course.
>> I'm getting my Lewis Caroll confused with King Lear's daughters
>>
>> But I think I got away with it ;-P`
>>
>
> Only a REAL pervert would think a flamingo looks anything like a
> daughter of King Lear. Or any other hominoid.
>
"Oh perlican children" vs
The entertaiment of the Red Queen.
> Does your community policing initiative require you to register your
> presence whenever in the local shopping mall?
>
Don't have shopping mall here.
> Do you inspire fear in your local bird watchers?
>
My seagull buddies - Alf and Petunia love me
> A flamingo looks like a female hominoid. Really. The youth of today.
>
Thats Lewis Caroll, Red Queen, Croquet OK ?
> Must be lunch time. I'm off. Maybe it's past my sell by date.
Almost certainly.
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: Mon, 5 Oct 1998 18:52:09 -0400
From: dragons@scescape.net (Matthew Bafford)
Subject: Re: Owning Your Own Adult Interent Business Is Easy
Message-Id: <MPG.108317265d73e7269896c7@news.south-carolina.net>
In article <130943492372448768@bigfoot.com> on 5 Oct 1998
04:02:53 GMT, osymwmxh@bigfoot.com (osymwmxh@bigfoot.com) pounded
in the following text:
Subject: Owning Your Own Adult Interent Business Is Easy
=>
=> An unregistered version of Newsgroup AutoPoster PRO posted this article!
^^^^^^^^^^^^
It may be easy, but it doesn't seem to make you much money...
--Matthew
------------------------------
Date: Mon, 05 Oct 1998 15:55:36 -0500
From: Robert Bell <rabell@ti.com>
Subject: Re: Passing Variables: $_ vs. @_
Message-Id: <36193248.F6F208C9@ti.com>
Robert Bell wrote:
I think that I understand now. According to perldiag.pod you no
longer are expected to be assigning to $[ in the manner of the
above code. That is where the problem is. It is a difference in
Perl 5.x from 4.0 .
from perldiag.pod ...
=item That use of $[ is unsupported
(F) Assignment to C<$[> is now strictly circumscribed, and interpreted
as
a compiler directive. You may say only one of
$[ = 0;
$[ = 1;
...
local $[ = 0;
local $[ = 1;
...
This is to prevent the problem of one module changing the array base
out from under another module inadvertently. See L<perlvar/$[>.
I guess that this means that once Perl5 has seen the $[ assign that
you cannot for sure say anything about what the value is of an
element which is outside the idex bounds (duh).
The result is that the better way to write the code might be
to not have any indexing involved as in
sub AddRecord{
($database,$returnto,$record) = @_;
or if you need to assign specific elements then to use $[ in
your assignment to make it independent of someone somewhere
assigning to $[ .
sub sub {
print $_[$[];
print $_[$[+2];
print $_[$[+5];
...
I did not realize this.
That'll learn me to not read them'thar perldocs.
rabell ...
------------------------------
Date: Mon, 05 Oct 1998 21:36:03 GMT
From: bart.mediamind@ping.be (Bart Lateur)
Subject: Re: Passing Variables: $_ vs. @_
Message-Id: <361a3a0c.1713934@news.ping.be>
John Porter wrote:
>Robert Bell wrote:
>>
>> I guess that I usually don't think about this scoping relevance in
>> Perl, but I also tend to place subroutines early in a script.
>
>So maybe that practice isn't such a good idea after all.
Say what?
Are you actually saying that you should not put sub declarations before
your plain code?
I, too, have the habit of putting my sub declarations at the back, in
plain scripts. BUT! 'use' and especially 'require' can be considered as
including the text of the modules/library files in place, so as soon as
you 'use' a module, you are putting the definitions of the subs in front
of the working code!
So what do I have to make of "so maybe this isn't such a good idea after
all"?
Bart.
------------------------------
Date: Mon, 05 Oct 1998 22:56:11 GMT
From: "Garry T. Williams" <garry@america.net>
Subject: Re: Problems Using a Compare Subroutine with Sort
Message-Id: <36194EDE.5350B2B9@america.net>
droby@copyright.com wrote:
>
> In article <la7lyf5moa.fsf@erh.ericsson.se>,
> Michal Rutka <erhmiru@erh.ericsson.se> wrote:
> > John Porter <jdporter@min.net> writes:
> > [...]
> > > > Do you dont understand that it overflows? Thats mean it
> > > > gives different result on your Spark than on mine. Does this not worry
> > > > you? At least it worries me.
> > >
> > > Are you sure it overflows?
> >
> > Yes.
> >
> > > I have a hard time believing that your
> > > machine, which is alsa a sparc, behaves so differently.
> >
> > It is up to you.
> >
>
> Perhaps someone should file a bug report. On a Sparc4 running Solaris2.6 and
> Perl 5.004_04, an Alpha running Digital Unix 4.0D and Perl 5.004_04 and a
> Pentium running RedHat Linux 5.0 (kernel version 2.0.32) and Perl 5.004_01,
> I see exactly the same behavior as John reports.
I don't believe that interpreting 0xffffffff as a minus one is a bug.
That *is* minus one (assuming a 32-bit word size). The real problem is
using a numeric compare to sort IP addresses. They are strings and a
string compare is the only way to order them.
-Garry Williams
------------------------------
Date: Mon, 05 Oct 1998 17:17:07 -0400
From: dov1@drive.net (Dov)
Subject: Redirect Question
Message-Id: <dov1-0510981717070001@205.184.111.253>
Greetings,
Looking for an answer to the following problem:
How to redirect STDOUT to a memory buffer so that all print and other
outputs normally going to STDOUT will be diverted to this buffer (or, is
there a way to set STDOUT buffer to an internal new buffer).
What is the right Syntax for solving the above?
Thanks,
Yonatan.
------------------------------
Date: Mon, 05 Oct 1998 17:05:48 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Search for forwardslash...how?
Message-Id: <361942BC.7D55AC0E@tritechnet.com>
Kenneth Hunt wrote:
> I want to split a UNIX pathname at the forward slashs. How can I split
> this line:
<snip>
perldoc -f split
HTH!
--
Best Regards, | Psychotics are consistently
Tritech Marketing | inconsistent. The essence of
| sanity is to be inconsistently
Eric Von Zee | inconsistent.
Webmaster | -- Larry Wall
------------------------------
Date: 5 Oct 1998 22:05:57 +0100
From: Jonathan Stowe <gellyfish@btinternet.com>
Subject: Re: Search for forwardslash...how?
Message-Id: <6vbcbl$4ad$1@gellyfish.btinternet.com>
On Mon, 05 Oct 1998 10:21:49 -0700 Fred Richards <gadget@bc.sympatico.ca> wrote:
> <HTML>
> Kenneth Hunt wrote:
> <BLOCKQUOTE TYPE=CITE>I want to split a UNIX pathname at the forward slashs.
> How can I split
> <BR>this line:
>
I dont think that original post had any HTML in it whatsoever - of course
you might be taking the piss out of the vcard.
;-P
/J\
--
Jonathan Stowe <jns@btinternet.com>
Some of your questions answered:
<URL:http://www.btinternet.com/~gellyfish/resources/wwwfaq.htm>
------------------------------
Date: 5 Oct 98 22:38:08 GMT
From: Zenin <zenin@bawdycaste.org>
Subject: Re: send geroge reese (was Re: Call for Participation: Python Conference)
Message-Id: <907627276.940256@thrush.omix.com>
Abigail <abigail@fnx.com> wrote:
: Zenin (zenin@bawdycaste.org) wrote on MDCCCLIX September MCMXCIII in
>snip<
: ++ Luckely, there's a cleaner way: upgrade to 5.005+. With core
: ++ support for private fields, compile time field name checks, and
: ++ real exception object support.
:
: It remains a hack on a hack.
How so? Please explain. The only part I don't like is enforced
use of leading underscores to define private fields (which really
should have been done with to pragmas (use private/use public)
IMHO).
--
-Zenin (zenin@archive.rhps.org) From The Blue Camel we learn:
BSD: A psychoactive drug, popular in the 80s, probably developed at UC
Berkeley or thereabouts. Similar in many ways to the prescription-only
medication called "System V", but infinitely more useful. (Or, at least,
more fun.) The full chemical name is "Berkeley Standard Distribution".
------------------------------
Date: Mon, 05 Oct 1998 17:43:13 -0500
From: Jim Bostwick <jbostwic@valinor.cargill.com>
Subject: Re: sequential tracking numbers
Message-Id: <36194B80.1CE17161@valinor.cargill.com>
Keep the number in a file on the server. You can probably crib the code from your
favorite 'you are visitor number xxxx'. Assign the next number to a hidden field
each time your form is called up (so the form will have to be generated by a
cgi). You'll get 'holes' where user called up the form but never hit 'submit',
but every submission will have a unique number.
hth,
-j
chris@1x.com wrote:
> I have a client that would like forms submitted from their web site to have
> sequential tracking numbers. I can easily create the forms that will post the
> data that they want, but how can I increment and post a unique number with
> each submitted form?
>
> Thanks for your help,
>
> Chris
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: 5 Oct 1998 21:37:57 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Split question - retain the pattern?
Message-Id: <6vbe7m$s3f$1@marina.cinenet.net>
A.J. Norman (nja@le.ac.uk) wrote:
: I'm writing a script to parse text, and want to be able to split a block
: of text (an e-mail message for instance) into sentences. I can do
: something like this:
:
: @lines = <INFILE>;
: $text = join(" ", @lines);
That leaves the newlines in, of course, which may not be what you want,
given that you go to the trouble of space-separating the lines as well.
Just thought I'd mention that part; nothing to do with your question.
: @sentences = split(/[?.]\s+/, $text);
:
: This puts the entire message into one variable, and then splits it on a
: question mark or full stop followed by whitespace. But it eats the
: question mark or full stop - is there any way I can use split so that
: the splitting pattern is retained?
Did you read the doc on split? Quoting:
If the PATTERN contains parentheses, additional array elements are
created from each matching substring in the delimiter.
split(/([,-])/, "1-10,20", 3);
produces the list value
(1, '-', 10, ',', 20)
---------------------------------------------------------------------
| Craig Berry - cberry@cinenet.net
--*-- Home Page: http://www.cinenet.net/users/cberry/home.html
| "Ripple in still water, when there is no pebble tossed,
nor wind to blow..."
------------------------------
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 3896
**************************************