[8805] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 2422 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Apr 26 18:03:32 1998

Date: Sun, 26 Apr 98 15:00:29 -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           Sun, 26 Apr 1998     Volume: 8 Number: 2422

Today's topics:
    Re: 'each' and recursion, do they mix? <newsgroups@reza.net>
    Re: 'each' and recursion, do they mix? (Ilya Zakharevich)
    Re: Auto-generate HTML Tables <newsgroups@reza.net>
    Re: books for learning perl (Andrew M. Langmead)
    Re: Changing @INC <rootbeer@teleport.com>
    Re: Cron job and Date problem (Alan Voorhees)
    Re: Free http perl cgi windows95 practice platform (Andrew M. Langmead)
    Re: How strong is the perl crypt function ? (Ethan H. Poole)
        How to run perl in Windows 95? <myazdani@ichips.intel.com>
    Re: How to run perl in Windows 95? <rootbeer@teleport.com>
    Re: Image can view but cannot SAVE? <rootbeer@teleport.com>
        image size for jpg and/or gif <admin@hatsoft.com>
    Re: image size for jpg and/or gif <jdf@pobox.com>
        most recent NT port <elssa09@callisto.si.usherb.ca>
    Re: most recent NT port <elssa09@callisto.si.usherb.ca>
    Re: most recent NT port (Ethan H. Poole)
        Parsing HTML ... <anas@erols.com>
    Re: perl 5.004 is better than 5.004004 ?! <rootbeer@teleport.com>
    Re: perl 5.004 is better than 5.004004 ?! <captain@pirate.de.nospam-delete-this>
    Re: Perl experts!! help me!! <rootbeer@teleport.com>
    Re: QUESTION: How do I print file contents to screen? <rootbeer@teleport.com>
    Re: QUESTION: How do I print file contents to screen? (Paul)
    Re: QUESTION: How do I print file contents to screen? <rootbeer@teleport.com>
    Re: Sending a text file via perl <newsgroups@reza.net>
    Re: SendMail on NT <peter.bady@intel.com>
        Unique Sort (Henry Lifton)
    Re: using the USE command. <rootbeer@teleport.com>
        Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 26 Apr 1998 13:45:08 -0700
From: Reza Naima <newsgroups@reza.net>
Subject: Re: 'each' and recursion, do they mix?
Message-Id: <35439CD4.BF052304@reza.net>

Bart Lateur wrote:
> 
> Jean-Louis Leroy wrote:
> 
> >it seems that 'each' uses a single iterator per hash. That's
> >disappointing, and makes 'each' unsuitable for recursive algorithm that
> >iterate over the same hash at different levels of recursion.
> 
> >2) If not, what is the most efficient *and* reentrant way of iterating
> >over a hash, besides the obvious 'foreach my $val (keys %h)...'?
> 
> Urm... I doubt if it's efficient, but I'm sure it's reentrant. Make a
> local copy of the hash!
> 
>         local (%hash) = %hash;
> 
> HTH,
> Bart.


One nasty thing about each is if the has is actually a dbm file (don't
know what the technical term for that is -- tied?), and another script
modifies the dbm file while you're in a loop doing 'each' on it... don't
know exactly what happens, but problems definetly do happen.

Reza


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

Date: 26 Apr 1998 21:24:01 GMT
From: ilya@math.ohio-state.edu (Ilya Zakharevich)
Subject: Re: 'each' and recursion, do they mix?
Message-Id: <6i08lh$f07$1@mathserv.mps.ohio-state.edu>

[A complimentary Cc of this posting was sent to Jean-Louis Leroy 
<jll@skynet.be>],
who wrote in article <VA.00000030.00a10056@enterprise>:
> it seems that 'each' uses a single iterator per hash. That's 
> disappointing

Probably you did not think about it, did you?  WHERE do you want to
keep this info?  You have either keep it in %hash, in one of Perl's
internal stacks, or associated to the chunk of code.  There is NO
other place.

First choice is the current one, the other two will give non-intuitive
behaviour in *most* of the cases.

Without creating a new *iterator* object (which will keep this info)
what you want is just plain impossible.  And then you suddently
discover that you need to know what to do with iterator if the hash
changes... 

Ilya


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

Date: Sun, 26 Apr 1998 14:41:01 -0700
From: Reza Naima <newsgroups@reza.net>
Subject: Re: Auto-generate HTML Tables
Message-Id: <3543A9ED.F116FFDA@reza.net>

