[7157] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 782 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Jul 26 15:27:32 1997

Date: Sat, 26 Jul 97 12: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           Sat, 26 Jul 1997     Volume: 8 Number: 782

Today's topics:
     302 Redirection on Web page that use Frame <samsudin@pobox.com>
     Re: BUG: inheritance (Andrew M. Langmead)
     Cannot build 5.004 on Win32 (Jonathan Feinberg)
     Re: CGI href (Calle ]sman)
     Re: Date::Manip oddities? (+ 12 months) (Clay Irving)
     everything I've read on PERL and NT makes sense, but... <harry@icstrategies.com>
     Re: execute perl script with IMG SRC <rootbeer@teleport.com>
     Re: flock() function md4Xcalle@mdsXtud.chalXmers.se
     Re: Idea for a New Perl Book (Clay Irving)
     Re: Idea for a New Perl Book <mschilli@mission.base.com>
     MailTools-1.09 modules <lien@ares.csd.net>
     Re: NDS & Perl <rootbeer@teleport.com>
     Re: Net::FTP documentation and examples (Paul J. Schinder)
     Re: Net::FTP documentation and examples (Nathan V. Patwardhan)
     Re: Newbie: How do you call gzip from perl? (Clay Irving)
     Re: Newbie: Needs to know how to get script to read rem <rootbeer@teleport.com>
     Removing Carriage Returns??? (Burt Lewis)
     Re: Telnet & Perl, Reading Pictures (Bob)
     Re: Too many people in this group are arrogant #*(@# (R (Danny Aldham)
     Re: Too many people in this group are arrogant #*(@# (R <flavell@mail.cern.ch>
     Re: Too many people in this group are arrogant #*(@# (R <jhi@alpha.hut.fi>
     Re: Too many people in this group are arrogant #*(@# (R (Clay Irving)
     Using perl to copy JPG files <rbell@i4internet.com.au>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 26 Jul 1997 16:07:31 GMT
From: "Samsudin" <samsudin@pobox.com>
Subject: 302 Redirection on Web page that use Frame
Message-Id: <01bc99de$b2b188a0$507974cb@samsudik>

Hi 

I am having problems with the 302 redirection when I am working with frame.
I am using Perl 5 on  a Unix AIX.

Problems
-------------
User click on a submit button that POST a form to a CGI. The data are save
into database and user will be reditected using 302 redirection but the
problems arise because base on the input they either be directed out of the
frame or back to the start page (that is in the frame).

How do we do in the 302 redirecttion when there are frames ? I can get the
redirection to go back to the start page with frame but not out of the
frame (e.g to a pape that has not frame)

For hyperlinks I can specify TARGET=_parents or TARGET=_top but for CGI
redirection how do I do that.

E.g

print "Status: 302 ";
print "Location: http://www.test.com/register.cgi"
print "Content-type: text/html"

Appreciate any help or advice on the above matter.

Thanks

Samsudin
samsudin@cyberway.com.sg


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

Date: Sat, 26 Jul 1997 15:59:42 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: BUG: inheritance
Message-Id: <EDxoFI.5qt@world.std.com>
Keywords: STDIN,system,newgrp,id

Marek.Rouchal@-nospam-hl.siemens.de (Marek Rouchal) writes:

>I've stumbled across a bug in STDIN inheritance (Perl 5.00305, Sun
>Solaris 2.5.1): Consider this script:

You've stumbled accross stdio buffering.

>When the script is invoked as 'script < infile', the newgrp command does
>not get the 'id' command and exits without printing the ID.

The way that stdio libraries are often implemented, when a program
starts, it determines whether standard input is a terminal
device. When it is, it sets buffering for line buffering, if not it
uses block buffering.

When using line buffering, when you call an input operator, the
library uses the read system call to grab a lines of text, those lines
are put into the stdio buffers, and then passed back to the
application as needed. 

When using line buffering, the stdio library will grab large chunks of
data at a time. Usually a size that is efficient for the
filesystem. These large chunks will be stored in the stdio buffers,
and passed to the application as it requests them. This makes the
program run more efficiently, since it has to perform fewer read
system calls.

