[8560] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2177 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 25 07:07:20 1998

Date: Wed, 25 Mar 98 04:00:33 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 25 Mar 1998     Volume: 8 Number: 2177

Today's topics:
    Re: - Limiting the length of a list on a page..... - <James@cydaps.nospam.co.uk>
    Re: - Perl Script to Find & Display Matches.. - <James@cydaps.nospam.co.uk>
    Re: - Perl Script to Find & Display Matches.. - <James@cydaps.nospam.co.uk>
    Re: Any saner syntax for Objects? <tchrist@mox.perl.com>
    Re: Can I delete the files directory? <qdtcall@esb.ericsson.se>
        chown -h in Perl <schroede@informatik.uni-hamburg.de>
    Re: Copy file command. <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Directory listing on NT?? Arrgghh! (Martin Vorlaender)
    Re: Form Input <danjezek@pixi.com>
    Re: Form Textarea and \n issue <etmgero@etm.ericsson.se>
    Re: Function for adding days to a date ? <hell@puls06.desy.de>
    Re: Going Rates for PERL Programming??? (Jim Michael)
    Re: Hmm...STDIN & inetd, what's up? (Alan Curry)
        Interface to bp (Jean-Baptiste CAZIER)
        Netscape web server authentication problem <lewis@netvigator.com>
    Re: NT (Patrick)
        OLE Automation with Perl (Dale Marion)
    Re: Perl copy? <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: Perl copy? <qdtcall@esb.ericsson.se>
    Re: Perl copy? <tchrist@mox.perl.com>
        PERL HELP <n2154544@sparrow.qut.edu.au>
    Re: Perl versus Python benchmark-results (Abigail)
    Re: Print Out Image in CGI/PERL <Tony.Curtis+usenet@vcpc.univie.ac.at>
    Re: PROPOSAL: The Perl Dictionary <scribble@pobox.com>
    Re: PROPOSAL: The Perl Dictionary brian_r_parkes@hotmail.com
    Re: PROPOSAL: The Perl Dictionary (brian d foy)
        Relative address problem <mhchau@cse.cuhk.edu.hk>
    Re: Send Joke Script Help! <scribble@pobox.com>
    Re: what is wrong with being a novice ?? (Home)
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Wed, 25 Mar 1998 10:59:10 +0000
From: James <James@cydaps.nospam.co.uk>
Subject: Re: - Limiting the length of a list on a page..... -
Message-Id: <+fdcwBA+NOG1Ewac@cydaps.co.uk>

On Mon, 23 Mar 1998, Martin Vorlaender wrote:


>James (James@cydaps.nospam.co.uk) wrote:
>: I have a script that pulls details of the jobs for a specific agency
>: from a database of several agencies. The results are then displayed in
>: list format on the web page, but often each agency can have several
>: hundred jobs, and I was wondering how I could limit the list of jobs per
>: page. It would need to work in a similar manor to altavista or yahoo etc
>: where you can click a link to view the next 10 matches etc... I have the
>: script working and the format sorted, but I have not yet managed to work
>: out how to display 10 or 20 matches etc at a time...
>
>That's exactly what Randal Schwartz presents in his WebTechniques column
>#2 at http://www.stonehenge.com/merlyn/col02.html
>

Hi Martin,

Thanks for the URL, but when I tried it I got 404 file not found. I have
managed to find col16.html and col22.html but no col02.html at the
moment, any ideas??

Cheers

James

>cu,
>  Martin
>--




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

Date: Wed, 25 Mar 1998 11:01:37 +0000
From: James <James@cydaps.nospam.co.uk>
Subject: Re: - Perl Script to Find & Display Matches.. -
Message-Id: <ivWbMHARQOG1Ew6V@cydaps.co.uk>

On Mon, 23 Mar 1998, Wef wrote:


>Since you're storing all the found matches in a concatenated string
>($results) is no way to cascade the match output...
>
>You should re-write the script to store matches in an array.
>
>     if ($agency eq "ICL") {
>       push(@results,<tr><td align=center>$id</td>
><td>align=center>$agency</td> <td align=center>$title</td></tr>\n);
>       }
>
>Then you'll need to completely re-write the output portions....  Est.
>time to completion 2-4 hours..  Est. cost = 200-400 USD...
>
>JWefler
>wef@wef.net 
>
>On Mon, 23 Mar 1998 19:13:59 +0000, James <James@cydaps.nospam.co.uk>
>wrote:
>
I think I am beginning to see where I am going wrong now. I am only a
novice perl user and can cope with the simple things in life, but this
is pretty tricky stuff! Thanks for the help anyway, might have to come
back to you if still stuck!

Cheers


James


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

Date: Wed, 25 Mar 1998 11:04:48 +0000
From: James <James@cydaps.nospam.co.uk>
Subject: Re: - Perl Script to Find & Display Matches.. -
Message-Id: <j$GbIPAQTOG1EwbV@cydaps.co.uk>

On Mon, 23 Mar 1998, Roland Huss wrote:


>James <James@cydaps.nospam.co.uk> writes:
>
>> I guess that my method of 'storing' the matching vacancies is wrong, but
>> can anyone help me out on this one as I am desperately trying to get
>> this to work...
>
>Hey, you got it. I won't write your script (sorry, it's a mess), but I
>can point you to the holes, which I found and which you should fill.
>
>> foreach $pair (@details) { ($id,$agency,$title) = split(/_/, $pair);
>> 
>>         if ($agency eq "ICL") {
>>         $results .= "<tr><td align=center>$id</td> <td
>>         align=center>$agency</td> <td align=center>$ title</td></tr>\n";
>>         $matchcount++;
>>         }
>> }
>
>Here you  slurp in _all_ of your   matches at once,  in this  case all
>eleven. Remember, they are _all_ stored in $results from now on.
>
>                          # Not in a loop....
>>                         &PrintEntry;
>>                         .
>>                         .
>> sub PrintEntry {
>>         $Count++;
>>         next if ($Count < $FORM{'first'});
>>         last if ($Count > $FORM{'last'});
>>         print "$results";
>> 
>> }
>
>This doesn't make really any sense. Your aren't in a loop, so where do
>you want to escape from with  'last' or what is your  'next' item ? In
>any case, you will print $results, which, as mentioned above, contains
>all your matches (eleven so to speak). $Count++ doesn't make any sense
>either. (Ok, from now on, you have the big 'one' in it. Take good care
>of it ;-).
>
>Probably you could try the following:
>
>       o Don't generate the $results in advance.
>       o Instead, in this first 'split' loop, store the 
>         result in an array
>       o Use a loop like 
>           for $i ($i=$FORM{'first'};$i<=$FORM{'last'};$i++) {
>             $res .= "<funky>".$array[$i]."</funky>";
>            }
>
>          to generate $results within it.
>        o Count up your boundaries with your form field for the next 
>         page
>
>However,  these are  just  some    hints, and   might not  heal   your
>script. Maybe you  want to have  a look at  CGI.pm at CPAN, which does
>much  of  the work you  concentrated on  in  your  example, namely the
>generation of a valid  (and nice) CGI  response. Spare some time, read
>the manual and you will like it. Really.
>
>'hope this helps....


Hi,

Thanks for your help, guess the script is a total disaster! :-)

Shall see if I can make head or tail of the script after your help, if
not then consign it to the trash I think! :-)

Cheers


James




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

Date: 25 Mar 1998 10:49:53 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Any saner syntax for Objects?
Message-Id: <6fangh$77i$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, jkekoni@cc.hut.fi (Joonas Timo Taavetti Kekoni) writes:
:#why not return( pop @$$this{STACK} );? or even better
:# return ( pop @$this{STACK} ); but then $this would have to be %this, which
:# fails...

You have C brain damage.  In C, a prefix deref binds less tightly than
postfix bracketting.  In Perl, it works exactly the other way around!
This is covered in the perlref page rather clearly.

I happen to have a stack class somewhere in 

    http://language.perl.com/misc/CS-Talk.tar.gz

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    echo "ICK, NOTHING WORKED!!!  You may have to diddle the includes.";;
            --Larry Wall in Configure from the perl distribution


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