Jonathan Stowe wrote:
> 
> On Fri, 24 Apr 1998 11:12:06 -0600, johnvv@earthling.net wrote:
> 
> <snip>
> 
> > Has anybody created a script which automagically genetrates tables from
> > complex structures or flatfiles.  I would be very nice to HREF the cells in
> > the process.
> 

I've come up with a very simple approach....  you feed my module an
array of arrys, and it takes that and forms a table from it.  It's also
expandable.  for example, to create a report from DBI, you can do
something like


$q = $dbh->prepare('select name, phonenumber from address_book)' or die
($DBI::errstr);
$q->execute();

$table = new Table;
$table->{content} = [ {contentstyle->['font color=white','i'],
			style=>'bgcolor=blue',
			content=>['Name','Phone Number']
			}
			];

push @{$table->{content}}, @{$q->fetchrow_arrayref};

print $table->generate();

===

and that's all it takes to make a table, with a cool header.
let me know if there would be any interest in it.

Reza


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

Date: Sun, 26 Apr 1998 19:47:57 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: books for learning perl
Message-Id: <Es1Dnx.GED@world.std.com>

doswald@xmission.com (David Oswald) writes:

>There are a lot of great books on Perl; Perl for Dummies isn't really
>one of them.  For that matter, .*\s[fF]or\sDummies isn't generally the
>best book on any given subject.  It's only the book with the brightest
>colored cover.  You can't judge a book by its cover.

I was happy with the book "Wine for Dummies." It was certainly a lot
less dry (pun unintended) than many other books on the subject.

Their computer books, as I whole, I stay away from.

-- 
Andrew Langmead


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

Date: Sun, 26 Apr 1998 18:00:24 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Grimes <grimes@msn.com>
Subject: Re: Changing @INC
Message-Id: <Pine.GSO.3.96.980426105933.12179Q-100000@user2.teleport.com>

On Sun, 26 Apr 1998, Grimes wrote:

> How do I change the default @INC list of paths?

Check out the docs for lib.pm.

> I'm running Win32 Perl 5.004.  I've searched through the installed files
> to see where this is set up but cannot find it.  I've also searched
> registry keys, INI files, etc. 

If you want to make a new default, you'll want to recompile Perl. Hope
this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 11:00:10 -0800
From: radio@hotmail.com (Alan Voorhees)
Subject: Re: Cron job and Date problem
Message-Id: <radio-2604981100100001@nntp.best.com>

Thanks to all for the help! My initial thought that I had a date
recognition problem was wrong, but instead I needed an absolute path as
suggested by a couple people, since the crontab job was running from a
different place than the command line trials that worked.

Alan Voorhees


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

Date: Sun, 26 Apr 1998 19:45:24 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Free http perl cgi windows95 practice platform
Message-Id: <Es1DJo.FCD@world.std.com>

daniel.mendyke@digital.com (Daniel) writes:

>Please explain what you mean.  I don't understand
>why I don't need a server?  How will Netscape
>display the results without one?  

Well, depending on your circumstances, debugging your program does not
require you to see your formatted output. Raw HTML may suffice.

If you use the CGI.pm module, and the module determines that it isn't
being run from an HTTP server, it prompts the user for the parameters
to give the script. (Yet another good reason to use CGI.pm) But it
tends to get annoying having to type the commands in again and again.

Most knowledgeable programmers know that if they are frequently giving
the same input to a program that they are debugging, they can store
the input somewhere as an attempt to automate their debugging. In the
case of CGI.pm, one solution would be to save the input in a file, and
use the shell or command interpreters redirection facilities to pass
the input to the script. If you are debugging a CGI script and do need
to check how a browser may interpret the output, one solution would be
to save the output of the script to a file, and then load that HTML
file into the browser.

For example, this might be helpful to put in a .perldb file on a unix
machine when working on CGI projects. For an operating system that
fork a new process when using redirection, (read that as "if you are
using Windows") you may need to replace the "| tee", which will write
the output to both the screen and the file, to just ">" which will
write the file, but not display on the screen. 


my $cgi_output;
my $html_output;
BEGIN { 
    $cgi_output = "/usr/tmp/aml/cgi-tmp.$$.html";
    $html_output = "/usr/tmp/aml/cgi-out.$$.html";

    open SAVEOUT, '>&STDOUT' or die "Can't dup STDOUT: $!\n";
    open STDOUT, "| tee $cgi_output" or
	die "Can't re-open STDOUT: $!\n";
}

END {
    close STDOUT or die "Can't close STDOUT: $!\n";
    open STDOUT, '>&SAVEOUT' or die "Can't restore STDOUT: $!\n";
    open HASHEADER, $cgi_output or 
	die "Can't open temp file: $cgi_output: $!\n";
    open HTML, ">$html_output" or 
	die "Can't write HTML: $html_output: $!\n";
    while(<HASHEADER>) {
	print HTML if /^\r?$/ .. eof(HASHEADER);
    }
    close HASHEADER or die "Can't close $cgi_output: $!\n";
    close HTML or die "Can't close $html_output: $!\n";

    system "lynx $html_output";
}



If you don't care about about the small cosmetic glitch of seeing the
HTTP header at the top of the document, you can modify this to be
under a dozen lines.

Now if you aren't using CGI.pm (and there are few good reasons to do
so) you can develop your own test harness anyway. Write a small script
that will set up an environment similar to what the HTTP server
does. (Most of this involves simply setting some environment variables
and maybe setting up STDIN differently) and then call the script you
are testing.

Programmers as a whole realize that computers are designed to make
repetitive tasks easier. Those who do write programs automate their
repetitive tasks.
-- 
Andrew Langmead


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

Date: 26 Apr 1998 21:49:47 GMT
From: ehp@gte.net (Ethan H. Poole)
Subject: Re: How strong is the perl crypt function ?
Message-Id: <6i0a5r$c4k$1@gte2.gte.net>

In article <6scFmyvFZZB@wharp.rhein-main.de>, haert@wharp.rhein-main.de says...
>
>There is a built-in function "crypt" in perl. It resembles at the crypt  
>function in C and it guess that this is not as strong as PGP.
>
>But how strong is this really ? In other words: How many hours does it  
>take for an expert with a Pentium 300MHZ machine and the best known crypto  
>analysis program to decrypt such data ?

crypt is a hashing algorithm.  It isn't actually possible to "decrypt" a hashed 
value, though one may discover equivalent keys given sufficient processing 
time.  One of these equivalent keys *may* be the same as to original, but there 
will be no means of actually knowing such to be true.  Hashing is *not* the 
same as encrypting - hashing is a one way only function, there is no reversal 
algorithm to a proper hash function.

>Is it possible to apply this function to whole files ?

Sure, but because it hashes rather than encrypts, you won't be able to 
reassemble (e.g. decrypt) the resulting file at a later time.  What you are 
looking for is encryption, what you are inquiring about is hashing.


-- 
Ethan H. Poole            | Website Design and Hosting,
                          | CGI Scripting...
========Personal========= | ============================
* ehp @ gte . net *       | --Interact2Day--
http://home1.gte.net/ehp/ | http://www.interact2day.com/



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

Date: Sun, 26 Apr 1998 11:31:23 -0700
From: myazdani <myazdani@ichips.intel.com>
Subject: How to run perl in Windows 95?
Message-Id: <35437D7A.A5683613@ichips.intel.com>

Hi all,

Please help...

Could any of you help me run perl under windows 95? I have run it under
UNIX, is the procedure similar to that? I have downloaded and installed
perl32 for windows, and everything worked out fine. I just need to know
the procedure for running perl programs, do you need to do it at MSDOS
prompt?

Any suggestion will be appreciated.

My email is: myazdani@ichips.intel.com

Thanks...
Manzur.



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

Date: Sun, 26 Apr 1998 19:24:52 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: myazdani <myazdani@ichips.intel.com>
Subject: Re: How to run perl in Windows 95?
Message-Id: <Pine.GSO.3.96.980426122321.12179b-100000@user2.teleport.com>

On Sun, 26 Apr 1998, myazdani wrote:

> Could any of you help me run perl under windows 95? 

If you need help beyond what's in the release notes and
Perl-for-Win32-FAQ, please contact that FAQ's maintainer to get the
additional information added. Thanks! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 18:04:14 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: LM386 <stevenchan69@hotmail.com>
Subject: Re: Image can view but cannot SAVE?
Message-Id: <Pine.GSO.3.96.980426110147.12179R-100000@user2.teleport.com>

On Sun, 26 Apr 1998, LM386 wrote:

> Image can view but cannot be saved by right click of the mouse in the
> www browser? 
> how is the technique to make it possible?

If it's possible to tell a web browser to do this, the way should be
documented in the browser's docs and FAQs, or in the FAQ of a newsgroup
about browsers. If you can't find it there, you could ask in a newsgroup
about browsers. But please don't ask this again in a Perl newsgroup, since
this is not a question about Perl. Thanks!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 11:41:21 -0700
From: "Henry Wolff" <admin@hatsoft.com>
Subject: image size for jpg and/or gif
Message-Id: <35437f92.1@news.greatbasin.net>

I am working on my postcard scripts and I need to be able to check the
height and width of jpg and gif files before allowing people to submit
pictures for their use in the postcards.

Anyone have any ideas?

Thanks in advance.

Henry Wolff
Send Some Virtual Postcards - FREE
http://www.hatsoft.com/webcard/index.html




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

Date: 26 Apr 1998 17:34:18 -0500
From: Jonathan Feinberg <jdf@pobox.com>
To: "Henry Wolff" <admin@hatsoft.com>
Subject: Re: image size for jpg and/or gif
Message-Id: <d8e4fc0l.fsf@mailhost.panix.com>

[posted and mailed]
"Henry Wolff" <admin@hatsoft.com> writes:

> I am working on my postcard scripts and I need to be able to check the
> height and width of jpg and gif files before allowing people to submit
> pictures for their use in the postcards.

You want the Image::Size module, available at CPAN.

   http://www.perl.com/CPAN-local/

-- 
Jonathan Feinberg   jdf@pobox.com   Sunny Brooklyn, NY


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

Date: Sun, 26 Apr 1998 19:12:23 GMT
From: ELSS Admin <elssa09@callisto.si.usherb.ca>
Subject: most recent NT port
Message-Id: <3544C214.6440@callisto.si.usherb.ca>

Where can I find the most recent NT perl port?

I know about these:

ftp://sunsite.dcc.uchile.cl/pub/Lang/perl/CPAN/ports/win32/Standard/x86/perl5.00402-bindist04-bc.zip
http://www.perl.com/CPAN/authors/id/GSAR/perl5.00402-bindist04-bc.zip

I was hoping a more recent one may be in existence!

Natalie


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

Date: Sun, 26 Apr 1998 19:25:39 GMT
From: ELSS Admin <elssa09@callisto.si.usherb.ca>
Subject: Re: most recent NT port
Message-Id: <3544C530.1093@callisto.si.usherb.ca>

I'm receiving these errors - works great under my unix, but not on my nt
box. I blame the perl nt port:

The crypt() function is unimplemented due to excessive paranoia. at
c:\...\webbbs.pl line 313.

____________________________________________________
$newpassword = crypt($FORM{'newpassword'},"aa");
____________________________________________________

Isn't numeric in ncmp at c:\...\webbbs.pl line 584.
Argument "." isn't numeric in ncmp at c:\...\webbbs.pl line 584.
Argument ".." isn't numeric in ncmp at c:\...\webbbs.pl line 584.

_____________________________________________________________
reference to this:
		foreach $key (0..$length) {
			$char = substr($quotedtext,$key,1);
			$wrapcount++;
			if (($wrapcount > ($InputColumns-15))
			  && ($char eq " ")) {
				$char = "\n&gt; ";
			}
			print "$char";
			if ($char =~ /\n/) {
				$wrapcount = 0;
			}
		}


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

Date: 26 Apr 1998 21:52:12 GMT
From: ehp@gte.net (Ethan H. Poole)
Subject: Re: most recent NT port
Message-Id: <6i0aac$c4k$2@gte2.gte.net>

In article <3544C530.1093@callisto.si.usherb.ca>, elssa09@callisto.si.usherb.ca 
says...
>
>I'm receiving these errors - works great under my unix, but not on my nt
>box. I blame the perl nt port:
>
>The crypt() function is unimplemented due to excessive paranoia. at
>c:\...\webbbs.pl line 313.

The ActiveState (www.activestate.com) port for Win32 *does* support the crypt 
function.  Many other ports do not have such support builtin.

-- 
Ethan H. Poole            | Website Design and Hosting,
                          | CGI Scripting...
========Personal========= | ============================
* ehp @ gte . net *       | --Interact2Day--
http://home1.gte.net/ehp/ | http://www.interact2day.com/



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

Date: Sun, 26 Apr 1998 16:42:53 -0400
From: "Anas Mughal" <anas@erols.com>
Subject: Parsing HTML ...
Message-Id: <6i06fb$map$1@winter.news.erols.com>

Hi,
Does anyone has a script to parse HTML?
I need something very simple to extract all the headings and subheadings
from an HTML document.
Any leads would be appreciated.
Thank you in advance.
--
Anas Mughal




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

Date: Sun, 26 Apr 1998 19:21:18 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Mark Seuffert <captain@pirate.de.nospam-delete-this>
Subject: Re: perl 5.004 is better than 5.004004 ?!
Message-Id: <Pine.GSO.3.96.980426121830.12179Z-100000@user2.teleport.com>

On Sun, 26 Apr 1998, Mark Seuffert wrote:

> Number found where operator expected at ./mhttpd line 116, 
>  near "getprorequire 5.0"        
>  (Do you need to predeclare getprorequire?) 

> And this is line 115 and 116:
>  $sockaddr = 'S n a4 x8';
>  ($name, $aliases, $proto) = getprotobyname('tcp');

If that's really what you have, that looks to me as if your perl binary
may have been miscompiled. Try compiling it "from scratch", and pay
special attention to any answers you give which aren't the defaults. 

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 23:57:12 +0200
From: Mark Seuffert <captain@pirate.de.nospam-delete-this>
Subject: Re: perl 5.004 is better than 5.004004 ?!
Message-Id: <3543ADB8.5E1F@pirate.de.nospam-delete-this>

Tom Phoenix wrote:

> If that's really what you have, that looks to me as if your perl 
> binary
> may have been miscompiled. Try compiling it "from scratch", and pay
> special attention to any answers you give which aren't the defaults.

Don't know what "from scratch" means... but what I can say:
I downloaded a fresh perl, did "make realclean", watched for warnings
while compiling, tried different configurations... but nothing
unnormal to report (beside the strange errors).

Now I will install a complete fresh linux (mine is one year old) and
hope this will help....... or I jump from a cliff..... :)