In your case, you asked perl for one line, and it grabbed the entire
file for future use.

I guess you could grab single characters via sysread() until you got
your first line. Or open a pipe between your perl script and the
newgrp command and pass it that data from STDIN.

use FileHandle;
open GROUP, "|newgrp $group" or die "Error: $!\n";

GROUP->autoflush();  # try to minimize that stdio buffering.
while(<>) {
  print GROUP $_;
}



-- 
Andrew Langmead


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

Date: 26 Jul 1997 16:11:51 GMT
From: jdf@pobox.com (Jonathan Feinberg)
Subject: Cannot build 5.004 on Win32
Message-Id: <5rd7k7$8af$1@gte1.gte.net>

I have meticulously followed the instructions for building the
latest 5.004 distribution on my NT box using dmake.  The build
fails during compilation of win32io.c with the following
error messages:

bcc32 -c -w -tWM -tWD -I.\include -I. -I.. -IC:\bc5\include -DWIN32 -DPERLDLL  
-O -D_RTLDLL -owin32io.obj win32io.c

Warning win32io.c 260: Suspicious pointer conversion
Warning win32io.c 295: Suspicious pointer conversion
Error win32io.c 296: Undefined symbol '_mkdir'
Error win32io.c 298: Type mismatch in redeclaration of 'chdir'
Error C:\bc5\include\dir.h 93: Earlier declaration of 'chdir'
Error win32io.c 299: Type mismatch in redeclaration of 'my_flock'
Error win32io.c 204: Earlier declaration of 'my_flock'
Error win32io.c 300: Declaration terminated incorrectly
Error win32io.c 301: Unexpected }
*** 7 errors in Compile ***
dmake.exe:  Error code 1, while making 'win32io.obj'

I'd appreciate any assistance, including pointers to a Fine
Manual that I may have missed.
-- 
Jonathan Feinberg    jdf@pobox.com    Sunny Manhattan, NY


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

Date: 26 Jul 1997 15:16:02 +0200
From: md4calle@md.chalmers.se (Calle ]sman)
Subject: Re: CGI href
Message-Id: <w7pd8o6dkdp.fsf@grosse.mdstud.chalmers.se>

Tim McGilvreay <allroy@wpi.edu> writes:

> 
> Hi,
> 	I am totally new to CGI and Perl so I was wondering if any of you
> out there might be able to help me out.  The basic problem is that I am
> trying to get a text link to refer to a CGI (this is not the problem), but
> only a specific subroutine of the CGI.
> 
> for example:
> 
> <a href="something.cgi but only a specific subroutine">Link</a>
pass an argument that decides which routine to call:
e.g.:
<a href="something.cgi?1">Link</a>
will call a routine

<a href="something.cgi?2">Link</a>
will call another routine


the code to put at top of something.cgi should be something like:

$rtnumber = $ARGV[0];

if ($rtrnumber eq "1"){
	&something;
}elsif ($rtrnumber eq "2"){
	&somethingelse;
}


all best,

-- 
/Calle
remove all X's from the mailadress if you want to reply


**************************************************************************
*         *         My homepage about the author Tom Holt:               *
*        /_\        http://www.mdstud.chalmers.se/~md4calle/holt/        *
*     { ~._.~ }                                                          *
*      (  Y  )      other things like OnLine Guitar Archive linkpage     *
*     ( )~*~( )     and heaps of musiclinks can be found at              *
*     (__)-(__)     http://www.mdstud.chalmers.se/~md4calle/             *
**************************************************************************



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

Date: 26 Jul 1997 11:53:49 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Date::Manip oddities? (+ 12 months)
Message-Id: <5rd6id$94h@panix.com>

In <33D00EE9.D29960A9@pvo.com> Thomas Winzig <tsw@pvo.com> writes:

>First let me just say Date::Manip is a WONDERFUL module! It has made
>so many things *much* easier. I appreciate the time Sullivan Beck
>has spent on it.

Me too! :)

>I am running Date::Manip version 5.10 on Perl for Win32 version 5.003
>build 306. NT 4 server. Timezone = Pacific Time. So far, all other date
>calculations appear to be working correctly.