Date: 25 Mar 1998 10:20:28 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Can I delete the files directory?
Message-Id: <isk99j9ler.fsf@godzilla.kiere.ericsson.se>

Bin Shen <bshen@transdynamics.com> writes:

> Then, can I remove the files extracted from the "latest.tar" without
> impair the functionality of perl? Thanks.

Provided you installed somewhere else (as you did if you used the
defaults), yes.
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 25 Mar 1998 09:52:02 GMT
From: Ingo Schroeder <schroede@informatik.uni-hamburg.de>
Subject: chown -h in Perl
Message-Id: <6fak42$4n5$1@rzsun02.rrz.uni-hamburg.de>

Hi there,

just a simple question: how can I make Perl's chown mimic the command's option
-h which is used to change the owner of a symbolic link instead of 
the referenced file?

Thanks, Ingo


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

Date: 25 Mar 1998 09:06:50 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Copy file command.
Message-Id: <7x90pzjisl.fsf@beavis.vcpc.univie.ac.at>

Re: Copy file command., tufgar <tufgar@golden.net> said:

tufgar> Hi, Is there an actual command to copy or move files
tufgar> or do you have to write a small program?

use File::Copy

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"Everything I am, I learned on the back of cereal boxes" ~ RJ, "Over the Hedge"


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

Date: Wed, 25 Mar 1998 06:16:37 +0100
From: martin@RADIOGAGA.HARZ.DE (Martin Vorlaender)
Subject: Re: Directory listing on NT?? Arrgghh!
Message-Id: <35189335.524144494f47414741@radiogaga.harz.de>

Mark Polakow (mark@imp.net) wrote:
: In my program I have some code which is supposed to return the contents of a
: directory marking what are files and folders, and this works except that it
: also returns those annoying dots in the msdos style listing thinking they
: are directories too: (the . and ..)
: which indicate to go up a level, and I would like to exclude these annoting
: dots if possible in my program in the
: listing. Here is my code:

The standard idiom to do this is

opendir MYDIR, ...
@files = grep !/^\.\.?$/, readdir MYDIR;
foreach $file (@files) {...}
closedir MYDIR;

cu,
  Martin
--
                          | Martin Vorlaender | VMS & WNT programmer
 Ceterum censeo           | work: mv@pdv-systeme.de
 Redmondem delendam esse. |       http://www.pdv-systeme.de/users/martinv/
                          | home: martin@radiogaga.harz.de


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

Date: Tue, 24 Mar 1998 22:55:23 -1000
From: Dan Jezek <danjezek@pixi.com>
Subject: Re: Form Input
Message-Id: <3518C67B.35F8BC2E@pixi.com>

Thanks to all of you who have answered regarding this small problem.

I'm using a regular IBM PC with windows 95 on it and when I fill out the
HTML form which is located on my hard drive, I want it to run the perl
program which is also located on my hard drive.  (no networks are
involved here).  As far as I can tell, it's not even executing the pl
program.  Don't know why, perhaps it has something to do with making the
program executable which I don't have a clue how to do that.

> Here's the HTML form:
> 
> <FORM ACTION="c:\perl\bin\survey.pl" ...blah blah blah>
> 
> Here's the perl program:
> 
> #!/usr/local/bin/perl
> 
> $input = <STDIN>;
> open (OUTFILE,">test.txt") || die ("Error, Output file not found\n");
> 
> print OUTFILE ($input);


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

Date: Wed, 25 Mar 1998 09:26:30 +0100
From: Geert Roovers <etmgero@etm.ericsson.se>
Subject: Re: Form Textarea and \n issue
Message-Id: <3518BFB6.30F1@etm.ericsson.se>

The solution to this might not necessarily be in perl, but in HTML. It
works under Netscape 3.04 on UNIX anyway.

<textarea cols=50 rows=6 wrap=physical>
</textarea>

This way, a line that reaches the end of the box is automaticly wrapped
to the next line. The user won't have to enter his newlines himself, and
therefore, there will be no newlines. It's a kind of psychology :o)

