[12994] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 404 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 6 14:07:18 1999

Date: Fri, 6 Aug 1999 11:05:12 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 6 Aug 1999     Volume: 9 Number: 404

Today's topics:
    Re: "use constant", not much fun (Anno Siegel)
    Re: $ARGV HELP... (Nightfever)
    Re: [Perl] How to find the Perl FAQ (Jon Bell)
    Re: [Perl] How to find the Perl FAQ (Michel Dalle)
    Re: a time to kill (Matthew Bafford)
    Re: a time to kill (Jerome O'Neil)
    Re: Activestate Perl/Dos? Question <cassell@mail.cor.epa.gov>
    Re: Activestate Perl/Dos? Question <cassell@mail.cor.epa.gov>
    Re: Anyone know how to use perl to parse data and gener <cassell@mail.cor.epa.gov>
    Re: Beginners question: printf %s justification <kims@emmerce.com.au>
    Re: Complex data structure (Jerome O'Neil)
    Re: Complex Extract HTML (LWP does not work) inlandpac@my-deja.com
    Re: Congressional Actions threatens programmer pay rate <cassell@mail.cor.epa.gov>
    Re: FAQ doesn't work in this case! inlandpac@my-deja.com
    Re: Help with a more elegant solution to common problem (Larry Rosler)
    Re: How [not] to be Y2K compliant <steven@ircnet.dk>
    Re: How [not] to be Y2K compliant <kims@emmerce.com.au>
    Re: How [not] to be Y2K compliant (Gary O'Keefe)
    Re: Is there any books on DBI? <cassell@mail.cor.epa.gov>
    Re: just days away f7.8ez5.88ox <cassell@mail.cor.epa.gov>
    Re: Making small changes to big files. <cassell@mail.cor.epa.gov>
    Re: Nastiness contrary to the spirit of perl? i_got@flamed.com
    Re: Nastiness contrary to the spirit of perl? dont_jump@on_me.com
    Re: Nastiness contrary to the spirit of perl? dont_jump@on_me.com
    Re: Nastiness contrary to the spirit of perl? (Anno Siegel)
    Re: Nastiness contrary to the spirit of perl? dont_jump@on_me.com
        Digest Administrivia (Last modified: 1 Jul 99) (Perl-Users-Digest Admin)

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

Date: 6 Aug 1999 16:19:46 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: "use constant", not much fun
Message-Id: <7of1v2$gbj$1@lublin.zrz.tu-berlin.de>

Rick Delaney  <rick.delaney@home.com> wrote in comp.lang.perl.misc:

>Constants are implemented using subroutines which are not interpolated
>in strings.  But you can't really expect a constant to be interpolated,
>regardless of how it's implemented.  If it were, how would you ever
>print the word, "FOO"?

 ...and if someone doesn't like it, they can tie read-only scalars.

Anno


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

Date: Fri, 06 Aug 1999 16:08:17 GMT
From: jose@nospam_nitefever.com (Nightfever)
Subject: Re: $ARGV HELP...
Message-Id: <37ab075e.15489935@news.idt.net>

Before the the if statements, try 

print "$ARGV[0]\n"

to see what it says....





if you want to email me, remove the "nospam_"

On Fri, 6 Aug 1999 08:35:35 -0400 , Dave Shaffer <shaffer2@ptd.net>
wrote:

>I have a PERL script that does different actions based on the argument
>it was called with.  For example, the following hyperlink calls the
>script with "Edit" as an argument.  The script works on a test box but
>the $ARGV variables are not getting set on the productin box.
>
><A HREF="notices.pl?Edit">Edit Notices</A>
>
>In notices.pl the following code looks for the argument passed and
>performs the appropriate action.
>
>if ($ARGV[0] eq "Edit") {
>   &editNotices;
>}elsif ($ARGV[0] eq "Update"){
>   &updateNotices;
>} else {
>   &displayNotices;
>}
>
>The $ARGV variable does not seem to getting set.
>
>Any ideas???
>
>



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

Date: Fri, 6 Aug 1999 16:50:27 GMT
From: jtbell@presby.edu (Jon Bell)
Subject: Re: [Perl] How to find the Perl FAQ
Message-Id: <FG1ys3.EFJ@presby.edu>

 Scott <codeman@gol.com> wrote:
>Hi,
>Id like to write a perl program to
>handle
>
>A list of teachers who on a certain date who recorded certain averages.
[snip]
>I need to update the dates in code and add the averages for each
>teacher on a certain date.

I'm sorry, this description doesn't give me (nor, I'll bet, anyone else
here) a clear picture of what you want to do.  Can you give an explicit
(short) example of the input data, and the desired output?

-- 
Jon Bell <jtbell@presby.edu>                        Presbyterian College
Dept. of Physics and Computer Science        Clinton, South Carolina USA
        [     Information about newsgroups for beginners:     ]            
        [ http://www.geocities.com/ResearchTriangle/Lab/6882/ ]


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

Date: Fri, 06 Aug 1999 17:36:04 GMT
From: michel.dalle@usa.net (Michel Dalle)
Subject: Re: [Perl] How to find the Perl FAQ
Message-Id: <7of6i0$5mv$1@news.mch.sbs.de>

In article <FG1ys3.EFJ@presby.edu>, jtbell@presby.edu (Jon Bell) wrote:
> Scott <codeman@gol.com> wrote:
>>Hi,
>>Id like to write a perl program to
>>handle
>>
>>A list of teachers who on a certain date who recorded certain averages.
>[snip]
>>I need to update the dates in code and add the averages for each
>>teacher on a certain date.
>
>I'm sorry, this description doesn't give me (nor, I'll bet, anyone else
>here) a clear picture of what you want to do.  Can you give an explicit
>(short) example of the input data, and the desired output?
>

Adding the averages (together) will probable give you a meaningless
number anyway, so why bother :-)

But you might use a nice little multi-level hash for this, for instance.

Did you look at perllol, perldsc (and perlref for good measure)
recently ? Oh, and don't forget Perl FAQ 4, that's quite a nice one too.

Michel.


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

Date: Fri, 06 Aug 1999 16:39:12 GMT
From: *@dragons.duesouth.net (Matthew Bafford)
Subject: Re: a time to kill
Message-Id: <slrn7qm2fr.ttv.*@dragons.duesouth.net>

[CC'd]

On 6 Aug 1999 09:41:27 -0700, Tom Christiansen <tchrist@mox.perl.com>
cut a telephone line, and tapped the following to comp.lang.perl.misc
using only his tongue: 
:     /\bdbi/b/:j
            ^

: --tom

--Matthew


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

Date: 6 Aug 1999 17:18:42 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
To: tchrist@mox.perl.com (Tom Christiansen)
Subject: Re: a time to kill
Message-Id: <7of5di$9ki$2@brokaw.wa.com>

[Posted and mailed]

In article <37ab0227@cs.colorado.edu>,
	Tom Christiansen <tchrist@mox.perl.com> writes:
> Two can play at that game.  I see that it's time to put together and
> post a comprehensive killfile again.
> 
> Here are my annotated suggestions for trn auto-kill and auto-select
> entries, grouped and explained.  Pick and choose as you will.  I imagine
> these will cause some flames, but I also imagine I won't be reading them,
> since most will trigger a kill rule.  :-)

[ Long and interesting killfile snipped ]

Just out of curiosity, on average, what percent of posts to c.l.p.m get
killed by your killfile?  I think it is a good indicator of the upper
bound on the newsgroup's DB level.

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.i-filezone.com


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

Date: Fri, 06 Aug 1999 10:42:29 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Activestate Perl/Dos? Question
Message-Id: <37AB1E85.87EBB440@mail.cor.epa.gov>

elephant wrote:
> 
> David Cassell writes ..
> >mknickelbein@my-deja.com wrote:
> >> But if there were errors, if will print to the screen and not to the
> >
> >And this is because errors go to STDERR instead, and '>' doesn't
> >redirect them.  There's no nice way aorund this if you insist on
> >sticking to a strictly-DOS solution.
> -
> >              ...Note that you can use open() in your perl program
> >to do the redirection of both STDOUT and STDERR to an output file,
> >even though you can't do it in COMMAND.COM .
> 
> I think that this may be a bit of misinformation David .. although I
> don't have a Win9x box to test on - so I cannot say conclusively for all
> versions of DOS
> 
> but my NT version of command.com - which is DOS supports the Bourne shell
> file-descriptor redirection thusly
> 
>   perl perlfile 1>outputfile 2>&1
> 
> I would call this a pretty "nice way" .. certainly no nastier than it's
> UNIX counterpart

Point taken.  But the original poster's page source indicated that he
was posting from a win98 machine.

David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 10:46:14 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Activestate Perl/Dos? Question
Message-Id: <37AB1F66.65843F8D@mail.cor.epa.gov>

mknickelbein@my-deja.com wrote:
> 
> Perhaps if I state my purpose there might be a totally easier way to do
> this:
> 
> I'm programming in a dumb programming language (not Perl) where I want
> to use Activestate's Perl results from running a Perl file in my
> program.
> With this dumb programming language, the only way I see doing this is
> by having Perl write it to a file, and then load that file up.
> 
> So, I made a .bat file, and I'd like it to be able to record any
> results from running Perl to a file.  Maybe there is an easier way to
> do this?  Maybe even with Perl somehow?? :)

A couple suggestions:

[1] if you want a .bat file, you can write your program in Perl, then
convert it to a .bat file using the pl2bat.bat program in your
Perl\bin directory on your machine.

[2] Perl is a better glue language than some not-to-be-mentioned
alternatives, so sometimes it is easier to go the *other* way and
let Perl read the file or output from another program.

HTH,
David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 10:52:27 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Anyone know how to use perl to parse data and generate excel reports  automatically?
Message-Id: <37AB20DB.2A6D18F1@mail.cor.epa.gov>

Eric Turner wrote:
> 
> I seriously doubt you'll be able to create native Excel file formats
> with Perl (are the MS Office file formats open to the public??). Excel
> will import comma-delimited files, however. Perhaps you could create a
> comma (or tab) delimited file, then import it into Excel.

Eric, you'll be pleased to learn that you can do just that, using
Perl's Win32::OLE module on a system where Excel is available.  You
can do a lot more, too.  Take a look at the section on "Using OLE with
Perl" in the ActiveState Perl FAQ.

Now don't you feel silly for saying something which the FAQs 
directly contradict?  :-)

HAND,
David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 6 Aug 1999 02:39:07 +1000
From: "Kim Saunders" <kims@emmerce.com.au>
Subject: Re: Beginners question: printf %s justification
Message-Id: <933957530.662452@draal.apex.net.au>

>Reading the manual is so much faster than waiting for Usenet followups.


Yeah, but then YOU have to do it yourself. A ng will deliver it on a plate
in your inbox in hours!

KimS



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

Date: 6 Aug 1999 16:49:58 GMT
From: jeromeo@atrieva.com (Jerome O'Neil)
Subject: Re: Complex data structure
Message-Id: <7of3nm$9ki$1@brokaw.wa.com>

In article <7oet75$nlt$6@info2.uah.edu>,
	gbacon@itsc.uah.edu (Greg Bacon) writes:
> In article <MPG.1214942a62975623989de8@nntp.hpl.hp.com>,
> 	lr@hpl.hp.com (Larry Rosler) writes:
>:              print "Code = $_\n" for @{$Codes{$Comp}};
>: 
>: is shorter and cleaner and won't get you talked about.  :-)
> 
> [whispered] Hey, everybody, come look at the CAPITAL LETTERS that this
> Larry Rosler guy uses in his variable names. :-)
 
I always knew Lary was a heretic.

-- 
Jerome O'Neil, Operations and Information Services
Atrieva Corporation, 600 University St., Ste. 911, Seattle, WA 98101
jeromeo@atrieva.com - Voice:206/749-2947 
The Atrieva Service: Safe and Easy Online Backup  http://www.i-filezone.com


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

Date: Fri, 06 Aug 1999 17:17:58 GMT
From: inlandpac@my-deja.com
Subject: Re: Complex Extract HTML (LWP does not work)
Message-Id: <7of5bq$g4a$1@nnrp1.deja.com>

In article <brian-0508992158430001@1cust161.tnt4.durham.nc.da.uu.net>,
  brian@pm.org (brian d foy) wrote:
> In article <7oca88$e9k$1@nnrp1.deja.com>, inlandpac@my-deja.com wrote:
>
> >After trying HTML::Parser and after trying all long-winded scripting
> >techniques I could think of to remove HTML tags, I have still come up
> >short of success.
>
> you're probably missing something in the way that you are trying to
> use HTML::Parser.  however, none of your three posts on this contain
> a code snippet or a good description of the problem.  it's hard to
> help under those conditions.

here is the code:

sub Get_Body_Text_Details
{
    $h->content_type('application/x-www-form-urlencoded');
    $h->content_length(length($c));

    $request = new HTTP::Request('GET', $URL, $h, $c);
    $failedCounter = 0;

LPC:$response = $ua->request($request);

    if ($response->is_success)
    {
          $tResponse = $response->content;
          &RemoveJavaScript();

          use HTML::Parse;
          use HTML::FormatText;
          $text = HTML::FormatText->new->format(parse_html
($tResponse));

          if($DISPLAY_MODE == 4)
          {
              print "$_\n";
              print "--------------------------\n\n";           }

          $bodyDetails = $text;

          open(HTML, "$MasterHTMLDirectory/
$PLAIN_TEXT_DETAILS_PAGE");           read(HTML,$_,50000);
          close(HTML);

          s/BODY_DETAILS/$bodyDetails/;
          s/SEARCH_KEYWORD/$keyword/;

          print $_;
    }

    else
    {
          $failedCounter++;

          if($failedCounter < $MAX_FAILED_ATTEMPTS)
          {
              goto LPC;
          }
              else
              {
                    open
(HTML, "$MasterHTMLDirectory/generic_message.htm");
                    read(HTML,$_,50000);
                    close(HTML);

                    s/GENERIC_MESSAGE/Could not connect to $URL/;

                    print $_;
              }
    }
}

Some of this was referenced from Tom's Perl Cookbook and FAQ pages and
the readme file that comes with the HTML::Parse file.

With this current code, I get results like:

[table not displayed][form not displayed], etc. with text that does not
fall between table tags, form tags, etc.

I need to display ALL text between ALL tags.

I am still very new to Perl, so I know that my syntax may be crud and I
probably have some stuff really screwed up here.

Thanks for any help.

Chad


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 06 Aug 1999 10:55:20 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Congressional Actions threatens programmer pay rates encore
Message-Id: <37AB2188.21C3CDF4@mail.cor.epa.gov>

Kim Saunders wrote:
[unattributed loony wrote:]
> >To my European friends I would say why don't you improve your own economy
[snip]

> Ooh! Socialists! Evil! You yanks wouldn't know a thing about politics, or
> anything remotely different from what you've got.  As proven by your stupid
> holy wars on communism, drugs, etc that haven't got you anywhere, and merely
> demonstrated your ignorance.

Calm down, Kim.  Just take a deep breath and remember.  This bozo
doesn't
*have* any `European friends'.  I doubt he has any friends whatsoever,
if
he has to post c@#p like this on usenet.

As an American who isn't insane, let me apologize for this schmuck.
Now just call him a Nazi, and we'll end the thread.  :-)
 
David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 17:09:55 GMT
From: inlandpac@my-deja.com
Subject: Re: FAQ doesn't work in this case!
Message-Id: <7of4sp$fmp$1@nnrp1.deja.com>

In article <Z0uq3.6$45.828@nsw.nnrp.telstra.net>,
  mgjv@comdyn.com.au (Martien Verbruggen) wrote:
> In article <7odjtr$d4o$1@nnrp1.deja.com>,
> 	inlandpac@my-deja.com writes:
>
> >           use HTML::Parse;
> >           use HTML::FormatText;
> >           $text = HTML::FormatText->new->format(parse_html
($tResponse));
>
> I never used HTML::FormatText myself, but is this how you're supposed
> to use it?
>
> # man HTML::FormatText
> [snip]
>     require HTML::FormatText;
>     $html = parse_htmlfile("test.html");
>     $formatter = HTML::FormatText->new(leftmargin => 0, rightmargin
=> 50);
>     print $formatter->format($html);
> [snip]
>
> Wouldn't that in your case become something like:
>
> use HTML::FormatText;
> my $fmt = HTML::FormatText->new();
> my $text = $fmt->($tResponse);
>
> (With the appropriate error checking on the construction and the
> format)

This returns a null (blank) result.  Nothing is displayed.

I think it would be best to try to find a way to get the text between
tags without the use of HTML::FormatText.

Isn't HTML::Parse or HTML::Parser supposed to do this?

The documentation shows great uses, but it still does not display the
text between the HTML tags correctly (if at all) and sometimes even
shows attributes within tags (where these tags are complex).


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


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

Date: Fri, 6 Aug 1999 09:27:20 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Help with a more elegant solution to common problem
Message-Id: <MPG.1214acc016b6e322989dea@nntp.hpl.hp.com>

In article <MPG.121390bfdf7db79c989689@nntp1.ba.best.com> on Thu, 5 Aug 
1999 13:15:28 -0700, Bill Moseley <moseley@best.com> says...
+ Larry Rosler (lr@hpl.hp.com) seems to say...
 ...
+    sub build {
+         my @regexp = @_;  # this MUST not be local(); need my()
+         my $expr = join '||', map { "m/\$regexp[$_]/o" } 
(0..$#regexp);
+         my $match_func = eval "sub { $expr }";
+ 
+         die if $@;  # propagate $@; this shouldn't happen!
+         return $match_func;
+     }
+ 
+ my @fields = qw/
+                 UCB.rank
+                 DC.identifier
+                 DC.subject
+                 DC.title
+                /;
+ 
+     my $find_fields = build( 
+             map { qq[<META NAME="$_" CONTENT="(.+)">/I] } @fields
+     );
+ 
+ That seems to build a good regular expression, and I assume that which
+ ever matches will end up in $1.

Not unless you put capturing parentheses in the regexes.
 
+ But then I have this problem:  How do I know WHICH of the regular 
expressions
+ matched?  What is returned in $1 has to be place in the correct slot.

The problem is that you made several regexes joined by '||'.  What you 
need it one regex, where each of the matches is delimited by capturing 
parentheses and joined by '|'.  Then $+ will give you the contents of 
the last match.

+ That is, I don't know what $fld is below.
+ 
+     foreach ( @$lines_ref ) {
+ 
+         if ( &$find_fields ) {
+ 
+             push( @{$content{$fld}}, $1 );
+         }
+     }
+ 
+ Also, sub build generates something like
+   m/$regexp[0]/o||m/$regexp[1]/o||m/$regexp[2]/o||m/$regexp[3]/o
+ 
+ Why use the array $regexp instead of just plain text passed to the
+ eval as with:
+ 
+ m/<META NAME="UCB.rank" CONTENT="(.+)">       ||
+ m/<META NAME="DC.identifier" CONTENT="(.+)">/ ||
+ m/<META NAME="DC.subject" CONTENT="(.+)">/    ||
+ m/<META NAME="DC.title" CONTENT="(.+)">/

Same difference, I would guess.

But I don't think constructing one or several chained regexes is the way 

to go for your particular problem.  The FAQ precompiles an array of 
regexes and then loops over them for each line, breaking out on a match.  

This seems more like what you want.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: 6 Aug 1999 16:21:32 GMT
From: steven <steven@ircnet.dk>
Subject: Re: How [not] to be Y2K compliant
Message-Id: <7of22c$dk7$3@news.inet.tele.dk>

On Fri, 6 Aug 1999 17:06:58 +0200, Alan J. Flavell wrote in comp.lang.perl.misc:

> For those with strong nerves, this posting to the WWW CGI group

The amusing part was that the author claimed credit for it being Y2K compliant.
I'm sure he meant 'complaint'.

>   if ($year == 99) {$fullyear = "1999";}
>   else {$fullyear = "20$year";}

-- 
steven


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

Date: Fri, 6 Aug 1999 02:24:59 +1000
From: "Kim Saunders" <kims@emmerce.com.au>
Subject: Re: How [not] to be Y2K compliant
Message-Id: <933956686.624320@draal.apex.net.au>

>Interesting word; I like it.  The OED calls it a dialectic form of
>"weevil".  There an Old English root of "wibb-" for beetle.
>
>It also also has this entry:
>
>    wibble-wobble 'wIb(<e>)l'wob(<e>)l, colloq., reduplication of
>    wobble (with vowel-variation symbolizing alternation of movement:
>    cf. zigzag); hence wibble as a simple word (conjoined with
>    wobble). So 'wibbly-'wobbly (also simply wibbly), wibblety-wobblety
>    adjs., characterized by `wibbling and wobbling', unsteady; also
>    'wibbly-'wobbly sb., in phr. all of a wibbly-wobbly (nonce-use).


Gee Tom, didn't realise you had so much spare time? I'd have though you were
to busy for this???

KimS



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

Date: Fri, 06 Aug 1999 17:50:22 GMT
From: gary@onegoodidea.com (Gary O'Keefe)
Subject: Re: How [not] to be Y2K compliant
Message-Id: <37ab1d18.206882897@news.hydro.co.uk>

Tom Christiansen wrote:

>     [courtesy cc of this posting mailed to cited author]
>
>In comp.lang.perl.misc, 
>    "Alan J. Flavell" <flavell@mail.cern.ch> writes:
>:Wibble.

[ lots of interesting (but all wrong) definitions deleted ]

>How were you using it?

Undoubtedly in the context of Roger Irrelevant - master of the
non-sequitur - a featured character in the esteemed British magazine
Viz, the last bastion of the once great British journalistic
tradition. Its use is as the ultimate non-sequitur, making no sense to
any reader, or Roger himself. E.g. "You, madam, are a haddock. Wibble.
Percy, be a good chap and fetch the secateurs."

You can find more examples at http://www.viz.co.uk/

Gary
--
Gary O'Keefe
gary@onegoodidea.com

You know the score - my current employer has nothing to do with what I post


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

Date: Fri, 06 Aug 1999 10:57:10 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Is there any books on DBI?
Message-Id: <37AB21F6.97036FD2@mail.cor.epa.gov>

John C. wrote:
> 
> Hi, I am new to perl and am wondering if there are any books on DBI or
> information available on the web.
> I have been looking now for about four straight hours and haven't found
> anything useful yet.
> 
> I would very much appreciate it if someone could show me the right
> direction on finding out how the DBI interface works.

If you go to www.perl.com you'll find a `SEARCH' facility.  Try
keywords like 'tutorial' or 'database' or 'mSQL' and check out the
URLs you are shown.  Pretty convenient, eh?

HTH,
David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 10:49:02 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: just days away f7.8ez5.88ox
Message-Id: <37AB200E.6E65C3B@mail.cor.epa.gov>

reject wrote:
> 
> This is your last warning! Read CAREFULLY and be edified:
[snip]

Oh.  The usual complaints from angry newbies.

>  The next three months are charted below for reference
>  (Hebrew calendar dates begin at sunset the day before):

Funny, *my* Hebrew calendar has totally different months.
 
>                          August
> 
>                 S   M   T   W   T   F   S
>                 1   2   3   4   5   6   7
>                 8   9  10  11* 12  13  14
[more really big snips]

Clearly, you want the Date::Manip::Insane::Nutbar module.

HTH,
David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 11:01:10 -0700
From: David Cassell <cassell@mail.cor.epa.gov>
Subject: Re: Making small changes to big files.
Message-Id: <37AB22E6.A36D8AD3@mail.cor.epa.gov>

Brian Orpin wrote:
> 
> Plenty of bits recently about not reading in big files to memory - fine.
> The thing I have never solved is how to make a small change to a big
> file.  I still labouriously go through each file, line by line looking
> for the item to do a substitution on writing each line out to a temp file
> then changing the name of the file at the end.
> 
> I know there must be a better (quicker) way to do this but I have never
> found it.

Other than automating the process in Perl, you mean?  [just kidding]

There isn't a convenient solution, unless you set things up to work
nicer ahead of time.  Either index the big file so you can find you
can find your line faster; or structure the big file so it is easier
to search; or else try the PSI::ESP module so you can seek() to the
*exact* line you need to change.

I keep trying #3, but I can't get it to work reliably.

David
--
David Cassell, OAO                               
cassell@mail.cor.epa.gov
Senior Computing Specialist
mathematical statistician


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

Date: Fri, 06 Aug 1999 16:35:01 GMT
From: i_got@flamed.com
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37ac0d3a.9184336@news.iag.net>

On 5 Aug 1999 23:40:05 -0500, abigail@delanet.com (Abigail) wrote:

>why@invite.spam (why@invite.spam) wrote on MMCLXVI September MCMXCIII in
><URL:news:37b92b8c.28213659@news.iag.net>:
><> 
><> Let me restate as a concept: Let the defective users drown (nature's
><> way). Help those who deserve it - those who help themselves, to a
><> reasonable degree. If you can't stand to hear the cries for help, plug
><> your ears.
>
>
>I really do loathe people who give advice, but don't follow it themselves.
>
>
>

Abigail: I belive you are reinforcing my point. If my discussions on
this concept really cause you feelings of loathing, then you are more
uptight than me. My coworkers would be surprised.

I _do_ follow my own advice/concepts. I do not bother jamming someone
who asks questions that they could, and _should_, answer on their own,
and thus learn from experience. I simply ignore them and go on to
posts that are relevant to me.

Gee, this IS a touchy bunch.




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

Date: Fri, 06 Aug 1999 17:06:53 GMT
From: dont_jump@on_me.com
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37b41626.11469181@news.iag.net>

On Fri, 06 Aug 1999 03:40:08 GMT, methabol@hem.passagen.se (Dan
Zetterstrom) wrote:

>On Fri, 06 Aug 1999 00:39:48 GMT, why@invite.spam wrote:
>
>>I am not choosing a side. I am simply stating my opinion that the
>>usefulness of this group is adversely affected by all of the
>>"unplesantness". Personally, I ignore lazy people, and let them
>>flounder - on usenet, and in the office. 
>
>So you gave up. The people here haven't, and you know why?
>
>Because they care.
>
>//DZ

No, I have not given up. My involvement in this group is only a month
old, and so far, it will continue. 

I started using Perl on Windows NT (ducking the objects lobbed in my
direction) recently, and only began my first real task this week. In a
single day, I accomplished 2 tasks:

1) Eliminated the necessity to mount a complex, bloated, set of
runtime libraries on a production database server, to be able to run
maintenance programs nightly.

2) Discovered a language that not only simplifies my sys admin tasks,
but I can use both for dynamic web pages (ASP+PerlScript), and server
side programs (Perl+CGI). These routines are very portable, even if I
see the light, and move to another O/S.

Why the revelation/advertising? I am no where from giving up. It just
seems that people here are very quick on the trigger.

I am not disagreeing with anyone on a conceptual level. I DO believe
that anyone who "programs" should taks reasonable measures to answer
their own questions. Otherwise, they continually rely on others to get
anything done, and must then go into management.

I am only suggesting alternatives. If you do not like or accept my
suggestions - OK by me.



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

Date: Fri, 06 Aug 1999 17:06:59 GMT
From: dont_jump@on_me.com
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37b5162d.11475761@news.iag.net>

On Fri, 6 Aug 1999 11:51:31 +1000, elephant@squirrelgroup.com
(elephant) wrote:

>if people are taking offense to the lusers (sorry - I'm not as 
>politically correct as you) when they respond with the less-than-polite 
>attitude .. then you're right - they should chill out

Where did you get the idea that I am a champion of political
correctness. I am not defending lazy newbies. I am suggesting that
they be ignored. It is by far easier to ignore someone when you cannot
hear them whine in real time.

>but I don't think that's the case .. I think you'll find that at the 
>other end of what appears to be frustrated indignation you'll find an 
>amused old-timer just trying to make a point .. it is true of me - and I 
>hope of most others - that we are NOT what we post

I guess in my case the perspective is different. In my world, I must
hand-hold users and managers, who are in close proximity, through
every time that they embark on a project, without knowing how first.
Worse yet, they cannot be required to use [F1-Help] or readme.txt or
anything else. If I could ignore my coworkers with a delete key or
killfile here, I would be in Nirvana.

>if your blood pressure rises .. then certainly you should avoid flaming 
>them .. for me - it makes me laugh .. both flaming them and reading other 
>flames .. and usually - somewhere in there (sometimes well hidden) there 
>is useful advice amongst the flames

My point is, my B.P. is NOT affected by usenuts. But it seems that far
too many here are. 

>regarding the "bad image" .. phht .. who cares ..

I care. I like the Perl language. I just wish some of the Perl people
were less hostile. But it will not keep my away from the language, or
newsgroup. I am not that sensitive.

>we're not here for a 
>beauty contest ..

This is very true.

>and if it discourages people from posting "how do I 
>remove all space characters from a string" questions .. even discourages 
>one a week .. then it's worthwhile

I suppose. I will not argue the point, even if I do not total agree
(which also means that I do not totally disagree).

>you don't see the irony here ? .. you found the culture appealing because 
>of the prepared documentation that you read .. the same documentation 
>that the hostile RTFMs are directing the infants to

I guess I prefer a Darwin-esque theory of professional computing: If
you are not smart enough to use all of the readily available
resources, then you WILL fail, eventually. Just like nature
documentaries, when the weak succumb to the elements they die, and I
go about my day.

>again .. I'm astounded at the irony .. essentially you seem to be saying 
>that because you don't want to ignore articles that cause you angst you'd 
>like others to ignore the luser posts and therefore stop posting

No..no..no - I am not expecting or demanding that anyone be required
to do anything. I simply made a suggestion, this I believe would
benefit everyone who _deserves_ it (deserves <- those who deserve
help, help themselves first).

>with all due respect - practise what you preach and switch off .. no one 
>forces you to read .. the lusers are forced to read in the hope that 
>someone has fed them a bone (which inevitably - someone keen on flexing 
>their new found "\s" knowledge - albeit inappropriate - will do)

Well, I think I will switch off of this thread. Further
discussion/argument will get none of us anywhere. I will continue on
in this group, because it IS useful. But I will tread carefully,
because, what I believe was a simple suggestion, has generated some
rather aggressve replys. No hate mail mind you, just some discussion
bordering on unplesant.

>here's how I see it - we all do whatever we want .. lusers post .. some 
>flame .. some help .. those who want to ignore ignore .. those who don't 
>don't .. and people like you and I stop these stupid conversations that 
>are completely off topic

YES - YES - YES !!!

>hold up a mirror .. you should relax about the flames as much as you 
>would like others to relax about the luser posts .. then this 
>conversation can end

I give up...

[click]



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

Date: 6 Aug 1999 17:14:53 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <7of56d$gh6$1@lublin.zrz.tu-berlin.de>

 <dont_jump@on_me.com> wrote in comp.lang.perl.misc:

>newsgroup. I am not that sensitive.

Oh.  And you prove that by cowering behind a fake identity of
"dont_jump@on_me.com"?

Anno


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

Date: Fri, 06 Aug 1999 17:34:01 GMT
From: dont_jump@on_me.com
Subject: Re: Nastiness contrary to the spirit of perl?
Message-Id: <37b619b3.12377768@news.iag.net>

On 6 Aug 1999 17:14:53 -0000, anno4000@lublin.zrz.tu-berlin.de (Anno
Siegel) wrote:

> <dont_jump@on_me.com> wrote in comp.lang.perl.misc:
>
>>newsgroup. I am not that sensitive.
>
>Oh.  And you prove that by cowering behind a fake identity of
>"dont_jump@on_me.com"?
>
>Anno

I knew this was coming. :) I know how some consider this bad form. I
accept responsibility for my improper behavior!

Two reasons - good or bad, right or wrong:

1) I am participating in a 'philosophical' discussion - one that
borders on the holy war subjects that pervade our industry. And since
my current impression is that unpopular beliefs often bring a storm of
disagreements, I am simply keeping the comments in usenet - not in my
e-mail box. I am not suggesting that everyone will spam me to death,
but the potential for a bad apple or two is present.

2) I am attepting, with little success, to keep the discussion
lighthearted, with a bit of cynical humor. All of the aliases I have
used in these posts are obvious inventions, everyone should see them
as invalid addresses. As far as fake identity goes, I consider an
obviously bogus address as an weak attempt at anonimity. Then when I
engage in practical Perl discussions, I hopefully will not have them
mixed up with the philosophical discussions.

Bad form, maybe. Against the rules, maybe. Cowering, I don't think so,
as I am openly responding to replies. I am not practicing a bomb and
hide technique.

But I stand by my methods, as too many here are just too quick to
judge _harshly_!




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

Date: 1 Jul 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 1 Jul 99)
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 V9 Issue 404
*************************************


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