>The project I'm working on now requires me to calculate due dates
>for billing. Let's say I start off with 1/31/97 and the person pays
>for 3 quarters (9 months). Then I need to calculate their next due
>date, which would be 10/31/97. A person can prepay for as many
>quarters as they want.

>Because I'm calculating due dates, I am using 'business mode' in
>&Date::Manip::DateCalc. My problem is that certain combinations of
>months will return dates that are 'too correct.' In other words,
>when I add 12 months to 1/31/97, I get 2/2/98. I think this is correct,
>but what I'm really after is 1/31/98. So:

>print &DateCalc("1/31/97", "+ 12 months", \$exp, 2);    # business mode

>The above would yield 1998020208:00:00.
>I need it to yield 19980131:00:00 (1 'business year').

>I have also set the $EraseHolidays variable, so I do not think
>holidays are factoring into this problem at all. I'm probably just
>missing something, but I've read the Date::Manip docs again and again,
>with no luck.

>I will hand code a subroutine if necessary, but I'd rather use
>Date::Manip for everything if possible.

You should write to Sullivan directly.

A few weeks ago I had a similar question:
  
   Subject: Re: Date:Manip DateCalc usage
      Date: 24 Jun 1997 12:21:24 -0400
      From: sbeck@cise.ufl.edu (Sullivan N. Beck)
        To: clay@panix.com (Clay Irving)



    > Take this program:

    >   #!/usr/local/bin/perl -w
    >   use Date::Manip;
  
    >   $today = ParseDate("today");
    >   $christmas = ParseDate("December 25th");
  
    >   for $mode (0..2) {
    >     print DateCalc($today,$christmas,$err,$mode);
    >     print "\n";
    >     if ($err) {
    >        print "$err\n";
    >     }
    >   }
  
   ...

    > When I run the program, I get:

    >   +0:0:185:9:22:54
    >   +0:6:2:9:22:54
    >   +0:6:2:0:0:0
  
    > When I uncomment the two holidays in my PersonalCnf file
    > (./.DateManip.cnf), I get:

    >   +0:0:185:9:22:21
    >   +0:6:2:9:22:21
    >   +0:6:2:0:0:0

    > No difference (except the time) -- Why isn't is calculating
    > business days correctly?
  
  The calculation in correct.  If you look at the delta produced, it says 6
  business months + 2 business days (+ time).  From today (Jun 24), 6
  business months + 2 business days from now is Dec 26 (or the following
  business day) if this falls on a weekend.  Basically, months go from the
  1st to the 1st, 10th to the 10th, so adding an extra holiday or two in the
  middle doesn't change anything.
  
  What it sounds to me like you were expecting is to find the number of
  business days between two dates, but that has not been implemented.  Hope
  this helps.
  
  BTW, if you have any further questions about Date::Manip, please send them
  to me rather than the newsgroup.  I'm the only official support for
  Date::Manip and I might miss it if you post it to the newsgroup.
  
  -- 
  ------------------------------------------------------------------------------
  Sullivan Beck        | CISE 314e        | This space reserved for some saying
   sbeck@cise.ufl.edu  | Univ. of Florida | demonstrating great wisdom, wit, or
   PH : (352) 392-1057 | Gainesville, FL  | insight.  I'll fill it in just as
   Fax: (352) 392-1220 |   32611          | soon as I have any of the above.
  ------------------------------------------------------------------------------

HTH,

-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

Date: Sat, 26 Jul 1997 11:20:25 -0400
From: Harry Schechter <harry@icstrategies.com>
Subject: everything I've read on PERL and NT makes sense, but...
Message-Id: <33DA15B9.DCC7003E@icstrategies.com>

I am trying to run PERL scripts on an NT machine running NS Fasttrack.
The perl scripts *seem* to be associated with PERL. That is, they run
from the command line (if you include the extension: test.pl <enter>).
However, when I try to call them from netscape on any machine, I get a
not found error. This is also evident in the server eror logs with this
message:

/shell-cgi/test.pl, shellcgi-send reports: can't find perl.exe for
execution

