[17552] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4972 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Nov 27 11:06:06 2000

Date: Mon, 27 Nov 2000 08:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <975341112-v9-i4972@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 27 Nov 2000     Volume: 9 Number: 4972

Today's topics:
    Re: .htaccess automated password authentication scheme (Flint Slacker)
        Apache, Win and Perl <falk@cogitatio.de>
    Re: Can't install modules in ActiveStates v5.6.0 for Wi (Helgi Briem)
    Re: Compiling Curses-1.05 Module <rountree@cs.queensu.ca>
        DBD-Oracle <cindyann@mbox3.singnet.com.sg>
        Delete array slices? <cg@schlund.de>
    Re: Delete array slices? (Eric Bohlman)
    Re: Delete array slices? <jeffp@crusoe.net>
        how to determine to url of an image in a html file <jingzx@sinaman.com>
        Loading of modules? <jason@webfoundry.co.uk>
        New posters to comp.lang.perl.misc <gbacon@cs.uah.edu>
        Newbie question concerning columns <dcfor3@hotmail.com>
    Re: Perl, Mysql and large datasets <schwern@pobox.com>
    Re: Perl, Mysql and large datasets (Abigail)
        printing decimal places <same@make-it-online.com>
    Re: printing decimal places (Flint Slacker)
    Re: printing decimal places (Tom Christiansen)
    Re: printing decimal places (David Wall)
    Re: Read File into Array? (was Re: newbie pipe question <W.Hielscher@mssys.com>
    Re: splitting a string into an array and preserving the <bart.lateur@skynet.be>
    Re: splitting a string into an array and preserving the <bart.lateur@skynet.be>
    Re: splitting a string into an array and preserving the (Tom Christiansen)
        starting server script <at-tmp-01@mail.ru>
    Re: starting server script (Flint Slacker)
    Re: starting server script <at-tmp-01@mail.ru>
        Statistics for comp.lang.perl.misc <gbacon@cs.uah.edu>
    Re: What if $SIG{__DIE__} is occupied by other module? <schwern@pobox.com>
    Re: What if $SIG{__DIE__} is occupied by other module? <bart.lateur@skynet.be>
        Why wont the graphics show <Dave@inner-realm.co.uk>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 27 Nov 2000 15:06:03 GMT
From: flint@flintslacker.com (Flint Slacker)
Subject: Re: .htaccess automated password authentication scheme
Message-Id: <3a2477fd.220214498@news.tcn.net>


If you have a Mysql server running, lookup mod_auth_mysql.

Flint

On Sat, 25 Nov 2000 10:31:18 -0800, Mark Thompson
<mark-lists@webstylists.com> wrote:

>Hi,
>
>I'm being asked to write a scheme in Perl that will do the following
>basic tasks:
>
>1) Ask for basic information from a form.
>2) Create a random but unique username and password (or maybe accept a
>username from the user but assign the password randomly, the main
>thing is that we need valid e-mail addresses.)
>3) Add this username and password to .htaccess file
>4) Send username and password to user submitting form via e-mail
>5) Log information to a data file
>
>Not surprisingly I found what appeared to be a program that does this
>called Locked Area Pro (supposedly available at
><http://www.lockedarea.com/>) but it only seems to be available if you
>sign up for their members club and the interface for getting a
>membership appears to be down right now.
>
>What I'm wondering is if anyone else knows of a program that does this
>that's already complete (our budget for this is about $30-$50).  I've
>already written basic programs to do all of the requirements as
>separate programs so I figure I can crank out what's necessary in a
>few hours but figure I'd rather buy a $50 program than create the
>program myself.  
>
>Thanks,
>
>Mark



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

Date: Mon, 27 Nov 2000 15:59:10 +0100
From: Falk =?iso-8859-1?Q?K=FChnel?= <falk@cogitatio.de>
Subject: Apache, Win and Perl
Message-Id: <3A2276BE.1131DA5A@cogitatio.de>

Hi there!

Does anyone know how to get Apache to ignore the first line in the
perlscript an just use a predefined perl-path? That would save me a lot
of trouble.

Thanx
Falk




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

Date: Mon, 27 Nov 2000 12:25:50 GMT
From: helgi@NOSPAMdecode.is (Helgi Briem)
Subject: Re: Can't install modules in ActiveStates v5.6.0 for Win32
Message-Id: <3a225132.2252338@news.itn.is>

On Sat, 25 Nov 2000 19:29:53 +0000, Graham Stow
<graham@letsgouk.com> wrote:

>When trying to install a module and running 'Makefile.pl', I get a 'Bad
>command or file name' 'Unable to find a perl 5 (by these names:
>C\Perl\bin\Perl.exe miniperl perl perl5 perl5.6.0, in these dirs:
>C:\WINDOWS\COMMAND C:\PERL\BIN C:\Perl\bin)
>
>I'm running ActiveState's perl v5.6.0 for Win32-x86, Binary build 616,
>installed in C:\Perl
>
Don't try to install the tar.gz packed modules
under Activestate Perl unless you have a
C/C++ compiler in your path and edit
the Makefile to  use that.

Do it this way:

If you a have a http proxy run this on
your command line:

set HTTP_proxy=myproxy.domain.com:XXXX

substituting your own proxy server and
port number (for XXXX).

then cd to c:/perl/bin and run
perl ppm.pl

This will run the Perl Package Manager
that comes with Activestate's Perl
distribution.

This will give you a prompt that looks like
PPM>

type install ModuleName from there
and the module will download the ppm
package and install it.

Type quit when you have finished.

Regards, 
Helgi Briem


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

Date: 27 Nov 2000 10:14:24 -0500
From: Eric Rountree <rountree@cs.queensu.ca>
Subject: Re: Compiling Curses-1.05 Module
Message-Id: <vztu28tih0v.fsf@cs.queensu.ca>


I made the following changes to my Makefile.PL (the file that creates
the Makefile) in the Curses source directory:

  my $inc = "-I/usr/local/include/ncurses";
  my $libs = "-L/usr/local/include -lncurses -lmenu -lform";

  my $p_inc = "-I/usr/local/include/ncurses";
  my $p_libs = "-L/usr/local/include -lpanel";

Now I get far fewer "function <xxx> not found" messages when I run
make, but I still get these few, which appear to be crucial:

   function 'getsyx' NOT found
   function 'getsyx' returns void
   function 'setsyx' NOT found
   function 'setsyx' returns void
   ...
   function 'flusok' NOT found
   function 'getcap' NOT found
   function 'touchoverlap' NOT found

So it looks like it's finding the right libraries, but still no
"getcap." Any more suggestions out there?

Thanks.

Eric

cfedde@fedde.littleton.co.us (Chris Fedde) writes:
> 
> You need to be sure that the build process is realy finding ncurses
> rather than the BSD or SYSV curses that might be the default.  Look
> at the README or install files in the Curses distribution.
> 
> chris

-- 
---------------------------------------------
Eric Rountree, Systems Specialist
Department of Computing & Information Science
Goodwin Hall, Room 551
Queen's University
Kingston, Ontario
Canada  K7L 3N6

(613)533-6784
rountree@cs.queensu.ca


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

Date: 27 Nov 2000 12:32:07 GMT
From: "cindy" <cindyann@mbox3.singnet.com.sg>
Subject: DBD-Oracle
Message-Id: <01c0586f$4a9a1540$33b715a5@default>

hi,

I have tried to install DBD-Oracle in Win95 using the following matter:
set HTTP_proxy=http://myproxy.address
ppm
install DBD-Oracle
y

but got the following error message:
not well_formed @ line 1, column1, byte1 @ c:\perl\site\lib/XML/Parser.pm
line 117

Can someone help me?

Thank You.

regards,
Cindy

-- 
 'Courage is standing up for what you believe in without worrying about
 the opinions of others. It's following your own heart, living your own
 life, and settling for nothing less than the best for yourself.'
  ~ Caroline Kent ~


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

Date: Mon, 27 Nov 2000 15:14:29 +0100
From: Carsten Gaebler <cg@schlund.de>
Subject: Delete array slices?
Message-Id: <3A226C45.AFB6FE80@schlund.de>

Hi!

I'd like to remove some consecutive elements from an array @a, say $a[2]
thru $a[5]. Normally I'm using Python where this would be simply a[2:6]
= []. Is there an equivalent in Perl ("delete" only works for hashes),
or would I have to set up a loop manually?

Regards
Carsten.


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

Date: 27 Nov 2000 14:26:36 GMT
From: ebohlman@omsdev.com (Eric Bohlman)
Subject: Re: Delete array slices?
Message-Id: <8vtqus$s8h$1@bob.news.rcn.net>

Carsten Gaebler <cg@schlund.de> wrote:
> I'd like to remove some consecutive elements from an array @a, say $a[2]
> thru $a[5]. Normally I'm using Python where this would be simply a[2:6]
> = []. Is there an equivalent in Perl ("delete" only works for hashes),
> or would I have to set up a loop manually?

perldoc -f splice



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

Date: Mon, 27 Nov 2000 09:45:35 -0500
From: Jeff Pinyan <jeffp@crusoe.net>
Subject: Re: Delete array slices?
Message-Id: <Pine.GSO.4.21.0011270944010.2522-100000@crusoe.crusoe.net>

[posted & mailed]

On Nov 27, Carsten Gaebler said:

>I'd like to remove some consecutive elements from an array @a, say $a[2]
>thru $a[5]. Normally I'm using Python where this would be simply a[2:6]
>= []. Is there an equivalent in Perl ("delete" only works for hashes),
>or would I have to set up a loop manually?

You'd want to use the splice() function (as documented in perlfunc):

  splice @a, 2, 4;  # starting at $a[2], a slice of length 4 (2,3,4,5)

Read 'perldoc -f splice' for more information.

-- 
Jeff "japhy" Pinyan     japhy@pobox.com    http://www.pobox.com/~japhy/
CPAN - #1 Perl Resource  (my id:  PINYAN)       http://search.cpan.org/
PerlMonks - An Online Perl Community          http://www.perlmonks.com/
The Perl Archive - Articles, Forums, etc.   http://www.perlarchive.com/





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

Date: Mon, 27 Nov 2000 09:18:55 +0800
From: jin zengxiang <jingzx@sinaman.com>
Subject: how to determine to url of an image in a html file
Message-Id: <3A21B67F.8EE77A4B@sinaman.com>

HI,there:
I want to get image's url in an html ,normal in html ,we have
<IMG src="some where is the web" ....................>
I wonder how can I get the url which is inside the quotation .
I've tried the following code segment ,but it doesn't work:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

             $parser=HTML::TokeParser->new(\$html);
              while (my $token = $parser->get_tag("img"))
                {
                 my $url = $token->[0]{src} || "-" ;
                print "$url\n" ;
                $imageTotal++ ;
                 }
Would you pls teach me how to find out the way?
Thanks .
Alan



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

Date: Mon, 27 Nov 2000 11:16:51 -0000
From: "Jason Timmins" <jason@webfoundry.co.uk>
Subject: Loading of modules?
Message-Id: <975323851.10371.0.nnrp-14.9e981414@news.demon.co.uk>

Hi There,

Can anyone tell me where in the source for Perl 5.6.0 the interpreter loads
modules from the file system?

I've found stuff called Perl_load_module but I was looking for a nice fread
command.

[Aside: sorry for such a lame question but, as you can tell, I'm no expert
on the Perl source.]

Cheers
Jason.





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

Date: Mon, 27 Nov 2000 15:30:14 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: New posters to comp.lang.perl.misc
Message-Id: <t24vg6d7i8b3c2@corp.supernews.com>

Following is a summary of articles from new posters spanning a 7 day
period, beginning at 20 Nov 2000 15:23:28 GMT and ending at
27 Nov 2000 13:38:21 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2000 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Totals
======

Posters:  156 (41.6% of all posters)
Articles: 236 (22.0% of all articles)
Volume generated: 386.8 kb (21.2% of total volume)
    - headers:    181.0 kb (3,758 lines)
    - bodies:     202.4 kb (7,052 lines)
    - original:   145.7 kb (5,288 lines)
    - signatures: 3.1 kb (76 lines)

Original Content Rating: 0.720

Averages
========

Posts per poster: 1.5
    median: 1.0 post
    mode:   1 post - 108 posters
    s:      1.3 posts
Message size: 1678.2 bytes
    - header:     785.4 bytes (15.9 lines)
    - body:       878.1 bytes (29.9 lines)
    - original:   632.2 bytes (22.4 lines)
    - signature:  13.7 bytes (0.3 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

    9    15.1 (  7.6/  7.5/  2.8)  "_Thomas" <webmaster@860.org>
    6    10.1 (  4.1/  6.0/  3.5)  ericnntp@fruitcom.com
    5     8.4 (  3.9/  4.5/  3.9)  unformat <unformat@my-deja.com>
    5    10.3 (  4.6/  5.7/  3.0)  hbhb@gmx.de
    4    12.3 (  3.0/  9.3/  8.5)  Grimpoteuthis <fish@7cs.net>
    4     6.1 (  3.5/  2.5/  0.9)  Graham Stow <graham@letsgouk.com>
    3     5.0 (  2.2/  2.9/  1.3)  mikhailgee@my-deja.com
    3     4.2 (  2.5/  1.7/  1.6)  raptor555@my-deja.com
    3     3.1 (  2.0/  1.1/  1.0)  "Plug-in tools" <newsgroups@ebagus.com>
    3     3.7 (  2.3/  1.4/  0.9)  Earl Mardukas <The-Duke-of-URL@webtv.net>

These posters accounted for 4.2% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

  15.1 (  7.6/  7.5/  2.8)      9  "_Thomas" <webmaster@860.org>
  12.3 (  3.0/  9.3/  8.5)      4  Grimpoteuthis <fish@7cs.net>
  10.3 (  4.6/  5.7/  3.0)      5  hbhb@gmx.de
  10.1 (  4.1/  6.0/  3.5)      6  ericnntp@fruitcom.com
   9.7 (  1.7/  7.9/  2.9)      2  "~greg" <gm@magpage.com>
   8.4 (  3.9/  4.5/  3.9)      5  unformat <unformat@my-deja.com>
   7.8 (  2.6/  5.1/  4.3)      3  "Timothy Valis" <junk@yada.net>
   7.6 (  2.7/  4.9/  3.1)      3  "Paul Mulloni" <paul@NOSPAM.multibase.com.au>
   6.1 (  3.5/  2.5/  0.9)      4  Graham Stow <graham@letsgouk.com>
   6.1 (  1.5/  4.6/  4.1)      2  "shreve.net" <jhyde@shreve.net>

These posters accounted for 5.1% of the total volume.

Top 10 Posters by OCR (minimum of three posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.933  (  1.0 /  1.1)      3  "Plug-in tools" <newsgroups@ebagus.com>
0.915  (  1.6 /  1.7)      3  raptor555@my-deja.com
0.908  (  8.5 /  9.3)      4  Grimpoteuthis <fish@7cs.net>
0.869  (  3.9 /  4.5)      5  unformat <unformat@my-deja.com>
0.864  (  1.9 /  2.2)      3  James@Antikythera_Machines.com.au
0.831  (  0.5 /  0.6)      3  "TommyAu@497179" <perl@dotexpress.com>
0.827  (  4.3 /  5.1)      3  "Timothy Valis" <junk@yada.net>
0.791  (  1.8 /  2.3)      3  toby_m_kramer@hotmail.com
0.660  (  0.9 /  1.4)      3  swilsonnissa@my-deja.com
0.651  (  0.9 /  1.4)      3  Earl Mardukas <The-Duke-of-URL@webtv.net>

Bottom 10 Posters by OCR (minimum of three posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.791  (  1.8 /  2.3)      3  toby_m_kramer@hotmail.com
0.660  (  0.9 /  1.4)      3  swilsonnissa@my-deja.com
0.651  (  0.9 /  1.4)      3  Earl Mardukas <The-Duke-of-URL@webtv.net>
0.625  (  3.1 /  4.9)      3  "Paul Mulloni" <paul@NOSPAM.multibase.com.au>
0.585  (  3.5 /  6.0)      6  ericnntp@fruitcom.com
0.546  (  1.0 /  1.8)      3  smokindave@smokindave.com
0.524  (  3.0 /  5.7)      5  hbhb@gmx.de
0.463  (  1.3 /  2.9)      3  mikhailgee@my-deja.com
0.367  (  2.8 /  7.5)      9  "_Thomas" <webmaster@860.org>
0.363  (  0.9 /  2.5)      4  Graham Stow <graham@letsgouk.com>

17 posters (10%) had at least three posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      19  comp.lang.perl.modules
      18  alt.perl
      10  comp.lang.perl
       9  comp.lang.perl.tk
       5  comp.unix.shell
       5  comp.unix.programmer
       5  comp.lang.awk
       4  de.comp.lang.perl.misc
       4  de.comp.lang.perl.cgi
       2  eug.comp.lang.perl

Top 10 Crossposters
===================

Articles  Address
--------  -------

       4  "FREE Bucks" <do@nothing.eh>
       4  "Martin Sarajervi" <ms@klmoberg.no>
       3  denr0g@canb.auug.org.au
       3  "Tim Goggin" <tgoggin@unforgettable.com>
       3  "Amzin" <amzeen@mtu-net.ru>
       3  Patrice Seyed <apseyed@eos.ncsu.edu>
       2  Roman Kosenko <ra@amk.lg.ua>
       2  Randall Woodman <wrwoodman@yahoo.com>
       2  Prasanth Mudundi <someone@somehere.moc>
       2  Thanh Q Lam <thanh.q.lam@alcatel.com>


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

Date: Mon, 27 Nov 2000 10:06:14 -0500
From: "dcfor3@hotmail.com" <dcfor3@hotmail.com>
Subject: Newbie question concerning columns
Message-Id: <3A227866.CDC1DCC8@hotmail.com>

I have a file that contains a entries for a quiz.  It takes everyone's
answers and appends it to the end of the file.  There are 18 questions
that each participant answers. each week I have a different number of
users who access the poll so the number of columns vary.   I would pass
that to the script on how many columns to make.  The entries in the file
are stored as such:

abc            <====  start of first entry for user a
def
ghi
jkl
mno
pqr
stu
vwx
yz12
345
678
910
aaa
bbb
ccc
ddd
eee
fff
ggg      <===== start of second entry for user b
hhh
iii
jjj
kkk
lll
mmm
nnn
ooo
ppp
qqq
rrr
sss
ttt
uuu
vvv
www
xxx
etc   <==== start of third entry for for user c
 ...
 ...
 ...

Is there any way to get the data in to columns separated by a tab?  I
want to get the data into a file with columns (ie.):

userA      user B,    User C, etc
abc<tab>ggg
def<tab>hhh
ghi<tab>iii
jkl<tab>jjj
mno<tab>kkk
pqr<tab>lll
stu<tab>mmm
vwx<tab>nnn
yz12<tab>ooo
345<tab>ppp
678<tab>qqq
910<tab>rrr
aaa<tab>sss
bbb<tab>ttt
ccc<tab>uuu
ddd<tab>vvv
eee<tab>www
fff<tab>xxx


TIA
dc



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

Date: Mon, 27 Nov 2000 13:38:21 GMT
From: Michael G Schwern <schwern@pobox.com>
Subject: Re: Perl, Mysql and large datasets
Message-Id: <3A22641B.3F21CC66@pobox.com>

Hazi Gharagozlou wrote:
> Let's say that my dataset returns between 200 to 300 records (thumbnails of pictures included) 
> My script does a count of the number of records and determins that all the records will be over 
> 20 html pages. Next I execute the query and have all the dataset stored in an array and proceed 
> to do next and previous page navigation. I would think this is a big waste of bandwidth if the 
> user decides that what he or she is looking is on the first page.

I *think* this is a "How do I get results 51-100 out of a query" type
question.  There's two ways to do this.

First, the MySQL specific way.  The handy LIMIT predicate.

	/* Grab rows 101-150 of our kitty porn. */
	SELECT Images FROM Pron WHERE Type = 'Kitty' LIMIT 100, 50;

<http://www.mysql.com/documentation/mysql/bychapter/manual_toc.html#SELECT>
for more details on that.

The second, generic way is to just make the whole request and only read
what you need.  Hopefully you're using DBI.

	my $type = 'Kitty';
	my @range = (101, 150);
	my $want = $range[1] - $range[0] + 1;

	my $count_sth = $dbh->prepare("SELECT COUNT(Images) FROM Pron WHERE
Type = ?");
	my $img_sth = $dbh->prepare("SELECT Images FROM Pron WHERE Type = ?");

	# Count the total images we have
	$count_sth->execute($type);
	my($img_total) = $count_sth->fetchrow_array;

	$img_sth->execute($type);

	# Discard the first 100
	$img_sth->fetch for (1..$range[0]-1);

	# Read the next 50
	push @images, $img_sth->fetchrow_array for (1..$want);

	# Dump the rest.
	$img_sth->finish;

	print "Displaying $range[0] to $range[1] of $img_total\n";

You'll probably just want to use LIMIT.  Its simpler and faster. 
Wrapping this part of your code logic up into its own subroutine will
shield against future database changes.


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

Date: 27 Nov 2000 15:39:23 GMT
From: abigail@foad.org (Abigail)
Subject: Re: Perl, Mysql and large datasets
Message-Id: <slrn92501b.kvs.abigail@tsathoggua.rlyeh.net>

On Mon, 27 Nov 2000 11:55:26 +0100, Hazi Gharagozlou (hazi@blackeyes.org) wrote in comp.lang.perl.misc <URL: news:<3A223D9E.B2662B2D@blackeyes.org>>:
++ Thanks for the reply. I am not going to debate the merits of Mysql (your comm
++ 
++ Let's say that my dataset returns between 200 to 300 records (thumbnails of p
++ determins that all the records will be over 20 html pages. Next I execute the
++ and previous page navigation. I would think this is a big waste of bandwidth 
++ 
++ Maybe I am hoping but I am looking for a more elegant solution.


200 to 300? I thought you said large.



Abigail


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

Date: Mon, 27 Nov 2000 22:27:42 +0800
From:  <same@make-it-online.com>
Subject: printing decimal places
Message-Id: <MPG.148cf03c4dafa19f989688@news.cyberway.com.sg>

I have numbers that has infinate decimal places, how can i print it out 
with 2 decimal places?

Thanks!


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

Date: Mon, 27 Nov 2000 15:16:05 GMT
From: flint@flintslacker.com (Flint Slacker)
Subject: Re: printing decimal places
Message-Id: <3a267a44.220797498@news.tcn.net>


sprintf or printf

$tmp = sprintf "%5.2f", $number;

Something like that.....

Flint

On Mon, 27 Nov 2000 22:27:42 +0800, <same@make-it-online.com> wrote:

>I have numbers that has infinate decimal places, how can i print it out 
>with 2 decimal places?
>
>Thanks!



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

Date: 27 Nov 2000 08:35:16 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: printing decimal places
Message-Id: <3a227f34@cs.colorado.edu>

In article <MPG.148cf03c4dafa19f989688@news.cyberway.com.sg>,
 <same@make-it-online.com> wrote:
>I have numbers that has infinate decimal places, 

I find that unlikely in the extreme.  It is always intriguing to
witness the tacit assertion of infinIte precision stored within a
finite amount of memory.  This sort of trick requires some sort of
indirect symbolic notation, such as perhaps "1/3" or "sqrt(2)"--stored
as strings, of course, not as floating-point fudge, which would be
no more infinIte than the number of seconds in a day.  Long to some,
but hardly infinIte.

>how can i print it out 
>with 2 decimal places?

Perhaps you could please be more specific in explaining just what
part of the first question in the perlfaq4 manpage it was that
didn't you understand?  :-)

There are three critical components to a successful Perl apprenticeship:

    1) Familiarity with the standard Perl documentation that
       is included with every Perl distribution.  

    2) A compendium of well-formed Perl code to serve as model
       examples.  

    3) A task that you need to do using Perl.

You are not be expected to tediously read through the voluminous
documentation word by word, line by line, and manpage by manpage.

What you are certainly expected to do--if you to harbor any hope
of long-term success--is to ascertain precisely where on your very
own computer the standard documentation is located.  Given that,
you must then be able to search through every byte of the aforementioned
standard documentation, not by hand nor by eye, but rather via
some sort of automated information-retrieval technology using basic,
commands familiar to every computer user worthy of that appellation.

Unlike the standard documentation, copious repositories of exemplary
Perl code are not standard; or at least, no longer such.  However,
the O'Reilly Perl books, at the very least, have freely downloadable
code.  Other possibilities clearly exist.  Sure, it would be nice
to read it all exhaustively, but more important by far is the ability
to search through it in an automated, computer-directed fashion for
the sorts of things you curious about.

Grep ye first the kingdom of pod.

--tom
-- 
infinitant infinitarily infinitary infinitate infinitation infinite
infinitely infiniteness infinitesimal infinitesimalism infinitesimality
infinitesimally infinitesimalness infiniteth infinities infinitieth
infinitival infinitivally infinitive infinitively infinitive's
infinitize infinitude infinitum infinituple infinity


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

Date: 27 Nov 2000 10:51:40 -0500
From: darkon@one.net (David Wall)
Subject: Re: printing decimal places
Message-Id: <8FF9647E5darkononenet@206.112.192.118>

same@make-it-online.com wrote in 
<MPG.148cf03c4dafa19f989688@news.cyberway.com.sg>:

>I have numbers that has infinate decimal places, how can i print it out 
>with 2 decimal places?

See the FAQ, perlfaq4 in particular.

>Thanks!

You're welcome.

-- 
David Wall
darkon@one.net


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

Date: Mon, 27 Nov 2000 13:24:12 +0100
From: Wolfgang Hielscher <W.Hielscher@mssys.com>
Subject: Re: Read File into Array? (was Re: newbie pipe question)
Message-Id: <3A22526C.EF6BC57A@mssys.com>

"abuse@newsguy.com" wrote:
> >Shallowen wrote:
> >> Why not read the file into an array:
> >For many reasons:
> >  - the file might be really big
> 
> I've done this for small files (~200 lines, one line per array element), but I'm
> embarking on a project with files as long as 250,000 lines. Is there a point
> beyond which it's practical to slurp a file into an array like this? Is this a
> RAM issue? Or should it NEVER be done?

Well, obviously it is a RAM issue because if you slurp in a file into an
array you'll slurp it into memory and there it will take at least its
filesize in space. I can't tell if it's practical in your case to read
all the 250.000 lines into an array, because that depends on the system
you intend to run the program upon.

But it's more a "problem issue" than a RAM issue: Is it really
nescessary to know more than "the actual line"? If you're only
converting lower to uppercase chars, gather statisitcal infos or pumping
lines into a database you are probably ok with the actual line. And even
in cases where you for example try to match a "start thingie" with an
"end thingie" (login/logout log entries etc.) there are often better
ways than carrying the whole file in memory.
But if you're wildly changing the contents of the file in a somehow
random order by inserting, deleting and modifying its lines you'll
probably be better off if you do it on (part of) the file copied to an
array.


> >  - you don't have to
> 
> What is the alternative? Is it better just to process each line as it's read in?

Yes it is an alternative, but you have to judge for yourself if it's
"better" or not.


Cheers
   Wolfgang


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

Date: Mon, 27 Nov 2000 12:11:42 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: splitting a string into an array and preserving the "\n"
Message-Id: <tnj42to87fgelckvbpf0v4tq5uucdo4doh@4ax.com>

Andrew N. McGuire wrote:

>  Is the lookbehind necessary?  Why not:
>
>        my @lines = split '^', $mlstring;
>
>  I am probably missing something though...

Apparently not. It works (5.6).

	$_ = "One\ntwo\nthree\n";
	print join '#', split /^/;
-->
	One
	#two
	#three

I would have expected that a regex like /^/m would have been necessary.

-- 
	Bart.


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

Date: Mon, 27 Nov 2000 12:15:43 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: splitting a string into an array and preserving the "\n"
Message-Id: <keh42tcv2qkk04l0qgo1tjbi517i02emu1@4ax.com>

Bernie Cosell wrote:

>I just looked and I can't find any docs on '(?<=' in perlre.  We're on
>5.004_004 [I'm hoping to upgrade fairly soon, but I don't have a say in
>that kind of thing].. is this some 5.6 cleverness or did I miss something
>in the 5.4 perlre?

It's a 5.005 cleverness, I think. The magic word is "lookbehind".

Unfortunately, perldelta for 5.005 is no longer online (not on CPAN, not
on www.perl.com). But on my local system, I can extract:

       New regular expression constructs
           The following new syntax elements are supported:

                   (?<=RE)
                   (?<!RE)
	...

-- 
	Bart.


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

Date: 27 Nov 2000 08:09:08 -0700
From: tchrist@perl.com (Tom Christiansen)
Subject: Re: splitting a string into an array and preserving the "\n"
Message-Id: <3a227914@cs.colorado.edu>

In article <keh42tcv2qkk04l0qgo1tjbi517i02emu1@4ax.com>,
Bart Lateur  <bart.lateur@skynet.be> wrote:
>Unfortunately, perldelta for 5.005 is no longer online (not on CPAN, not
>on www.perl.com). 

Wrong.

First, "online" hardly means "on CPAN or www.perl.com".   Rather,
"online" simply means "on the computer".    The only way it isn't
online is if you turn your computer off.

    % man perl
    ...
       For ease of access, the Perl manual has been split up into
       several sections:

           perl                Perl overview (this section)
           perldelta           Perl changes since previous version
 ===>      perl5005delta       Perl changes in version 5.005
           perl5004delta       Perl changes in version 5.004
           perlfaq             Perl frequently asked questions
           perltoc             Perl documentation table of contents
    ...

--tom


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

Date: Mon, 27 Nov 2000 18:02:56 +0300
From: "Andrey Tikhomirov" <at-tmp-01@mail.ru>
Subject: starting server script
Message-Id: <8vtt2u$sls$1@news.metrocom.ru>

Hi !

Does anybody know how to start server script at remote computer ?
When I use telnet, and start script from its command line, the server-script
ends when I logoff. When I trying to start script from browser it ends after
timeout. Are there any ways to start my server and then disconnect from it ?






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

Date: Mon, 27 Nov 2000 15:09:15 GMT
From: flint@flintslacker.com (Flint Slacker)
Subject: Re: starting server script
Message-Id: <3a2578ac.220389203@news.tcn.net>


Look up rsh, expect

/usr/bin/nohup /usr/prog.pl &

Flint

On Mon, 27 Nov 2000 18:02:56 +0300, "Andrey Tikhomirov"
<at-tmp-01@mail.ru> wrote:

>Hi !
>
>Does anybody know how to start server script at remote computer ?
>When I use telnet, and start script from its command line, the server-script
>ends when I logoff. When I trying to start script from browser it ends after
>timeout. Are there any ways to start my server and then disconnect from it ?
>
>
>



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

Date: Mon, 27 Nov 2000 18:25:03 +0300
From: "Andrey Tikhomirov" <at-tmp-01@mail.ru>
Subject: Re: starting server script
Message-Id: <8vtuc8$q$1@news.metrocom.ru>

Sorry, I have to start script on NT-server...


"Flint Slacker" <flint@flintslacker.com> wrote in message
news:3a2578ac.220389203@news.tcn.net...
>
> Look up rsh, expect
>
> /usr/bin/nohup /usr/prog.pl &
>
> Flint
>
> On Mon, 27 Nov 2000 18:02:56 +0300, "Andrey Tikhomirov"
> <at-tmp-01@mail.ru> wrote:
>
> >Hi !
> >
> >Does anybody know how to start server script at remote computer ?
> >When I use telnet, and start script from its command line, the
server-script
> >ends when I logoff. When I trying to start script from browser it ends
after
> >timeout. Are there any ways to start my server and then disconnect from
it ?
> >
> >
> >
>




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

Date: Mon, 27 Nov 2000 15:30:10 -0000
From: Greg Bacon <gbacon@cs.uah.edu>
Subject: Statistics for comp.lang.perl.misc
Message-Id: <t24vg2ijsomc0@corp.supernews.com>

Following is a summary of articles spanning a 7 day period,
beginning at 20 Nov 2000 15:23:28 GMT and ending at
27 Nov 2000 13:38:21 GMT.

Notes
=====

    - A line in the body of a post is considered to be original if it
      does *not* match the regular expression /^\s{0,3}(?:>|:|\S+>|\+\+)/.
    - All text after the last cut line (/^-- $/) in the body is
      considered to be the author's signature.
    - The scanner prefers the Reply-To: header over the From: header
      in determining the "real" email address and name.
    - Original Content Rating (OCR) is the ratio of the original content
      volume to the total body volume.
    - Find the News-Scan distribution on the CPAN!
      <URL:http://www.perl.com/CPAN/modules/by-module/News/>
    - Please send all comments to Greg Bacon <gbacon@cs.uah.edu>.
    - Copyright (c) 2000 Greg Bacon.
      Verbatim copying and redistribution is permitted without royalty;
      alteration is not permitted.  Redistribution and/or use for any
      commercial purpose is prohibited.

Excluded Posters
================

perlfaq-suggestions\@(?:.*\.)?perl\.com

Totals
======

Posters:  375
Articles: 1072 (443 with cutlined signatures)
Threads:  321
Volume generated: 1827.4 kb
    - headers:    831.5 kb (16,948 lines)
    - bodies:     932.3 kb (31,863 lines)
    - original:   594.5 kb (22,169 lines)
    - signatures: 62.6 kb (1,479 lines)

Original Content Rating: 0.638

Averages
========

Posts per poster: 2.9
    median: 1 post
    mode:   1 post - 215 posters
    s:      6.2 posts
Posts per thread: 3.3
    median: 3 posts
    mode:   2 posts - 85 threads
    s:      3.4 posts
Message size: 1745.6 bytes
    - header:     794.3 bytes (15.8 lines)
    - body:       890.6 bytes (29.7 lines)
    - original:   567.9 bytes (20.7 lines)
    - signature:  59.8 bytes (1.4 lines)

Top 10 Posters by Number of Posts
=================================

         (kb)   (kb)  (kb)  (kb)
Posts  Volume (  hdr/ body/ orig)  Address
-----  --------------------------  -------

   79   140.3 ( 60.2/ 69.1/ 43.7)  Tad McClellan <tadmc@metronet.com>
   47   101.2 ( 39.6/ 52.2/ 32.7)  mgjv@tradingpost.com.au
   36    63.4 ( 25.7/ 34.9/ 20.8)  nobull@mail.com
   33    49.5 ( 26.9/ 22.3/ 14.5)  Bart Lateur <bart.lateur@skynet.be>
   27    39.3 ( 18.5/ 20.8/ 14.2)  Joe Smith <inwap@best.com>
   22    37.9 ( 15.2/ 14.9/  6.6)  adelton@informatics.muni.cz
   21    35.9 ( 15.0/ 20.0/ 11.7)  Chris Fedde <cfedde@fedde.littleton.co.us>
   20    46.3 ( 15.4/ 30.6/ 17.8)  garry@zvolve.com
   15    32.2 ( 12.5/ 15.2/  8.2)  Uri Guttman <uri@sysarch.com>
   13    21.1 (  8.1/ 12.9/  6.3)  Anno Siegel <anno4000@lublin.zrz.tu-berlin.de>

These posters accounted for 29.2% of all articles.

Top 10 Posters by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Address
--------------------------  -----  -------

 140.3 ( 60.2/ 69.1/ 43.7)     79  Tad McClellan <tadmc@metronet.com>
 101.2 ( 39.6/ 52.2/ 32.7)     47  mgjv@tradingpost.com.au
  63.4 ( 25.7/ 34.9/ 20.8)     36  nobull@mail.com
  49.5 ( 26.9/ 22.3/ 14.5)     33  Bart Lateur <bart.lateur@skynet.be>
  46.3 ( 15.4/ 30.6/ 17.8)     20  garry@zvolve.com
  39.3 ( 18.5/ 20.8/ 14.2)     27  Joe Smith <inwap@best.com>
  37.9 ( 15.2/ 14.9/  6.6)     22  adelton@informatics.muni.cz
  35.9 ( 15.0/ 20.0/ 11.7)     21  Chris Fedde <cfedde@fedde.littleton.co.us>
  32.2 ( 12.5/ 15.2/  8.2)     15  Uri Guttman <uri@sysarch.com>
  22.8 (  3.3/ 19.0/ 17.4)      6  Greg Bacon <gbacon@cs.uah.edu>

These posters accounted for 31.1% of the total volume.

Top 10 Posters by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.915  ( 17.4 / 19.0)      6  Greg Bacon <gbacon@cs.uah.edu>
0.869  (  3.9 /  4.5)      5  unformat <unformat@my-deja.com>
0.868  (  2.4 /  2.7)      6  "Mauro" <-@-.com>
0.808  ( 10.4 / 12.9)      6  Tom Christiansen <tchrist@perl.com>
0.791  (  3.0 /  3.7)     13  "John Boy Walton" <johngros@Spam.bigpond.net.au>
0.766  (  1.5 /  1.9)      6  "Michael Guenther" <MiGuenther@lucent.com>
0.733  (  2.0 /  2.7)      5  "hokiebear" <ayambema@adelphia.net>
0.728  (  4.5 /  6.2)      7  Wolfgang Hielscher <W.Hielscher@mssys.com>
0.728  (  5.1 /  7.0)      8  dtbaker_dejanews@my-deja.com
0.727  (  9.4 / 12.9)      8  Chris Stith <mischief@velma.motion.net>

Bottom 10 Posters by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Address
-----  --------------  -----  -------

0.464  (  0.9 /  1.9)      5  "Peter Sundstrom" <peter.sundstrom@eds.com>
0.444  (  6.6 / 14.9)     22  adelton@informatics.muni.cz
0.440  (  5.0 / 11.4)     13  Rafael Garcia-Suarez <rgarciasuarez@free.fr>
0.429  (  3.0 /  7.1)     10  H C <carvdawg@patriot.net>
0.428  (  1.5 /  3.5)      6  Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
0.389  (  3.0 /  7.6)     10  Randal L. Schwartz <merlyn@stonehenge.com>
0.367  (  2.8 /  7.5)      9  "_Thomas" <webmaster@860.org>
0.342  (  1.8 /  5.3)      9  Terrence Brannon <brannon@lnc.usc.edu>
0.324  (  1.5 /  4.6)      8  Mark W. Schumann <catfood@apk.net>
0.284  (  1.7 /  6.1)      6  Todd Anderson <todd@mrnoitall.com>

44 posters (11%) had at least five posts.

Top 10 Threads by Number of Posts
=================================

Posts  Subject
-----  -------

   16  Tom Christiansons' 'style'
   13  identifying $_ as variable or constant
   13  Check for integer
   12  Command Line Perl
   12  OT:Re: Eurodate mysteries
   11  Eurodate mysteries
   11  Beginners Blues II
   11  Simple Question :)
   10  perl options
   10  splitting a string into an array and preserving the "\n"

These threads accounted for 11.1% of all articles.

Top 10 Threads by Volume
========================

  (kb)   (kb)  (kb)  (kb)
Volume (  hdr/ body/ orig)  Posts  Subject
--------------------------  -----  -------

  33.6 ( 11.5/ 20.7/  9.9)     12  OT:Re: Eurodate mysteries
  33.5 ( 10.3/ 21.5/ 13.4)     13  identifying $_ as variable or constant
  30.5 ( 11.6/ 17.5/  9.5)     16  Tom Christiansons' 'style'
  27.4 ( 10.4/ 16.3/ 11.7)     11  Eurodate mysteries
  25.2 (  8.2/ 16.7/ 10.5)     10  looking for PERL GUI debugger for UNIX
  22.1 (  9.5/ 12.1/  6.8)     13  Check for integer
  20.6 (  7.6/ 12.3/  7.1)      9  Sort strings before numbers
  19.8 ( 10.3/  8.8/  4.7)     11  Beginners Blues II
  19.2 (  6.2/ 12.9/  8.1)      8  Sort runtime 5.005 vs 5.004
  18.5 (  9.6/  7.9/  4.4)     12  Command Line Perl

These threads accounted for 13.7% of the total volume.

Top 10 Threads by OCR (minimum of five posts)
==============================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.812  (  3.9/   4.7)      5  perl for win 32 setup question
0.798  ( 10.4/  13.1)      7  Modifying array references
0.783  (  2.2/   2.9)      5  Problem r/w binary files
0.718  ( 11.7/  16.3)     11  Eurodate mysteries
0.708  (  3.0/   4.2)      6  rounding with "printf %f"
0.702  (  6.6/   9.4)      6  Sorting data based on 2 key fields
0.694  (  4.4/   6.3)      6  How to make something in list context?
0.690  (  2.4/   3.5)      6  If/else problem.
0.690  (  3.3/   4.8)      6  running a script as root
0.688  (  6.9/  10.0)      9  IO::Socket: bind or listen errors

Bottom 10 Threads by OCR (minimum of five posts)
=================================================

         (kb)    (kb)
OCR      orig /  body  Posts  Subject
-----  --------------  -----  -------

0.478  (  2.4 /  4.9)      5  Problem with simple del file script
0.478  (  9.9 / 20.7)     12  OT:Re: Eurodate mysteries
0.473  (  1.7 /  3.6)      7  Stripping Comma's and Spaces
0.470  (  3.5 /  7.4)     10  Proper use of $ENV{HTTP_REFERER}
0.468  (  3.0 /  6.4)      7  Stripping carriage returns
0.456  (  3.7 /  8.1)      8  Most easy way to get IP from a local NIC by device name (eth0,eth1...)
0.454  (  3.0 /  6.6)      8  Can't install modules in ActiveStates v5.6.0 for Win32
0.437  (  2.9 /  6.6)     10  Reg Exp Learning?
0.434  (  3.0 /  6.9)      8  quick sorting question
0.419  (  3.9 /  9.3)     10  perl options

65 threads (20%) had at least five posts.

Top 10 Targets for Crossposts
=============================

Articles  Newsgroup
--------  ---------

      19  comp.lang.perl.modules
      18  alt.perl
      10  comp.lang.perl
       9  comp.lang.perl.tk
       5  comp.unix.shell
       5  comp.unix.programmer
       5  comp.lang.awk
       4  de.comp.lang.perl.misc
       4  de.comp.lang.perl.cgi
       2  eug.comp.lang.perl

Top 10 Crossposters
===================

Articles  Address
--------  -------

       9  Tad McClellan <tadmc@metronet.com>
       4  Jakob Schmidt <sumus@aut.dk>
       4  "FREE Bucks" <do@nothing.eh>
       4  "Martin Sarajervi" <ms@klmoberg.no>
       3  denr0g@canb.auug.org.au
       3  nobull@mail.com
       3  "Tim Goggin" <tgoggin@unforgettable.com>
       3  "Mauro" <-@-.com>
       3  Patrice Seyed <apseyed@eos.ncsu.edu>
       3  Bob Walton <bwalton@rochester.rr.com>


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

Date: Mon, 27 Nov 2000 13:48:54 GMT
From: Michael G Schwern <schwern@pobox.com>
Subject: Re: What if $SIG{__DIE__} is occupied by other module?
Message-Id: <3A226694.F43CF539@pobox.com>

nobull@mail.com wrote:
> "John Lin" <johnlin@chttl.com.tw> writes:
> > My problem can be narrowed down to three lines of code:
> >
> >     use DBI;
> >     $SIG{__DIE__} = sub { print "@_ to log file" and exit };
> >     my $db = DBI->connect('dbi:Oracle:mydatabase','scott','tiger');
> >
> > But I really need
> > to catch the __DIE__ exceptions.  What shall I do?

local $SIG{__DIE__} = sub { ... };  will usually do the trick.  However,
due to local's broad scope it may still wreck havoc with your code.

> eval{} is the proper (stackable) way to catch exceptions.

Yep.  Do something like this:

	eval {
		my $dbh = DBI->connect('dbi:foo:whatever', 'joe', 'baggadonuts', {RaiseError=>1});
		...more DBI work...
	};
	if( $@ ) {
		warn "Heavens!  '$@' happened and we'll all be late for dinner!";
	}

Alternatively, if all you want to do is log all errors to a logfile
consider CGI::Carp.

	use CGI::Carp qw(carpout);
	BEGIN {
		open(ERROR_LOG, ">>some/error.log") || die $!;
		carpout(*ERROR_LOG);
	}

Despite the name, CGI::Carp has little to do with CGI.


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

Date: Mon, 27 Nov 2000 15:53:25 GMT
From: Bart Lateur <bart.lateur@skynet.be>
Subject: Re: What if $SIG{__DIE__} is occupied by other module?
Message-Id: <3b052tgp2qpr03d0luf56o2076enjfj38f@4ax.com>

nobull@mail.com wrote:

>> My problem can be narrowed down to three lines of code:
>> 
>>     use DBI;
>>     $SIG{__DIE__} = sub { print "@_ to log file" and exit };
>>     my $db = DBI->connect('dbi:Oracle:mydatabase','scott','tiger');
>> 
>> I got the following error message:
>> 
>>     Can't locate SetDualVar.pm in @INC (@INC contains: [snip])
>>     at D:/Perl/site/lib/Win32/TieRegistry.pm line 42.
>> 
>> If I remove my $SIG{__DIE__}, the error is gone.  But I really need
>> to catch the __DIE__ exceptions.  What shall I do?
>
>eval{} is the proper (stackable) way to catch exceptions.

No: eval() is the CAUSE of the problem. Witness:

	$SIG{__DIE__} = sub { print "@_"; exit };
	my $x = 0;
	my $y;
	eval { $y = 10 / $x };
	print "Hi, there!\n";
-->
	Illegal division by zero at test.pl line 5.

So the stuff in the sub for $SIG{__DIE__} is *still executed*, even in
an eval!

eval() really should have localized (and cleared) $SIG{__DIE__}. This
works:

	$SIG{__DIE__} = sub { print "@_"; exit };
	my $x = 0;
	my $y;
	eval { local $SIG{__DIE__}; $y = 10 / $x };
	print "Hi, there!\n";
-->
	Hi, there!


So: I am pretty sure there is code in that module, that uses eval() to
do a test. Despite the eval(), it kills the program. The same problem
occurs with the MIME::Lite module, which uses eval() to test if the
module MIME::base64 is installed. If $SIG{__DIE__} is set and that
module doesn't exist: bye bye, program.

IMO, that is a bug in eval(), and it ought to be fixed.

-- 
	Bart.


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

Date: Mon, 27 Nov 2000 15:58:41 +0000
From: Dave Clews <Dave@inner-realm.co.uk>
Subject: Why wont the graphics show
Message-Id: <3A2284B1.E8708113@inner-realm.co.uk>

I have produced a perl script to return a thank you html document and
send an email to the correct person, but none of the graphics are being
seen.  What is confusing me is the space is being allocated but the
graphics cannot be found.

I am developing this on solaris 2.6 with apache 1.3.7, the code to
produce the graphics is below.  I have left out all the other bits as
they work.

print"Content-type: text/html";
print"\n\n";
print"<img src='pictures/millwall.jpg' alt='Top of division'>
<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'
codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0'

id=button width=155 height=80>
        <param name=movie value='swf/home_button.swf'>
        <param name=quality value=high>
        <param name=bgcolor value=#ffffff>
        <embed src='swf/home_button.swf' quality=high bgcolor=#ffffff
width=155 height=80 type='application/x-shockwave-flash'
pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>

        </embed>
      </object>\n";





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

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


Administrivia:

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

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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

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

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


------------------------------
End of Perl-Users Digest V9 Issue 4972
**************************************


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