There is one known problem. If I use this in an e-mail form, and
retrieve the mail in Netscape, the lines are not wrapped. I have to
choose "wrap long lines" from the "view" menu. I can live with that.

~Geert

Mick Knutson wrote:
> 
> I get the following text from a text area:
> 
[...]
> 
> If you notice that the user hits return and creates a \n newline many
> times.  I would like to know how to parse this out to create just
> formatting upon screen size with HTML.  It should look like this:
> 
[...]


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

Date: Wed, 25 Mar 1998 10:34:06 +0100
From: Otto Hell <hell@puls06.desy.de>
Subject: Re: Function for adding days to a date ?
Message-Id: <Pine.HPP.3.95.980325103059.2213A-100000@puls06.desy.de>

On Fri, 20 Mar 1998 ak@informatik.tu-cottbus.de wrote:

> Date: Fri, 20 Mar 1998 10:57:30 GMT
> From: ak@informatik.tu-cottbus.de
> Newsgroups: comp.lang.perl.misc
> Subject: Function for adding days to a date ?
> 
> Is there a function which can add x days/months/weeks to a given date ??
> 
Hello, here's my favorite, good for days, and then for weeks too:
I'll send you the code directly.

#!/usr/local/bin/perl

    $T        =   25;
    $M        =    3;
    $J        = 1998;
    $S_J      =    0;# no leap year
    print "heute:          $T, $M, $J, $S_J \n";

    $heute_J  = &DMY2Julian ($T, $M, $J, $S_J);
#                            heute julianisch
    print "heute, julianisch: $heute_J \n";

    $morgen_J = $heute_J + 1;
    ($T2, $M2, $J2, $S_J2) = &Julian2DMY ($morgen_J);

    print "morgen:         $T2, $M2, $J2, $S_J2 \n";

    $uebermorgen_J = $morgen_J + 1;
    ($T3, $M3, $J3, $S_J3) = &Julian2DMY ($uebermorgen_J);

    print "uebermorgen:    $T3, $M3, $J3, $S_J3 \n";

    $naechstewoche_J = $heute_J + 7;
    ($T4, $M4, $J4, $S_J4) = &Julian2DMY ($naechstewoche_J);

    print "naechste Woche: $T4, $M4, $J4, $S_J4 \n";


Mit freundlichem Gruss / Greetings / Bien a vous  Otto Hell
--
<Otto.Hell@desy.de>                                DESY - Abteilung ZDV
tel: 49 40 8998 2317                               Notkestrasse 85
fax: 49 40 8994 2317                               D 22603 Hamburg



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

Date: Wed, 25 Mar 1998 11:22:28 GMT
From: genepool@netcom.com (Jim Michael)
Subject: Re: Going Rates for PERL Programming???
Message-Id: <genepoolEqDGxG.KL7@netcom.com>

Zenin (zenin@archive.rhps.org) wrote:
: 	You're assuming (danger) that the code you're tweaking is actually
: 	well written, commented, documented, etc.  You're either living a
: 	charmed life, or you're vary delusioned...

I'm neither.  Failing well written, commented, documented code, we have
overstepped the bounds of tweaking, and entered the realm of rewriting,
commenting and documenting, and should be paid accordingly. 

J.


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

Date: 25 Mar 1998 06:49:33 GMT
From: pacman@defiant.cqc.com (Alan Curry)
Subject: Re: Hmm...STDIN & inetd, what's up?
Message-Id: <6fa9dt$cb2$1@usenet88.supernews.com>

In article <6f8t47$bvd$1@blackice.winternet.com>,
Michael Caerwyn  <mcaerwyn@winternet.com> wrote:
>Good Morning,
>
>    I am having an interesting problem. I am starting a script from
>inetd, then reading from STDIN to get some data from the client side
>of this script and I am then calling getpwnam and it "blows away" the
>STDIN variable, and makes the script useless.
>

[snip]

>  More strange notes:
>
>	+) When in a printf after getpwnam such as:
>
>	    printf("un :: %s  ||  nam :: %s\n", $un, $nam);
>
>	    the printed result is:  (get this)
>
> ||  nam ::
>
>	    The whole un :: %s disappears...I haven't see that one before.