-- 

/Mark (EMailadresse ab ".nospam" lvschen)
http://home.pages.de/~irc ~html ~unix


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

Date: Sun, 26 Apr 1998 19:17:23 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Tau Kim <thee@pcrc.hongik.ac.kr>
Subject: Re: Perl experts!! help me!!
Message-Id: <Pine.GSO.3.96.980426121530.12179Y-100000@user2.teleport.com>

On Sun, 26 Apr 1998, Tau Kim wrote:

> Subject: Perl experts!! help me!!

Please check out this helpful information on choosing good subject
lines. It will be a big help to you in making it more likely that your
requests will be answered.

    http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post

>  But in other languages except C, I don't know how to mesure the time
> during the loop is performed.

I believe that the FAQ has an entry which may be of some help to you. Good
luck!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 18:06:29 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: David Joyce <djoyce@netunlimited.net>
Subject: Re: QUESTION: How do I print file contents to screen?
Message-Id: <Pine.GSO.3.96.980426110430.12179S-100000@user2.teleport.com>

On Sun, 26 Apr 1998, David Joyce wrote:

> How do I print the contents of a file to screen?  For instance, I have a
> log-file .txt file that I want to print out to screen, along with any
> entries I have just appended.  Do I use <STDOUT>? 

Probably not. You should almost certainly just open the file (checking for
errors, of course), read the data, then print what you want to print. Are
you having trouble with one of those tasks? If so, let us know which one
is giving you difficulty.  Thanks! 

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 18:05:17 GMT
From: paul@cytech.net (Paul)
Subject: Re: QUESTION: How do I print file contents to screen?
Message-Id: <35437731.4933202@nntp.bestweb.net>