I have checked and rechecked the permissions on the directories
(/perl/bin, /public_html/shell-cgi, etc...) and the NS fastrack User. As
a side note, the script will run from Netscape if I call it from a batch
file in cgi-bin. C:\per\bin is set in the path variables for the system.

Any comments? I have exhausted my research efforts (I've done everything
by the book from netscape and my PERL docs -or so I think!). Any help
would be greatly appreciated.

Thanks,

Harry



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

Date: Sat, 26 Jul 1997 10:57:42 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: Stephen Hill <buck@huron.net>
Subject: Re: execute perl script with IMG SRC
Message-Id: <Pine.GSO.3.96.970726105339.5775L-100000@kelly.teleport.com>

On Fri, 25 Jul 1997, Stephen Hill wrote:

> I want someone to be able to execute one of my scripts from their
> webpage. SSI only works on the same server.
> 
> Is there a way to execute the script by someone having a IMG SRC tag on
> their page? 

There might be. It depends upon your server, though, so you should check
its docs. If that doesn't give you the answer, you should check in a
server newsgroup, or in their FAQ. (Since the answer would be the same if
your program were written in Fortran or Cobol, it's not really a Perl
question. In this case, it's a server question.) Good luck!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 26 Jul 1997 15:27:14 +0200
From: md4Xcalle@mdsXtud.chalXmers.se
Subject: Re: flock() function
Message-Id: <w7pbu3qdjv1.fsf@grosse.mdstud.chalmers.se>

I wonder if anyone can look at this small code and tell me if
it will lock as an semaphore or not ?


flock "viktor_a.db", 2; 
#critical section
dbmopen(%words,"viktor_a",0666); 
    foreach $wo (@words_in_line){
	if($words{$wo} ne ""){
	    $words{$wo}++;
	}else{
	    $words{$wo}=1;
	}
	
    } 
dbmclose(%words);     
seek "viktor_a.db", 0, 0;
#not critical


all best,

-- 
/Calle
remove all X's from the mailadress if you want to reply


**************************************************************************
*         *         My homepage about the author Tom Holt:               *
*        /_\        http://www.mdstud.chalmers.se/~md4calle/holt/        *
*     { ~._.~ }                                                          *
*      (  Y  )      other things like OnLine Guitar Archive linkpage     *
*     ( )~*~( )     and heaps of musiclinks can be found at              *
*     (__)-(__)     http://www.mdstud.chalmers.se/~md4calle/             *
**************************************************************************



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

Date: 26 Jul 1997 12:08:58 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Idea for a New Perl Book
Message-Id: <5rd7eq$bp1@panix.com>

In <33D98C83.1E42C201@hotmail.com> Larry D'Anna <ldanna@hotmail.com> writes:

>Tom Christiansen wrote:

>>     Title: "The Perl Cookbook" [tentative]
>>     Author: Tom Christiansen and Nathan Torkington.
>>     Publisher: O'Reilly
>>     ETA: 4Q97

>Cool, when will it be published?

"ETA" is an acronym for "Estimate Time of Arrival" :)

-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

Date: Sat, 26 Jul 1997 09:01:35 -0700
From: Michael Schilli <mschilli@mission.base.com>
Subject: Re: Idea for a New Perl Book
Message-Id: <33DA1F5F.296F6C5C@mission.base.com>

Mike Stok wrote:
> 
> In article <33D98C83.1E42C201@hotmail.com>,
> Larry D'Anna  <ldanna@hotmail.com> wrote:
> 
> >>     Title: "The Perl Cookbook" [tentative]
> >>     Author: Tom Christiansen and Nathan Torkington.
> >>     Publisher: O'Reilly
> >>     ETA: 4Q97
> >
> >Cool, when will it be published?
> 
> ETA: 4Q97 probably means estimated time of arrival fourth quarter of 1997,
> so it should be soon with the caveats that publishing companies and
> authors use the word "estimated" advisedly :-)
> 

4Q97 is the O'Reilly internal code name for July 1998 ... ;)

-- Michael

--------------------------------------------------------------------------
  Michael Schilli                        
http://mission.base.com/mschilli
--------------------------------------------------------------------------


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