Let me guess - you are testing the server using telnet.

A telnet connection is not the same as a plain TCP connection, even though it
is often used for general TCP testing purposes. One of the differences is
that in telnet, \r\n is used as the line terminator, which means if you
telnet to this server's port and type "pacman\n", the server will see
"pacman\r\n".

In your script you used chomp() to get rid of the \n, but the \r was still
there. Every time your printed the username variable, the trailing \r moved
the cursor to the beginning of the line. and the following stuff overwrote it
before you had the chance to read it. Unless you followed it with a \n, in
which case the cursor moved down so the username didn't get overwritten.

In short, the presence of a \r caused you to misunderstand what you were
seeing.

Do you want to use \r\n in this protocol? If you do, then you need to use
something other than chomp() to strip them off. If you don't, then you need
to use something other than telnet as a test client.
-- 
Alan Curry                                echo cnpzna@pdp.pbz | tr a-z n-za-m
Note that if I can get you to "su and say" something just by asking, you have
a very serious security problem on your system and you should look into it.
                                 -- Paul Vixie, in the INSTALL notes for cron


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

Date: Wed, 25 Mar 1998 09:47:10 GMT
From: jeanbap@alnus.slu.se (Jean-Baptiste CAZIER)
Subject: Interface to bp
Message-Id: <3518d284.10179641@news.slu.se>

Hi !

I have been using the bp library in Perl on my windoze95 machine and I
am very happy with it. 
It works well but i must say that it lacks an interface.

Did anybody had the good idea to write one ?
Or shall I spent the rest of my year to write one myself ?




Thanks


JB


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

Date: Wed, 25 Mar 1998 18:09:49 +0800
From: Lewis Chan <lewis@netvigator.com>
Subject: Netscape web server authentication problem
Message-Id: <3518D7ED.59F1FE7A@netvigator.com>

I've created an access control by using the Netscape web admin
interface. It actually created a .pag file under the authdb directory
and it works fine.

But I need to manipulate the authentication by some cron jobs. So I try
to make such file using the following perl script with same id and
password as I used in web admin.

#!/usr/local/bin/perl5

use Fcntl;
use NDBM_File;

dbmopen(%DB"./userdb/testing",0666);
$salt="im";
$pwd=crypt('lewis',$salt);
$REC{lewis}="$pwd";
dbmclose(%REC);
exit;

Unfortunately, it doesn't work. So, I compared the two files. What I
found is that only the header (actually first two charactors) of the
 .pag file is different. Anybody gonna help to solve this problem?


Lewis Chan
Email: lewis@netvigator.com



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

Date: Wed, 25 Mar 1998 20:44:11 GMT
From: 666@eudoramail.com (Patrick)
Subject: Re: NT
Message-Id: <6faqr7$5du$1@news.NL.net>

Vinnie <browns1@borg.com> wrote:

>We are running NT4.0 server on our machine.  Where can I get a verision
>of Pearl.exe that will run on my machine?

NT users should use Diamond 3.2




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

Date: Tue, 24 Mar 1998 21:55:48 -0800
From: DKMarion@sprintmail.com (Dale Marion)
Subject: OLE Automation with Perl
Message-Id: <MPG.f823c41887e7b5a989680@nntp.a001.sprintmail.com>

I've had some success with OLE automation and Perl, but I'm unable to 
convert the following WORD VBA script into Perl:

Documents.Open FileName:="c:\cgi-bin\source_data\er015600.doc", 
ConfirmConversions:=False,ReadOnly:=True, AddToRecentFiles:=False, 
PasswordDocument:="", PasswordTemplate:="", Revert:=False, 
WritePasswordDocument:="", WritePasswordTemplate:="", 
Format:=wdOpenFormatAuto

ActiveDocument.SaveAs FileName:="c:\cgi-bin\source_data\er015600.txt", 
FileFormat:=wdFormatText, LockComments:=False, Password:="", 
AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, 
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, 
SaveFormsData:=False, SaveAsAOCELetter:=False



Thanks in Advance


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