On Sun, 26 Apr 1998 05:45:11 -0400, "David Joyce"
<djoyce@netunlimited.net> wrote:

>How do I print the contents of a file to screen?  For instance, I have  a
>log-file .txt file that I want to print out
>to screen, along with any entries I have just appended.  Do I use <STDOUT>?
>

Easiest way:

open(FILEH,"whatever.txt");
while (<FILEH>) {
	print;
}
close(FILEH);

Paul.



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

Date: Sun, 26 Apr 1998 19:23:10 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: Paul <paul@cytech.net>
Subject: Re: QUESTION: How do I print file contents to screen?
Message-Id: <Pine.GSO.3.96.980426122249.12179a-100000@user2.teleport.com>

On Sun, 26 Apr 1998, Paul wrote:

> open(FILEH,"whatever.txt");

Even when your script is "just an example" (and perhaps especially in that
case!) you should _always_ check the return value after opening a file.
Thanks.

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

Date: Sun, 26 Apr 1998 13:50:11 -0700
From: Reza Naima <newsgroups@reza.net>
Subject: Re: Sending a text file via perl
Message-Id: <35439E03.89A001F4@reza.net>

The only thing i can think of is if you're setting a 
content-type.  try adding

print "Content-type: text/plain\n\n"; 

before you have the while loop.  