Date: Sat, 26 Jul 1997 09:45:56 -0600
From: Oksana Lien <lien@ares.csd.net>
Subject: MailTools-1.09 modules
Message-Id: <33DA1BB4.3BF8@ares.csd.net>

Hello.
I'm looking for 2 small sample scripts that use the MailTools-1.09
modules.  Although I'm working on it, my understanding of Perl's
object-oriented constructs is weak and thats where my problems lie.

I'm on Sun Solaris 2.51.

Ex 1: A loop that opens mail and prints every message to standard out.
Ex 2: A loop that opens mail and forwards messages.

Any insight or help is appreciated.

Thanks,
John Lien
Boulder, CO
jlien@resdata.com
lien@csd.net


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

Date: Sat, 26 Jul 1997 10:52:46 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: kidddw@muohio.edu
Subject: Re: NDS & Perl
Message-Id: <Pine.GSO.3.96.970726105224.5775K-100000@kelly.teleport.com>

On Fri, 25 Jul 1997 kidddw@muohio.edu wrote:

> Just wondering if there were any perl scripts that worked with NDS. 

Probably. What's NDS? :-)

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 26 Jul 1997 12:09:03 -0400
From: schinder@leprss.gsfc.nasa.gov (Paul J. Schinder)
Subject: Re: Net::FTP documentation and examples
Message-Id: <5rd7ev$aon@explorer2.clark.net>

In <33D97FC8.4C0B95FF@babylon5fan.org> Keys <keys@babylon5fan.org> writes:

>Does anyone know of a more detailed set of documentation for Net::FTP? 
>I have been working with the example as given in the perldoc page, but
>it doesn't seem to work for me...  no errors or anything...  I haven't
>been able to get anything on CPAN for the last week or so either, as it
>appears that perl.com is having server problems...

Have you looked at the pod in Net::FTP itself?  If Unix, and if things
have been installed correctly, try "man Net::FTP".  If Mac, start up
Shuck and open :Net:FTP.pm.  If Windows, deep format your hard
drive(s) and install Linux.

>-- 
>Keys
>Spam sucks.  To reply, please change "org" to "com" in my return
>address...
>For my PGP key, mail me with "send PGP key" in the subject...
-- 
--------
Paul J. Schinder
NASA Goddard Space Flight Center
schinder@leprss.gsfc.nasa.gov


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

Date: 26 Jul 1997 18:38:22 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Net::FTP documentation and examples
Message-Id: <5rdg6u$r13@fridge-nf0.shore.net>

Paul J. Schinder (schinder@leprss.gsfc.nasa.gov) wrote:

: If Windows, deep format your hard drive(s) and install Linux.
[snip]

Aw c'mon! :-)  Sure I'm primarily a Unix user but that doesn't mean
the NT/Win95 port of Perl is useless.  In fact there's an excellent
port of 5.004_01 on CPAN in the nt directory - this port includes a
working version of pTk, and MakeMaker seems to work just fine if
you're using Visual C++.  I believe Net::FTP (and the entire libnet
distribution) is included with this port.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 26 Jul 1997 11:55:11 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Newbie: How do you call gzip from perl?
Message-Id: <5rd6kv$9gf@panix.com>

In <33D26396.9B4FC8B@aloha.net> David Sperling <rika@aloha.net> writes:

>I'm running perl from a UNIX shell account.  I can run gzip from the
>command line with no problem      i.e.. gzip myfile.txt.

>I'd like to know the code needed to run gzip from a perl script.

Could it be as simple as:

  `gzip myfile.txt`;


-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

Date: Sat, 26 Jul 1997 10:59:52 -0700
From: Tom Phoenix <rootbeer@teleport.com>
To: support@total.net
Subject: Re: Newbie: Needs to know how to get script to read remote web page
Message-Id: <Pine.GSO.3.96.970726105851.5775M-100000@kelly.teleport.com>

On Fri, 25 Jul 1997 support@total.net wrote:

> Subject: Newbie: Needs to know how to get script to read remote web page

    http://www.perl.com/CPAN/doc/FAQs/FAQ/html/perlfaq9/
          How_do_I_fetch_an_HTML_file_.html