Date: 25 Mar 1998 09:07:13 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Perl copy?
Message-Id: <7x7m5jjiry.fsf@beavis.vcpc.univie.ac.at>

Re: Perl copy?, Peter <dbltall9@sprynet.com> said:

Peter> I'm new to perl.  Problem: I see lots of file
Peter> handling functions except for "file copy".

use File::Copy

-- 
Tony Curtis, Systems Manager, VCPC,      | Tel +43 1 310 93 96 - 12; Fax - 13
Liechtensteinstrasse 22, A-1090 Wien, AT | http://www.vcpc.univie.ac.at/

"Everything I am, I learned on the back of cereal boxes" ~ RJ, "Over the Hedge"


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

Date: 25 Mar 1998 10:21:23 +0100
From: Calle Dybedahl <qdtcall@esb.ericsson.se>
Subject: Re: Perl copy?
Message-Id: <isiup39ld8.fsf@godzilla.kiere.ericsson.se>

"Peter Hawkins" <dbltall9@sprynet.com> writes:

> Question: What is the common method for copying files in perl?  I can't
> believe there is not a function for doing this.  I'm on Solaris.

The File::Copy module, included with the distribution.
-- 
		    Calle Dybedahl, UNIX Sysadmin
       qdtcall@esavionics.se  http://www.lysator.liu.se/~calle/


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

Date: 25 Mar 1998 11:02:09 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Perl copy?
Message-Id: <6fao7h$8jh$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at> writes:
:Re: Perl copy?, Peter <dbltall9@sprynet.com> said:
:
:Peter> I'm new to perl.  Problem: I see lots of file
:Peter> handling functions except for "file copy".
:
:use File::Copy

Only if you don't care to figure out what went wrong.  That module is
broken in that it doesn't tell you what didn't work if there is an error.
Doing a manual copy with sysread and syswrite per the documentation,
or simply using system("cp") the way God and Dennis intended, is a
more robust solution.  And no, I don't care about Windows.  It's its
own punishment.

#!/usr/bin/perl
use Fcntl;

$DEFSIZE = 16 * 2**10;

($src, $dst) = @ARGV;

die "usage: $0 oldfile newfile\n" 	unless @ARGV == 2;

sysopen(SRC, $src, O_RDONLY)		|| die "can't open $src: $!";
sysopen(DST, $dst, O_WRONLY|O_CREAT|O_EXCL, 0666)
					|| die "can't open $dst: $!";

$bsize = (stat(SRC))[11];
$bsize = $DEFSIZE unless $bsize > $DEFSIZE;

while ($readcount = sysread(SRC, $buffer, $bsize)) {
    for ($offset = 0; 
	 $offset < length($buffer);
	 $offset += $writecount
	)
    {
	 $writecount = syswrite(DST, $buffer, length($buffer), $offset);
	 die "syswrite on $dst failed: $!"	unless defined $writecount;
    } 

} 
die "sysread on $src failed: $!" 	unless defined $readcount;
close(SRC)				|| die "can't close $src: $!";
close(DST)				|| die "can't close $dst: $!";
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    I won't mention any names, because I don't want to get sun4's into
    trouble...  :-)     --Larry Wall in <11333@jpl-devvax.JPL.NASA.GOV>


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

Date: Wed, 25 Mar 1998 17:00:41 +1000
From: RAKESH KARAN <n2154544@sparrow.qut.edu.au>
Subject: PERL HELP
Message-Id: <Pine.OSF.3.93.980325165421.15537A-100000@sparrow.qut.edu.au>


Hi all I need some help with my perl questions... they are pretty detailed
and I am kinda lost. I am using unix to run them. Ok from what I have been
told they will only take a 30 mins to do... all 4 of them. I have managed
to do some... Ok so if you are willing to help me out here... could you
please email me at rkaran@yahoo.com

I want to know the perl/cgi/html side of programming well enough to do
some commercial stuff... want to start my own business. I know the html
side fairly well... but need the perl/cgi side of programming. 
The questions I have been told are fairly simple to do... but I am
unfamilair with the syntax and need the help... so if you are willing...
to give me A HAND.. EMAIL ME AT 

