[19998] in Perl-Users-Digest
Perl-Users Digest, Issue: 2193 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 24 03:05:37 2001
Date: Sat, 24 Nov 2001 00:05:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <1006589109-v10-i2193@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Sat, 24 Nov 2001 Volume: 10 Number: 2193
Today's topics:
Re: Enigma encryption <wyzelli@yahoo.com>
Re: Enigma encryption <admin@asarian-host.net>
Re: Enigma encryption <godzilla@stomp.stomp.tokyo>
Re: Enigma encryption <admin@asarian-host.net>
Re: Enigma encryption <godzilla@stomp.stomp.tokyo>
Re: Enigma encryption <wyzelli@yahoo.com>
Re: Enigma encryption <admin@asarian-host.net>
Re: File position of of every word in a file <godzilla@stomp.stomp.tokyo>
Re: I can't figure out this syntax error <wyzelli@yahoo.com>
Re: I can't figure out this syntax error <wyzelli@yahoo.com>
Re: I can't figure out this syntax error <stevenjm@scatercreek.com>
Re: I can't figure out this syntax error (Garry Williams)
Re: I can't figure out this syntax error <stevenjm@scatercreek.com>
Re: I need help with a project... <dha@panix.com>
Re: Just wondering ... why is there no "since" informat <MichaelRunningWolf@att.net>
Re: modify arguments in a sub / function... (Tad McClellan)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 24 Nov 2001 12:16:18 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Enigma encryption
Message-Id: <hnDL7.3$cV2.163@vicpull1.telstra.net>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3BFE655F.8C1ACF30@stomp.stomp.tokyo...
>
> Are you preparing for another World War? If so, for the right price,
> my services as a Choctaw speaker are avaiable for true encryption.
"Security through obscurity is no security at all!"
Are you claiming that Choctaw can't be learnt? Or another Choctaw speaker
be hired to decipher your rantings?
Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';
------------------------------
Date: Sat, 24 Nov 2001 03:43:37 GMT
From: "Mark" <admin@asarian-host.net>
Subject: Re: Enigma encryption
Message-Id: <JHEL7.94662$2w.5568160@bin4.nnrp.aus1.giganews.com>
--
- Mark
System Administrator Asarian-host.org
---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3BFE655F.8C1ACF30@stomp.stomp.tokyo...
> Jonas Nilsson wrote:
>
>
> > The problem is that the average run time is 40-130 hours
>
> Beneath my signature you will discover a script which can be
> adapted to measuring any portion, portions or an entire script,
> if you have a DOS box available. For multiple measurements,
> just a matter of using my $start, $stop and subroutine call
> as needed within a script.
[snip]
> Are you preparing for another World War? If so, for the right price,
> my services as a Choctaw speaker are available for true encryption.
Speaking of availability, try:
use Benchmark;
Except, of course, as Jonas already indicated, he does not want to know how
long it takes to execute his script (he already knows that,) but where the
bottlenecks are. You need a fancier profiler for that than the DOS time. :)
Besides, time() leaps to mind, instead of needing a DOS box to parse the
output of a time command.
- Mark
------------------------------
Date: Fri, 23 Nov 2001 20:08:00 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Enigma encryption
Message-Id: <3BFF1D20.AF5107@stomp.stomp.tokyo>
Mark wrote:
> Godzilla! wrote:
> > Jonas Nilsson wrote:
> > > The problem is that the average run time is 40-130 hours
> > Beneath my signature you will discover a script which can be
> > adapted to measuring any portion, portions or an entire script,
> > if you have a DOS box available. For multiple measurements,
> > just a matter of using my $start, $stop and subroutine call
> > as needed within a script.
> [snip]
> Speaking of availability, try:
> use Benchmark;
> Except, of course, as Jonas already indicated, he does not want to know how
> long it takes to execute his script (he already knows that,) but where the
> bottlenecks are. You need a fancier profiler for that than the DOS time. :)
> Besides, time() leaps to mind, instead of needing a DOS box to parse the
> output of a time command.
As you know, I use benchmark very frequently. It is
fairly decent module which is a high compliment from
me; my opinion is almost all modules totally suck.
Truth is, almost all modules are cargo cult crap.
Nonetheless, your logic is questionable. The author
indicates run times ranging into days. Are you willing
to run benchmark for a thousand iterations, ten-thousand
iterations or maybe one-hundred-thousand iterations for
a code snippet of his which takes a mere one hour to
complete just one iteration? Well gosh, I suppose you
could time just those snippets which take only one
minute to complete, for ten-thousand iterations.
This would not take much time or, I don't think
you personally would take much notice.
Perhaps one of the brighter bozos around here will
help you to understand how ludicrous is your idea.
* wonders if a forty millisecond snippet would be a bottleneck *
Hmmm... forty milliseconds out of forty hours.
Yeah, probably should trim that snippet down to twenty milliseconds.
Godzilla! Queen Of Temporal.
------------------------------
Date: Sat, 24 Nov 2001 04:49:27 GMT
From: "Mark" <admin@asarian-host.net>
Subject: Re: Enigma encryption
Message-Id: <rFFL7.26583$YD.2329310@news2.aus1.giganews.com>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3BFF1D20.AF5107@stomp.stomp.tokyo...
> > Except, of course, as Jonas already indicated, he does not want to
> > know how long it takes to execute his script (he already knows that,)
> > but where the bottlenecks are. You need a fancier profiler for that
> > than the DOS time. :) Besides, time() leaps to mind, instead of
> > needing a DOS box to parse the output of a time command.
>
> As you know, I use benchmark very frequently. It is
> fairly decent module which is a high compliment from
> me; my opinion is almost all modules totally suck.
> Truth is, almost all modules are cargo cult crap.
And I suppose we should replace the Benchmark module with your "DOS parsed
time string"? I think not. :)
> Nonetheless, your logic is questionable. The author
> indicates run times ranging into days. Are you willing
> to run benchmark ...
You were not listening. I suggested he not run Benchmark at all, since he
needs a code profiler that will not just tell him how long his code runs,
but where it runs and where it crawls, so to speak. :)
> * wonders if a forty millisecond snippet would be a bottleneck *
Well, I hate to burst your bubble, but did it ever dawn on you that your
whole DOS parsed time thingy takes a wee more than a few miliseconds to
shell out to DOS? So, your "measurements are milliseconds" is worthless
even. If you must time a snippet of code, and you insist on not using
something like Benchmark, I bet you this is faster:
$start = time();
....
$stop = time();
$elapsed = ($stop - $start);
And takes care of your rollovers too.
> Perhaps one of the brighter bozos around here will
> help you to understand how ludicrous is your idea.
If so wise you are, then why proper sentences form you cannot? Actually,
some of the brighter bozos here have taught me a few things; but you are not
among them.
It may perhaps be that, in your opinion, "almost all modules totally suck,"
but replacing it with code that sucks even more is gonna make those modules
look good again. :)
Bye,
- Mark
------------------------------
Date: Fri, 23 Nov 2001 21:32:44 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Enigma encryption
Message-Id: <3BFF30FC.51930B84@stomp.stomp.tokyo>
Mark wrote:
> Godzilla! wrote:
(snipped)
> And I suppose we should replace the Benchmark module with your "DOS parsed
> time string"? I think not. :)
You said this, not me. Not real bright, are you? For you to
even entertain this thought is a direct reflection on your
relative intelligence.
> > Nonetheless, your logic is questionable. The author
> > indicates run times ranging into days. Are you willing
> > to run benchmark ...
> You were not listening.
Nope. As is typical for you as The CLPM Troll, you made
little sense. You are well noted for being less than
acceptably talented at expressing yourself.
This is why I consistently suggest you enroll in a Bonehead English class.
My extraordinary talent with words really pisses you off.
I enjoy this.
> Well, I hate to burst your bubble, but did it ever dawn on you that your
> whole DOS parsed time thingy takes a wee more than a few miliseconds to
> shell out to DOS? So, your "measurements are milliseconds" is worthless
> even. If you must time a snippet of code, and you insist on not using
> something like Benchmark, I bet you this is faster:
I hedged a bet your fragile masculine ego would motivate you to
make a fool of yourself, as always.
My method has an accuracy of better than plus or minus one millisecond.
When I originally posted this snippet earlier this year or
late last year, I provided explicit instructions on how to
use this method and attain very good accuracy.
My test script below and related printed results exemplify
an accuracy of better than one millisecond. In my original
article, I explained compensation for each DOS box would
need to be calculated. For mine, it is an average five
milliseconds for execution and return.
Other conditions and parameters were set for usage.
Look at my results. Multiple runs would reflect what you
see, as an average. Subtract five milliseconds and accuracy
is virtually an exact match for a Perl select method.
You never tested my method. I know this for an absolute fact.
It is clear with no doubt, you are blowing smoke out of your
arse, as always.
Challenge me on this. I will highlight again what a fool are you.
You are not a very bright boy, Frank.
Godzilla!
--
#!perl
print "Content-type: text/plain\n\n";
undef ($z);
$start = `echo.|time`;
select $z, $z, $z, .10;
$stop = `echo.|time`;
&Calculate_Time;
$start = `echo.|time`;
select $z, $z, $z, .50;
$stop = `echo.|time`;
&Calculate_Time;
$start = `echo.|time`;
select $z, $z, $z, .75;
$stop = `echo.|time`;
&Calculate_Time;
sub Calculate_Time
{
$start = substr ($start, 22, 5);
$stop = substr ($stop, 22, 5);
($second1, $millisecond1) = split (/\./, $start);
($second2, $millisecond2) = split (/\./, $stop);
if ($second2 > $second1)
{
$thousands = ($second2 - $second1) * 100;
$millisecond1 = $thousands - $millisecond1;
$runtime = $millisecond1 + $millisecond2;
}
else
{ $runtime = $millisecond2 - $millisecond1; }
print "Godzilla Runtime: $runtime milliseconds.\n\n";
}
exit;
PRINTED RESULTS:
________________
Godzilla Runtime: 16 milliseconds.
Godzilla Runtime: 55 milliseconds.
Godzilla Runtime: 83 milliseconds.
------------------------------
Date: Sat, 24 Nov 2001 15:05:27 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: Enigma encryption
Message-Id: <ujGL7.7$cV2.202@vicpull1.telstra.net>
"Mark" <admin@asarian-host.net> wrote in message
news:rFFL7.26583$YD.2329310@news2.aus1.giganews.com...
> "Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
> news:3BFF1D20.AF5107@stomp.stomp.tokyo...
>
> > Perhaps one of the brighter bozos around here will
> > help you to understand how ludicrous is your idea.
>
> If so wise you are, then why proper sentences form you cannot? Actually,
> some of the brighter bozos here have taught me a few things; but you are
not
> among them.
ROTFL!
Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_!=1)? 's':'';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';
------------------------------
Date: Sat, 24 Nov 2001 06:30:07 GMT
From: "Mark" <admin@asarian-host.net>
Subject: Re: Enigma encryption
Message-Id: <P7HL7.95682$2w.5661963@bin4.nnrp.aus1.giganews.com>
"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote in message
news:3BFF30FC.51930B84@stomp.stomp.tokyo...
> Mark wrote:
>
> > Godzilla! wrote:
>
> (snipped)
>
> > And I suppose we should replace the Benchmark module with your
> > "DOS parsed time string"? I think not. :)
>
> You said this, not me. Not real bright, are you? For you to
> even entertain this thought is a direct reflection on your
> relative intelligence.
>
>
> > > Nonetheless, your logic is questionable. The author
> > > indicates run times ranging into days. Are you willing
> > > to run benchmark ...
>
> > You were not listening.
>
> Nope. As is typical for you as The CLPM Troll, you made
> little sense. You are well noted for being less than
> acceptably talented at expressing yourself.
>
> This is why I consistently suggest you enroll in a Bonehead English
> class.
>
> My extraordinary talent with words really pisses you off.
Oh yeah, I am quaking in my boots. :) Your extraordinary talent with words
has really riled me. :) LOL
> > Well, I hate to burst your bubble, but did it ever dawn on you that
> > your whole DOS parsed time thingy takes a wee more than a few
> > miliseconds to shell out to DOS? So, your "measurements are
> > milliseconds" is worthless even. If you must time a snippet of code,
> > and you insist on not using something like Benchmark, I bet you this
> > is faster:
>
> I hedged a bet your fragile masculine ego would motivate you to
> make a fool of yourself, as always.
As "always"? I just got here! I guess you timed that with your DOS thingy,
eh? :)
> My method has an accuracy of better than plus or minus one millisecond.
Has it? Ok, I wasn't gonna do this; but lets do a little timing, shall we?
use Benchmark;
sub using_time {
$start = time ();
}
sub using_dos {
$start = `echo.|time`;
}
timethese (5000, {
atime => \&using_time,
bdos => \&using_dos,
});
Benchmark: timing 5000 iterations of atime, bdos...
atime: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
(warning: too few iterations for a reliable count)
bdos: 126 wallclock secs ( 2.34 usr + 11.44 sys = 13.78 CPU)
Ouch! :) Hmm, that averages to 25.2 miliseconds per DOS shell! (On a 1400
Mhz machine).
> Challenge me on this. I will highlight again what a fool are you.
Ok, consider yourself challenged. :)
> You are not a very bright boy, Frank.
That from someone who forgot my name mid-post does not sound too
threatening. :) Ok, I am gonna bale from this pointless thread. Lets just
say your incredible way with words has gotten the better of me, ok? :)
P.S. Your reputation not only precedes you, it seems to follow you too; not
sure which one is worse.
- Mark
------------------------------
Date: Fri, 23 Nov 2001 20:27:03 -0800
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: File position of of every word in a file
Message-Id: <3BFF2197.E5792853@stomp.stomp.tokyo>
Godzilla! wrote:
> Rob van Strien wrote:
(snipped)
> > How can I get the file position of each single word in a file?
> This is a pretty tough problem. You will discover tossing
> together a script to do this, to be a formidable task.
This one has kept my interest for a bit. Here is a cleaned
up version of my previous test script for you.
* as if he is even interested *
Previously I commented dealing with leading spaces, multiple
spaces within a line and trailing spaces, might be effected
via my do / until loop. After playing with this, I am leaning
more towards tossing all spaces into an array along with their
associated file positions. I believe this would lend better
to parsing out leading, multiple and trailing spaces while
retaining file positions for words.
Try a test file with unwanted spaces. Most are captured ok
with positions printed and length printed as zero, but
certainly not all! As I said, this is a formidable task.
A final analysis will most likely yield it is more efficient
to prepare data first, rather than working with it as is.
Same parameters and cautions as before, apply.
Godzilla!
--
"Do not pay any attention to what Godzilla says. It is
a troll, and has no decent working knowledge of Perl or
programming in general. Search groups.google.com to see
a history of its posts and replies to these posts."
- Frank Gostak of sfwest.com
TEST SCRIPT:
____________
#!perl
print "Content-type: text/plain\n\n";
open (TEST, "test.txt");
$position = 0;
while (<TEST>)
{
$tell = tell (TEST);
$start = $tell - length ($_) - 1;
do
{
$position = index ($_, " ", $position);
$position++;
if ($position > 0)
{ push (@Array, $position); }
}
until ($position == 0);
if (index ($_, " ") == -1)
{
$word = substr ($_, 0, length ($_) - 1);
$length = length ($word);
}
else
{
$word = substr ($_, 0, $Array[0] - 1);
$length = length ($word);
}
if (length ($word) == 0)
{
if ($start < 10)
{ $start = "0$start"; }
print "$start, 0 (No Word Found. Blank Line.)\n";
}
else
{
if ($start < 10)
{ print "0$start, ", length ($word), " $word\n"; }
else
{
if (index ($_, " ") == -1)
{ print "$start, ", length ($word), " $word\n"; }
else
{ print "$start, ", length ($word), " $word\n"; }
}
$start = $start + length ($word) + 1;
for ($iterate = 0; $iterate <= $#Array; $iterate++)
{
if ($iterate < $#Array)
{
$word = substr ($_, $Array[$iterate], $Array[$iterate + 1] - $Array[$iterate] - 1);
if ($start < 10)
{ print "0", $start, ", ", length ($word), " $word\n"; }
else
{ print "$start, ", length ($word), " $word\n"; }
$start = $start + length ($word) + 1;
}
else
{
$word = substr ($_, $Array[$#Array]);
chomp ($word);
if (($tell - length ($word)) < 10)
{ print "0", $tell - length ($word) - 2, ", ", length ($word), " $word\n"; }
else
{ print $tell - length ($word) - 2, ", ", length ($word), " $word\n"; }
}
}
}
@Array = ();
}
close (TEST);
exit;
CONTENT OF TEST.TXT:
____________________
one
two
three
four
five six seven eight
nine ten eleven twelve thirteen
fourteen
PRINTED RESULTS:
format is: position length word
________________
00, 3 one
05, 0 (No Word Found. Blank Line.)
07, 3 two
12, 5 three
19, 4 four
25, 0 (No Word Found. Blank Line.)
27, 4 five
32, 3 six
36, 5 seven
42, 5 eight
49, 4 nine
54, 3 ten
58, 6 eleven
65, 6 twelve
72, 8 thirteen
82, 8 fourteen
------------------------------
Date: Sat, 24 Nov 2001 12:11:30 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: I can't figure out this syntax error
Message-Id: <NiDL7.2$cV2.94@vicpull1.telstra.net>
"mike" <mjc@drizzle.net> wrote in message
news:qsntvtsr67e83pkam0e0106k62a2uj2di5@4ax.com...
> I'm writing a script to append data from a form input to a
> text file, and then to combine three text files into to an
> html file. Here's the script:
>
> #!usr/bin/perl
#!/usr/bin/perl -w
use strict;
use CGI::Carp qw(fatalsToBrowser); # will format nice error messages to
display in the browser when the 'die' occurs below.
> $head = "C:\Xitami\Pat-Acceptance\LAX\Head.txt";
> $body = "C:\Xitami\Pat-Acceptance\LAX\Body.txt";
> $tail = "C:\Xitami\Pat-Acceptance\LAX\Tail.txt";
> $gifts = "C:\Xitami\Pat-Acceptance\LAX\Gifts.html";
Either single quote those (no interpolation needed) or use '/' instead of \
(works on Windows). Currently the values aren't what ou think they are.
> %postInputs = readPostInput()
Missing ; at end of line.
You should also consider using CGI.pm since there is little point in
re-inventing the wheel.
> open (BODY, ">>$body");
What if the open fails (as it will because $body is not what you think it
is)
open (BODY, ">>$body") or die "Cant open $body $!";
> print BODY << "EOF";
> <tr>
> <td valign=\"Top\">
> $postInputs { 'Giver_Name'}
> <br>
> </td>
> <td valign=\"Top\">
> $postInputs { '$Gift_Name'}
> <br>
> </td>
> </tr>
>
> EOF
Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';
------------------------------
Date: Sat, 24 Nov 2001 12:24:24 +0930
From: "Wyzelli" <wyzelli@yahoo.com>
Subject: Re: I can't figure out this syntax error
Message-Id: <SuDL7.5$cV2.100@vicpull1.telstra.net>
"Wyzelli" <wyzelli@yahoo.com> wrote in message
news:NiDL7.2$cV2.94@vicpull1.telstra.net...
> "mike" <mjc@drizzle.net> wrote in message
> news:qsntvtsr67e83pkam0e0106k62a2uj2di5@4ax.com...
>
> > print BODY << "EOF";
> > <tr>
> > <td valign=\"Top\">
> > $postInputs { 'Giver_Name'}
> > <br>
> > </td>
> > <td valign=\"Top\">
> > $postInputs { '$Gift_Name'}
> > <br>
> > </td>
> > </tr>
> >
> > EOF
I should add that you don't need to escape double quotes in a here doc.
Wyzelli
--
#Modified from the original by Jim Menard
for(reverse(1..100)){$s=($_==1)? '':'s';print"$_ bottle$s of beer on the
wall,\n";
print"$_ bottle$s of beer,\nTake one down, pass it around,\n";
$_--;$s=($_==1)?'':'s';print"$_ bottle$s of beer on the
wall\n\n";}print'*burp*';
------------------------------
Date: Fri, 23 Nov 2001 19:52:05 -0800
From: "Steven M." <stevenjm@scatercreek.com>
Subject: Re: I can't figure out this syntax error
Message-Id: <3BFF1965.5010409@scatercreek.com>
mike wrote:
> I'm writing a script to append data from a form input to a
> text file, and then to combine three text files into to an
> html file. Here's the script:
>
> #!usr/bin/perl
> $head = "C:\Xitami\Pat-Acceptance\LAX\Head.txt";
> $body = "C:\Xitami\Pat-Acceptance\LAX\Body.txt";
> $tail = "C:\Xitami\Pat-Acceptance\LAX\Tail.txt";
> $gifts = "C:\Xitami\Pat-Acceptance\LAX\Gifts.html";
>
> %postInputs = readPostInput()
>
> open (BODY, ">>$body");
> print BODY << "EOF";
^
All the other comments (good ones too) aside,
there musn't be a space between the << and the
identifier.
Lose the space and see what happens.
......
s.
------------------------------
Date: Sat, 24 Nov 2001 05:23:42 GMT
From: garry@ifr.zvolve.net (Garry Williams)
Subject: Re: I can't figure out this syntax error
Message-Id: <slrn9vubn5.36q.garry@zfw.zvolve.net>
On Fri, 23 Nov 2001 19:52:05 -0800, Steven M. <stevenjm@scatercreek.com> wrote:
> mike wrote:
[ snip ]
>> open (BODY, ">>$body");
>> print BODY << "EOF";
>
> ^
>
> All the other comments (good ones too) aside,
> there musn't be a space between the << and the
> identifier.
>
> Lose the space and see what happens.
That would be true, if the sentinel were not quoted:
$ perl
print << "EOF"
hello
goodby
EOF
__END__
hello
goodby
$
--
Garry Williams
------------------------------
Date: Fri, 23 Nov 2001 22:27:25 -0800
From: "Steven M." <stevenjm@scatercreek.com>
Subject: Re: I can't figure out this syntax error
Message-Id: <3BFF3DCD.6000400@scatercreek.com>
Garry Williams wrote:
> On Fri, 23 Nov 2001 19:52:05 -0800, Steven M. <stevenjm@scatercreek.com> wrote:
>
>>mike wrote:
>>
>
> [ snip ]
>
>
>>>open (BODY, ">>$body");
>>>print BODY << "EOF";
>>>
>> ^
>>
>>All the other comments (good ones too) aside,
>>there musn't be a space between the << and the
>>identifier.
>>
>>Lose the space and see what happens.
>>
>
> That would be true, if the sentinel were not quoted:
>
Sadly,I posted this from memory and only remembered the bit about a
space being treated as a null identifier for unquoted terminating
strings. Probably because I don't use double quotes as it seems
pointless and I rarely use singles.
Sigh....
Anyway, thanks for correcting my mistake.
s.
------------------------------
Date: 24 Nov 2001 06:02:32 GMT
From: "David H. Adler" <dha@panix.com>
Subject: Re: I need help with a project...
Message-Id: <slrn9vudvo.5pl.dha@panix2.panix.com>
In article <f417bbc8.0111230514.18a3f999@posting.google.com>, J
Capenos wrote:
> Database scripts and admin area are already set up. I just need the
> following work done in conjunction with the existing scripts.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
http://jobs.perl.org may be of more use to you
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"There is a thin line between genius and insanity - I have erased that
line." - Oscar Levant
------------------------------
Date: Sat, 24 Nov 2001 03:06:19 GMT
From: Michael Running Wolf <MichaelRunningWolf@att.net>
Subject: Re: Just wondering ... why is there no "since" information in the man pages?
Message-Id: <wkvgg0x3yj.fsf@att.net>
Edwin Günthner <edgue@web.de> writes:
> Bernard El-Hagin wrote:
>
> Useful, but not the same:
Agreed: The Bolsky/Korn book "The Korn Shell" has similar
version-specific notations.
What Edwin suggested was a by-version list of features. What Bernard
asked for was a by-feature list of versions (possibly with
upgrade/bug-fix info).
--
Michael Running Wolf
MichaelRunningWolf@att.net -- All mammals learn by playing.
------------------------------
Date: Sat, 24 Nov 2001 04:08:50 GMT
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: modify arguments in a sub / function...
Message-Id: <slrn9vtv6t.1v5.tadmc@tadmc26.august.net>
MisterSoftware <moodie@fast.net> wrote:
>First off, thanks, Tad.
You're welcome.
>Yes, I meant to modify $s1, not $s2.
...
$_[0] =~ s/$s2[$i]//; # modify $_[0] (the 1st arg) instead of $s1
...
>I'm embarrassed to say I'm doing my development using Perlwindows,
What is Perlwindows?
Do you mean "Perl on Windows"? Is it ActiveState perl?
Using Windows is not embarrasing.
(less productive than is possible perhaps, but not embarrassing :-)
>so I
>don't have perldoc.
Now _that_ is embarrassing.
If you cannot access the standard documentation (over 1000 "pages")
that came with your perl distribution, then you should not post
here.
You are expected to check the docs *before* posting here, so you
must find where they got installed on your system if you want
to participate without your outer coating getting carmelized.
I'll bet the std docs are already on your hard drive somewhere.
Find out where.
They may be formatted as HTML pages with your perl distribution.
>I'll check perl.com and see if I can find anything
>there.
It will be the same info that you already have but cannot find :-)
>I've never seen the code structure C<@_> so I'll have to look at that one...
The "C<>" part is not Perl code, it is POD markup.
Pretend it said this instead:
Any arguments passed in show up in the array @_.
...
The array @_ is a local array, but its elements are aliases...
The "C<>" means format this part of the documentation as "code".
POD markup is described in:
perldoc perlpod
>I'm fiddling with passing references, but having trouble making it do what I
>want
If you use the alias ($_[0]) then you do not need references.
But I think it is better style to pass a real reference, I seldom
rely on the aliasing behavior the docs mentioned.
perldoc perlreftut
is a tutorial on using references in Perl. It is short and has
all you need to know to be able to pass/return real references.
>since (after reading a number of scolds on "use strict" and -w on the )
>I'm now ""use"ing"" strict".
Good. Very Good.
It may seem a pain at first, but it will pay you back many times
over by finding common mistakes for you automatically.
Stick with it until you get no warning or error messages at all
with warnings and strictures both turned on.
>I get some error
^^^^^^^^^^
That is not good enough.
We need to see the _exact_ error/warning message text, not
a paraphrase of it. Since you don't know what the problem
is, you are not qualified to paraphrase it. In summarizing
you may leave out something that is important.
>about "scalars...".
All of the messages that perl might issue are documented in
perldoc perldiag
If you get a message, you should look it up there as a first step
in troubleshooting.
Or, you can ask perl to look it up _for_ you by putting:
use diagnostics;
near the top of your program.
>But I
>did manage to get rid of several hundred warnings... Down to one
Good... keep going until that last one is gone :-)
>where I try
>to redirect my output to a file -or- STDERR (something about a "bare" string
^^^^^^^^^^^^^^^
There you go again.
We can't help you if you do not give us enough information.
Copy/Paste the exact message text if you want us to know
what you are talking about.
>???) kinky.
Put quotes around your strings. You have a string with no quotes somewhere.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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.
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 V10 Issue 2193
***************************************