Hope this helps!

-- 
Tom Phoenix           http://www.teleport.com/~rootbeer/
rootbeer@teleport.com  PGP   Skribu al mi per Esperanto!
Randal Schwartz Case:  http://www.rahul.net/jeffrey/ovs/



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

Date: 26 Jul 1997 15:35:43 GMT
From: burt@ici.net (Burt Lewis)
Subject: Removing Carriage Returns???
Message-Id: <5rd5gf$cgo$1@bashir.ici.net>

I have a script that's reading the input from an HTML form and I can't seem 
to remove ALL of the carriage returns. It may not be just the very last 
character, there could be some anywhere.  Since I'm writing this to a single 
line text file I need to strip them all away. 

print "<TR><TD><textarea Rows=8 Cols=65 name=\"body\" 
wrap=phsical></textarea></TD></TR>\n";

Appreciate any help on this.

Burt Lewis
burt@ici.net




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

Date: Sat, 26 Jul 1997 18:14:51 GMT
From: xxbbell@voicenet.com (Bob)
Subject: Re: Telnet & Perl, Reading Pictures
Message-Id: <33da3e0e.77775145@netnews.voicenet.com>

xewj@odin.sunquest.com wrote:
>It's simpler than that- telnet is defaulting to a 7-bit connection. The 8-bit
>chars in the jpg are either getting stripped or translated.
>You either need to explicitly set binary in the telnet session or don't use
>telnet.

	You could try using the Net::Telnet module.  It will resolve
any issues with permissions, and you may be able to get 8-bit
characters using binmode().
--
          - Bob
          http://www.voicenet.com/~bbell
          xxbbell@voicenet.com
          remove x's to reply


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

Date: 26 Jul 1997 08:33:16 -0700
From: danny@lennon.postino.com (Danny Aldham)
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <5rd5bs$fs8$1@lennon.postino.com>

Abigail (abigail@fnx.com) wrote:
: Mike Stok (mike@stok.co.uk) wrote on 1425 September 1993 in
: ++ As long as he learns to fish before he starves :-)  Where's the harm in
: ++ giving him a fish and offering him pointers on learning too?

: A lot if the best fishermen leave. That leaves the man with
: rotten fish, and a lousy technique.

It is time for someone to reel-in this analogy.

--
Danny Aldham           SCO Ace , MCSE , JAPH , DAD
I don't need to hide my e-mail address, I broke my sendmail.


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

Date: Sat, 26 Jul 1997 15:41:25 GMT
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <Pine.A41.3.95a.970726172806.36154E-100000@sp049>

On 25 Jul 1997, John Bokma wrote:

> Some postings use the FAQ like some holy bible, 

Yeah, well if someone asks a question that's answered in the Bible,
would you prefer to be pointed to the answer that's there, or given an
answer that somebody had made up?

FAQs have normally been reviewed by other practitioners, and represent
the considered opinion of some serious contributors.  Devising a one-off
answer to such a question, without any mention of the FAQ, is rarely
helpful.  When newbies finally get around to reading the FAQs they find
answers to many questions that they never realised they needed to ask. 
The sooner that happens, the better.  For them and for everyone else.

> and don't leave any room
> for thinking together about a solution.

Nonsense.  It's only by getting the standard questions out of the way
that room is made for thinking about solutions to more interesting
problems.  The continual noise level of seeing standard questions
answered wrongly or misleadingly by people who've never read FAQs, and
serious practitioners wasting their time having to step in to contradict
them, is one of the most frustrating aspects of usenet participation,
particularly since it became September all year around. 

> The FAQ *can* be wrong, or maybe incomplete 

Of course.  Then discuss it openly.  Contribute to the FAQ.
Work with the programme, not against it.



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

Date: 26 Jul 1997 18:47:46 +0300
From: Jarkko Hietaniemi <jhi@alpha.hut.fi>
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <oeehgdhddct.fsf@alpha.hut.fi>


: 1) What happens if the person doing the query would like to learn something
: other than how to use someone else's code? Some of us actually enjoy
: broadening our skill sets (chefs) instead of just churning out the order on
: the ticket (short order cooks).