RKARAN@YAHOO.COM


I WILL TRY AND REPAY YOU IF i CAN.

THANKS 
Rakesh Karan



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

Date: 25 Mar 1998 06:36:54 GMT
From: abigail@fnx.com (Abigail)
Subject: Re: Perl versus Python benchmark-results
Message-Id: <6fa8m6$7kf$1@client2.news.psi.net>

Thomas Ackermann (tgm@rhein.iam.uni-bonn.de) wrote on MDCLXVII September
MCMXCIII in <URL: news:6fa2in$raa@news.rhrz.uni-bonn.de>:
++ I tried to run a regex-test for perl and python.
++ Here's the result as a uuencoded tgz-file:
++ 
++ Any enhancement of perl or python code is appreciated	;-)
++ 


regex.pl:

#! /usr/bin/env perl

@pats = <STDIN>;
chomp @pats;
$pats = join('/||/o', @pats);
$pats = '/' . $pats . '/o';
eval qq(
while ( <> ) {
    print "\$ARGV:\$.:\$_" if $pats;
    close(ARGV) if (eof);
}
);
exit 0;


Shouldn't that be:
   $pats = join('/o||/', @pats);

in the third line of code?



Abigail
-- 
perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
          print grep {$_{$_}} @_' < /usr/dict/words


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

Date: 25 Mar 1998 09:06:01 +0100
From: Tony Curtis <Tony.Curtis+usenet@vcpc.univie.ac.at>
Subject: Re: Print Out Image in CGI/PERL
Message-Id: <7xafafjity.fsf@beavis.vcpc.univie.ac.at>

Re: Print Out Image in CGI/PERL, Jonathan
<Jonathan.larouche@enter-net.com> said:

Jonathan> I'm trying to output images from a cgi/perl
Jonathan> script: The Script only output the first Image....

Take a look at the modules

    GD and CGI and Chart

Jonathan> How can I print alla my image side to
Jonathan> side....???????

Well, that's an HTML issue, not perl.

hth
tony


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

Date: 25 Mar 1998 00:25:00 -0600
From: Tushar Samant <scribble@pobox.com>
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <6fa7vs$4a2@tekka.wwa.com>

nvp@shore.net writes:
>Ed Finch (efinch@vais.net) wrote:
>: Perl is going to take over the world. Therefore, the word perl and its
>: derivitives are going to become part of everyday speech, just as "dude"
>: is now. I propose the Perl Dictionary in order to establish - for those
>
>There's something of a Perl dictionary/glossary in the back of PP2; a
>great start me thinks.

What's "dude" mean?



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

Date: Wed, 25 Mar 1998 03:18:55 -0600
From: brian_r_parkes@hotmail.com
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <6fai4r$prm$1@nnrp1.dejanews.com>

In article <35187584.F3740951@vais.net>,
  Ed Finch <efinch@vais.net> wrote:
>
> Perl is going to take over the world. Therefore, the word perl and its
> derivitives are going to become part of everyday speech, just as "dude"
> is now. I propose the Perl Dictionary in order to establish - for those
> unfortunate enough not to know about perl - the proper use of the word.
> Sample entries:
>
> perlify (perl-i'fy), verb - 1) The process of converting an existing
> program or script into perl, for the obvious reasons. 2) The process of
> improving any person, place or thing by the addition of perl.
>
> perlification (perl-i-fi-ca'tion), noun - The superior result gained
> from the act of perlifying.
>
> perilified (perl-i'fied), past tense verb - E.g., "I perlified gcc and I
> get the tightest code ever".
>
> More entries, anyone?
> Ed
>
>

superlative (su-perl-a'tive), noun, adj. - The shortest possible Perl script
for any given problem.

perlfect (perl-fect) adj. - Applies to any software project after the
introduction of Perl as the programming language (opp. imperlfect)

Brian :)

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading


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

Date: Wed, 25 Mar 1998 06:06:01 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: PROPOSAL: The Perl Dictionary
Message-Id: <comdog-ya02408000R2503980606010001@news.panix.com>
Keywords: from just another new york perl hacker

In article <6fai4r$prm$1@nnrp1.dejanews.com>, brian_r_parkes@hotmail.com posted:

>superlative (su-perl-a'tive), noun, adj. - The shortest possible Perl script
>for any given problem.

imperlative - Perl as a project requirement.

perlambulate - stepping through your script with the debugger.
   see Chipmunk.

perl diem - payment for daily Perl work.

perlfidy - filching someone's Perl script.

perlilous - mucking with the internals or trying to understand Chip.

perlmeate - to introduce your cow-orkers to Perl.

perlplex - to obfuscate.  see Eli the Bearded.

perlsnickety - describing Perl hackers who argue the fine points.  
   see Abigail.

perlspicuous - clearly written Perl code or a clear explanation.
   see Tom Phoenix.

perlturbation - smalls tweaks in a script.

-- 
brian d foy                                  <comdog@computerdog.com>
Comprehensive Perl Archive Network (CPAN) <URL:http://www.perl.com>
Perl Mongers <URL:http://www.pm.org>


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

Date: 25 Mar 1998 08:31:31 GMT
From: Sleep <mhchau@cse.cuhk.edu.hk>
Subject: Relative address problem
Message-Id: <6fafd3$dd1@eng-ser1.erg.cuhk.edu.hk>

When I grab down another homepage and show in the browser using Perl, 
problem will occur when user click on those relative addresses as the 
broswer wrongly recognize the domain. Which way should I use to solve 
this problem ?
By changing the relative address to absolute address (how?) ?
Or ... by jumping to the homepage rather than get and show the html 
content (also how ?) ?

Thanks for ur help.

Regards,
Chau.


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

Date: 25 Mar 1998 01:02:55 -0600
From: Tushar Samant <scribble@pobox.com>
Subject: Re: Send Joke Script Help!
Message-Id: <6faa6v$83b@tekka.wwa.com>

abigail@fnx.com writes:
>-- 
>perl -we '%_ = map {local $_ = $_; y/a-z/n-za-m/; ($_, $_)} @_ = map {lc} <>;
>          print grep {$_{$_}} @_' < /usr/dict/words

Fat, long, slow, and redundant!

As opposed to, um, skinny, stubby, quick and gruff...

perl -wnle '$_=lc,$_{$_}?print:y,a-z,n-za-m,,$_{$_}++' < /usr/dict/words



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

Date: Tue, 24 Mar 1998 23:10:05 -0800
From: "Rick Brannan (Home)" <rbrannan#nospam#@oakharbor.net>
Subject: Re: what is wrong with being a novice ??
Message-Id: <6faav5$22u$1@gte2.gte.net>

DRS wrote in message <6f8v15$q91$1@toto.tig.com.au>...
>Kai Henningsen wrote in message <6qLXGyLXw-B@khms.westfalen.de>...
>>gebis@albrecht.ecn.purdue.edu (Michael J Gebis)  wrote on 20.03.98 in
><6euvl8$ed2@mozo.cc.purdue.edu>:
>>
>>> 1) Pull up the FAQ.  Use the search feature of your browser to look
>>> for relevant words.
>>
>>Browser, browser ... somehow I associate that with the web. What's wrong
>>with "man perlfaq"?
>>
>>Or any of the other mans, for that matter.
>
>
>What is wrong with it is that the vast majority of people - especially
>newbies - are not using UNIX.
>


Nothing's wrong with being a novice ... but if you plead "I'm a newbie" in
an effort to be lazy, not learn, and have other people do your work for you
 ... well, then that's a problem. The responses that point one toward the FAQ
(or even the manpages, which are distributed as HTML in the ActiveState
distribution, though there isn't a 1:1 correspondance) aren't simply
impolite brush-offs, they're pointing to a place that is known and reputable
to answer your question(s), and show you yet another resource the perl
community has so graciously provided for the *free* use of all. I'm grateful
for such responses when they come my way.

My $0.02, anyway.

_____________________
Rick Brannan
rbrannan-x@oakharbor.net
http://www.oakharbor.net/rbrannan
remove "-x" to email.






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

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 2177
**************************************

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