You can also ignore the while loop and so smethign like

print <DOWNLOAD_FILE>;  

Reza

Fritz Knack wrote:
> 
> On Wed, 22 Apr 1998 00:55:23 GMT, Glenn Schworak
> <Glenn.J.Schworak@state.or.us> wrote:
> 
> >I have this chunk of perl code that works great under Netscape but
> >InterNet Explorer 4.0 loses its mind when it starts to download.
> >
> >    while (@line = <DOWNLOAD_FILE>) { print $line }
> 
> ...and I may be missing something, but I wouldn't have thought that
> this is what you mean. (At least within the code you provided, $line
> is undefined.) You might try
> 
> while (<DOWNLOAD_FILE>) { print }
> 
>         or even
> 
> @line = <DOWNLOAD_FILE>;
> for $line (@line) {
>    print $line;
> }
>


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

Date: 26 Apr 1998 18:44:55 GMT
From: "Joe Cool" <peter.bady@intel.com>
Subject: Re: SendMail on NT
Message-Id: <01bd7143$82b83620$fc1be984@fmcaces-status>

Perform a search on blat , it works great!!
Pete Bady

> No, But I did a very extensive search on perl.com and many other perl
> resources.



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

Date: Sun, 26 Apr 1998 20:25:27 GMT
From: henlif@elsfl.com (Henry Lifton)
Subject: Unique Sort
Message-Id: <6i05ee$41h$1@supernews.com>