Since when comp.lang.perl.misc became a free Perl training course?
Since when the best way to learn to write code became not learning to
read code?

: 2) How in the hell are better modules going to get wriiten if the same old
: stuff keeps getting reused? Insanely Great stuff rarely comes out of the
: 30th revision by the same author. You either have a good original idea the
: first time, or you don't.

I must be having a nightmare. <pinch> <sigh> Apparently I was not.
You obviously prefer rewriting every piece of code yourself and after
the first release throwing that away and restarting from scratch.
Preferably rewritten by yet another author so that any possibly
accumulated knowledge on the subject does not get inherited.

: 3) Most of the stuff on CPAN and perldoc is poorly, if not horribly,
: documented. People are really supposed to learn from that? I'd be out of a
: job if I churned out crap that horribly composed, and seriously consider
: firing anyone who expected me to accept it as a final draft.

As you are so brilliant you have no doubt told the authors what is
wrong with their documentation so that they could enhance it?

: 4) If the question is really beneath your dignity to reply to, climb off
: that shining white stallion of yours and ignore it instead of churning out
: 50 messages a day repeating the CPAN/www.perl.org/stonehenge mantra.

Do you seriously think somebody had the time to sit all day writing
full length answers to trivial/oft-repeated questions?  Who would pay
for that person?  Why do you think newsgroups, any newsgroups, have
FAQs?

If you think you can do better for free, stop yapping and start
answering those questions.  We'll see how long you can do that.
Think for a moment why do you not see Larry nor Tom any more in here.

-- 
$jhi++; # http://www.iki.fi/~jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen


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

Date: 26 Jul 1997 12:12:27 -0400
From: clay@panix.com (Clay Irving)
Subject: Re: Too many people in this group are arrogant #*(@# (Re: Checking for valid Email...)
Message-Id: <5rd7lb$c6n@panix.com>

In <EDwIJI.Hto@nonexistent.com> abigail@fnx.com (Abigail) writes:
>Clay Irving (clay@panix.com) wrote on 1424 September 1993 in
><URL: news:5ra9hq$s0a@panix.com>:
>++ 
>++ If the newbies don't know where to find the answer to a "Frequently Asked
>++ Question" they are referred to the FAQ. That's the purpose of the FAQ.
>++ 
>++ When I search DejaNews for "Perl FAQ" I have to read three articles before
>++ I found the URL for the Perl FAQ. It took about 15 seconds. It takes even
>++ less time and energy if you do the same search on AltaVista or Yahoo.


>You forgot to mention that the perl faq comes with the perl distribution.

I always forget to look under my nose...

-- 
Clay Irving <clay@panix.com>                   http://www.panix.com/~clay/


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

Date: Sun, 27 Jul 1997 02:50:19 +1000
From: Rick Bell <rbell@i4internet.com.au>
Subject: Using perl to copy JPG files
Message-Id: <33DA2ACB.3A57@i4internet.com.au>

Bit of a newbie to this - but here goes..

I am trying to write a program that will read a binary file (jpg or gif)
and copy it to another new file all using perl.  This is my first part
of a grander plan to take jpg files as input and write out to a database
with a few extra fields - eventual result to look like a database with
the following record structure (obviously variable length records)

name, age, department, photograph
where:
name=string
age=numeric
department = string
photograph= (encoded binary)

The following is my first attempt at copying jpgs via a list, however,
it doesn't seem to work..

Can someone assist me in oart 1 of my project?

Regards
Rick
rbell@i4internet.com.au


#!/usr/bin/perl

# Declare file locations
$infile  = "1.jpg";
$outfile = "new.jpg";

# Force automatic flushing
$|=1;

binmode($infile);
binmode($outfile);

open( INFILE,"<$infile" ) || die "can't open $infile: $!\n";

@thephoto = <INFILE>;    # read the whole file
open( OUTFILE, '>new.jpg' ) || die "can't open $outfile: $!\n";
print OUTFILE $thephoto;

close(INFILE);
close(OUTFILE);

# ----------------------------------------------------------
# End Of Program
# ----------------------------------------------------------


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 782
*************************************

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