I have a dbm file where there is one unique key.  one of the fields is the 
city name.  I want to sort a list just of the cities.  Since many of the 
records have the same city, I want to extract each city only once.

I want to use them in a list box in a form.

What I have now is :

@buildings_keys = keys %buildings;
          @sort_keys = map {
    [ (split /\|/)[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]]
  } @buildings{@buildings_keys};


  @ordered_keys = @buildings_keys [ sort {
    ${$sort_keys[$a]}[5] cmp ${$sort_keys[$b]}[5]
        } 0..$#sort_keys ];


foreach $city (@ordered_keys)
{

($bid,$agentid,$bldg,$x,$x,$city,$x,$x,$x,$type,$x,$x,$x,$x,$low,$high,$x,$x) 
= split('\|',$buildings{$city}); 

print "$city<br>";
}

Can anybody give me a clue how to print only the first occurence of each city 
and if it is not to much trouble, how to get that into an option list box 
like:

<select name="city" size=5 >
   
<option>                            Boca Raton
<option>                            Boynton Beach
<option>                            Delray Beach
<option>                            Gulf Stream

I can use a ssi execute or include to insert it into the form

Thanks

Henry Lifton


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

Date: Sun, 26 Apr 1998 18:25:46 GMT
From: Tom Phoenix <rootbeer@teleport.com>
To: JimJ <jjacobus@ponyx.com>
Subject: Re: using the USE command.
Message-Id: <Pine.GSO.3.96.980426110918.12179T-100000@user2.teleport.com>

On Fri, 24 Apr 1998, JimJ wrote:

> Newsgroups: comp.lang.perl.tk, complang.perl.misc

Your newsgroup list is damaged. And since this question seems to have
nothing to do with c.l.p.tk, I've set followups as well. 

> "Can't locate CGI/Form.pm in @INC at ccf_query.cgi line 2."

Have you seen what perldiag has to say about this message?

> I checked that @IN points to my local directory by doing a "perl -V"
> (the last link is "."). I'm not a superuser so I can't load the CGI
> library into the system library. However, I'm confident this is not a
> path problem.

It _is_ a path problem, in some sense. :-)  But maybe you need to 'use
lib' first, to specify the proper path to CGI::Form. Or maybe you need to
install CGI::Form.pm? (And you do know that '.' is not necessarily your
local directory, right?)

> I have a copy of CGI.pm in my local directory.

That's nice, but you may need CGI::Form.pm as well. And the copy of CGI.pm
that you're using may be one installed elsewhere.

Hope this helps!

-- 
Tom Phoenix       Perl Training and Hacking       Esperanto
Randal Schwartz Case:     http://www.rahul.net/jeffrey/ovs/



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

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

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