[12531] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6131 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jun 25 21:07:17 1999

Date: Fri, 25 Jun 99 18:00:20 -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           Fri, 25 Jun 1999     Volume: 8 Number: 6131

Today's topics:
        "Slurping" a .jpg file <rcampbel@gbtech.net>
        AccessDB->Unix compatible database <Kelbo@rhk.dk>
    Re: ASCII character coversion (David Glasser)
        Backsniffing <chris@netsoc.tcd.ie>
    Re: Beginner's Question (Larry Rosler)
    Re: Can't retain a directory change from within a scrip <ilyao@tx.technion.ac.il>
    Re: CGI.pm, hashes, passing by reference and two differ <john.warner@tivoli.com>
        Filter Modules (Tri Tram)
    Re: HELP: Can't delete ONE stinking file with Unlink! <mjcarman@zeus.ia.net>
    Re: HELP: Can't delete ONE stinking file with Unlink! (Greg Andrews)
        How do I do this? emcmanus@worldnet.att.net
        Is dbi multi threaded? pedro@nospam.co.uk
        large files (>2G), perl, solaris 2.6 x86 (Patrick Tufts)
    Re: Looking for very small, basic bulletin board system <rcampbel@gbtech.net>
    Re: problem passing array back <mjcarman@zeus.ia.net>
    Re: Problem with regular expression (David Glasser)
    Re: Question about hashes and lists (Larry Rosler)
    Re: Read a file starting a a certain point in the middl (M.J.T. Guy)
    Re: Regex question (i think) <Gened@ohinter.net>
    Re: resize pics <rcampbel@gbtech.net>
    Re: Server Running Perl - Resources? <troyknight@troyknight.eurobell.co.uk>
    Re: The Perlfaq Man Can! (was: problems with chmod func <tchrist@mox.perl.com>
    Re: timing for socket connect <rootbeer@redcat.com>
        URL <technology@workmail.com>
        Using BigFloat? <artlore@sirius.com>
    Re: webget, perl 5.005_03 on Linux, cryptic error (marek jedlinski)
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: 26 Jun 1999 00:38:15 GMT
From: "Rich Campbell" <rcampbel@gbtech.net>
Subject: "Slurping" a .jpg file
Message-Id: <01bebf6c$26ca06e0$c5dfffcc@upstairs>

I want to modify some of the internal stuff in a ".jpg" file:

something like:
find the first "FF FE" in the file
update the counter - which is the next (XX XX) after that
INSERT MY text either immediately AFTER the XX XX 
or
INSERT MY text at the end of the existing text data (which starts
immediately after XX XX)
the original text is (XX XX - 2) long - if there's NO existing text then XX
XX = 00 02

then write the modified stuff out as a ".jpg" file again

(note - this format assumes that the .jpg file has been processed with GWS
Professional - it may NOT work with YOUR picture)

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

I've tried "slurping" the file by:

open(FD, "picture.jpg");

undef $/;

$file = <FD>; 

but no go (but it works fine for a .txt file)

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

Suggestions (Other than Perlfaq5 - been there)


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

Date: Fri, 25 Jun 1999 23:56:02 +0200
From: Kristian Elbo <Kelbo@rhk.dk>
Subject: AccessDB->Unix compatible database
Message-Id: <3773FAF2.61F83FEA@rhk.dk>

This is a multi-part message in MIME format.
--------------A8322A63C1864F6B330FA7CF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

We are having some trouble getting the DBI modules running under NT, and
where considering switching server to a unix-server.
However the question we have is the following:
Which database (out of the many types that are available under unix) is
most efficient, and are there any cross-platform databases, that can be
edited from win95/98/NT and still be read in Unix??

Kristian@just.spent.the.last.three.hours.and.no.conclusive.results....it's.a.jungle
:-)

--------------A8322A63C1864F6B330FA7CF
Content-Type: text/x-vcard; charset=us-ascii;
 name="Kelbo.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Kristian Elbo
Content-Disposition: attachment;
 filename="Kelbo.vcf"

begin:vcard 
n:Elbo;Kristian
tel;cell:20 68 84 27
tel;home:+45 35392666 - 528
x-mozilla-html:TRUE
org:University of Copenhagen;August Krogh
adr:;;Jagtvej 120, room 528;Copenhagen;;2200 N;Denmark
version:2.1
email;internet:Kelbo@rhk.dk
title:Stud. Human Physiology
fn:Kristian Elbo
end:vcard

--------------A8322A63C1864F6B330FA7CF--



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

Date: Fri, 25 Jun 1999 18:54:39 -0400
From: glasser@iname.com (David Glasser)
Subject: Re: ASCII character coversion
Message-Id: <1dtypi9.675hfxcnhs0N@usol-209-186-16-59.uscom.com>

Steve . <syarbrou@nospam.enteract.com> wrote:

> I have the character P.  I am redoing a program that uses ascii
> conversions was told by the original programmer that the ascii value
> should be 0x50.  I get an ord value of 80.  What am I missing here?

As others have said, you should look at perldoc perldata to see what
0x50 represents, and at the 'ord', 'chr', and 'pack' functions in
perldoc perlfunc.  The first will tell you that 0x50 is a numeric
constant like 80 is, but in hexadecimal (hex).

However, if what you are confused about is what hexademical notation is,
I can't find anywhere in the Perl documentation that tells a reader who
has never heard of hex what it is; it merely refers to 'hex notation' in
many places.  This is probably reasonable, as most programmers already
know what hex is.  So if you're just confused about what this hex thing
is, read on.

Hexadecimal notation is a way to write numbers using base 16 instead of
the usual base 10.  The digits used are qw(0 1 2 3 4 5 6 7 8 9 A B C D E
F).  A through F correspond to decimal 10 through 15.  Each place
represents a multiple of sixteen instead of ten.

So, hex 2a (written 0x2a in Perl and C) means 2*(16**1)+10*(16**0) == 33
in decimal.  0x50, the subject of your question, represents 5*16 ==
decimal 80.

Now that you know that, read the perldoc pages listed above.

-- 
David Glasser: glasser@iname.com       | http://www.uscom.com/~glasser/
DGlasser@ifMUD:orange.res.cmu.edu 4001 | raif FAQ http://come.to/raiffaq


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

Date: Fri, 25 Jun 1999 23:25:57 +0100
From: Chris <chris@netsoc.tcd.ie>
Subject: Backsniffing
Message-Id: <Pine.LNX.3.96.990625232407.17832B-100000@apollo.netsoc.tcd.ie>

Hi,

Can anyone tell me how to find out what URL a visitor to my page visited
before coming to mine?  Would I use cookies or some other method?
Know any URL where I could find the PErl sourcecode for this?

Thanks,

Chris 




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

Date: Fri, 25 Jun 1999 15:59:25 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Beginner's Question
Message-Id: <MPG.11dda9a3cbc46a4a989c4b@nntp.hpl.hp.com>

[Posted and a courtesy copy mailed.]

In article <7l0kp5$pi3$1@dumber.ktis.net> on Fri, 25 Jun 1999 14:24:44 -
0500, Erik Denkers <edenkers@ktis.net> says...
 ...
> Don't think I'm dense but...
> 
> Array --- @myarray = (1,2,3)
> 
> Reference --- $myref = [1,2,3]
> 
> What is the difference, both contain same data, no?

What you are overlooking, and what the other responders haven't dealt 
with, is that one is typically creating these arrays in a loop on some 
data, and doesn't know in advance how many there are.  You do NOT want 
to generate names for these arrays on the fly.  (If you don't understand 
why yet, just search this newsgroup for 'Symbolic References'.)

So you let Perl create anonymous arrays, which you can refer to by 
references to them -- nicknames, as it were.

my @a;
foreach (0 .. 9) { $a[$_] = [ ] }

or, in more sophisticated Perl:

my @a = map [ ] => 0 .. 9;

Now there is an array of ten arrays, each referred to by $a[$i];

Look, Ma, no names!

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


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

Date: Sat, 26 Jun 1999 02:09:00 +0100
From: "Eli Osherovich" <ilyao@tx.technion.ac.il>
Subject: Re: Can't retain a directory change from within a script!
Message-Id: <7l1219$7se$1@techftp.technion.ac.il>

 I use this script

use HtmlHelp;
$LIB = "E:\\Perl\\lib";
$HTML = "E:\\Perl\\html";
$SITELIB = "E:\\Perl\\site\\lib";

&HtmlHelp::MakePerlHtml();

Paul D Enderson <
> wrote in message news:MPG.11dd73de5ebdb056989680@news.demon.co.uk...
> Hello,
>
> I am trying to write a Perl5 script on an HP-UX machine that searches
> through many directories trying to match a user input of three
> characters, eg:
>
> GO ABC (finds ABC_DEF, ABCD, ABC-BLUE etc)
>
> I want to have the program change directory when it has found a match.
> The problem I am having is that when I change directory from within the
> script, and then exit the script, the directory change has been lost. I
> think this is caused by Perl spawning a new shell to run the script (or
> something similar) :)
>
> Is there a way of retaining the modified directory variable once I have
> quit the script? Any help would be greatly appreciated. Please CC to my
> email address:
>
> techsup(at)datascan.co.uk
>
> Thanks!
>
> Paul D Enderson




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

Date: Fri, 25 Jun 1999 16:57:48 -0500
From: John Warner <john.warner@tivoli.com>
Subject: Re: CGI.pm, hashes, passing by reference and two different results?
Message-Id: <3773FB5C.D381478B@tivoli.com>

I've come up with a much simpler example that exihibits the same behavior
as the script in my original post.

Step 1:  Input File (navbar.dat):
# Navigation Bar
Home    /sig/index.cgi
Tutorials  /sig/tutorials/index.cgi

Step 2:  The Script:
#!/usr/local/bin/perl -w
use strict; #Use for debugging
use CGI qw/:standard :html3/;
use CGI::Carp 'fatalsToBrowser';

my $active=0;
my ($label,$url,@row,$cell);
my $count = 0;

open FH, "navbar.dat";
while (<FH>){
    chomp;
    next if (/^#/);
    ($label,$url)= split (/\s+/);
    $cell = a({-href=>$url},$label);
    push @row,$cell;
    $count++;
}
close FH;

print header,
    start_html,
    table({-border=>"none"},TR(td([@row]))),
    end_html;

#--end script--
Step 3:  The Results:
Command Line:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
</HEAD><BODY><TABLE BORDER="none"><TR><TD><A
HREF="/sig/index.cgi">Home</A></TD> <TD><A HREF="/sig/tutorials/index.cgi">

Tutorials</A></TD></TR></TABLE></BODY></HTML>

Browser:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
</HEAD><BODY><TABLE BORDER="none"><TR></TR></TABLE></BODY></HTML>

If I change the line
            table({-border=>"none"},TR(td([@row]))),
to
            table({-border=>"none"},TR(td([\@row]))),

Both the browser and command line return:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML><HEAD><TITLE>Untitled Document</TITLE>
</HEAD><BODY><TABLE
BORDER="none"><TR><TD>ARRAY(0x10c57b8)</TD></TR></TABLE></BODY></HTML>

Does anyone have an idea what is happening here?

--
John Warner                     Tivoli Systems Inc.
Sales Support Engineer          9442 Capital Of Texas Hwy North
Sales Infrastructure Group      Austin, TX 78759
john_warner@tivoli.com




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

Date: Fri, 25 Jun 1999 23:33:40 GMT
From: tram@olympic.seas.ucla.edu (Tri Tram)
Subject: Filter Modules
Message-Id: <FDwpG4.9zF@seas.ucla.edu>

I have been trying to learn how to use the Filter module from CPAN.  I have
read through the faq and went to numerous web pages, but nothing actually
help.  I was wondering if anybody else out there have used the Filter
module already?  I also downloaded the module, but there wasn't much 
documentation in that either.  Help please.

--
-----------------------------------------------------------------
Tri Tram, Computer Science and Engineering at UCLA
http://www.seas.ucla.edu/~tram


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

Date: Fri, 25 Jun 1999 18:54:35 -0500
From: Michael Carman <mjcarman@zeus.ia.net>
Subject: Re: HELP: Can't delete ONE stinking file with Unlink!
Message-Id: <377416BB.830E2CE7@zeus.ia.net>

> > Speaking of documentation, I have about 6 books on Perl and not one of
> > them says explicitly that I have to chdir to a directory in order to
> > delete a file from it,
>
> ...which is good, since you don't have to. But you do have to give the
> correct (relative) pathname. If you say you want to delete the file
> 'fred', that's 'fred' in the current directory.

Actually, Perl on NT is more restrictive than that. To use unlink() on NT,
you must specify the *full* pathname to the file to be deleted. From my
experiences, this means "x:\foo\bar\baz\blat.txt" Network paths such as
"\\myserver\foo\bar\baz\blat.txt" do NOT work. Of course, you still won't be
able to delete the file if you don't have the appropriate permissions. Why
are things this way? I don't know. I find it annoying although I suppose
(hope) there's a good reason for it.

-mjc



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

Date: 25 Jun 1999 17:15:39 -0700
From: gerg@shell.ncal.verio.com (Greg Andrews)
Subject: Re: HELP: Can't delete ONE stinking file with Unlink!
Message-Id: <7l163b$g5u$1@shell1.ncal.verio.com>

roberthp@my-deja.com writes:
>I think I'm in the right directory....  What confuses me about this is
>why I can open and get a directory listing but can't do the deletion of
>a file I'm listing as resident in the directory; you're probably right
>about the chdir, but it still confuses me (I'm new at this Perl
>thing....).
>
>Speaking of documentation, I have about 6 books on Perl and not one of
>them says explicitly that I have to chdir to a directory in order to
>delete a file from it, unless I completely missed it (Programming Perl,
>Perl Cookbook, Learning Perl for Win32, Perl for Win32 - Standard
>Extensions, Perl Black Book, and Perl for Dummies).  Maybe I should
>read the last one again!
>

No, just read the _Programming Perl_ entry for readdir() again.
Specifically the text just before the last example, which says:

  But be careful about that last one, because the result of readdir
  needs to have the directory part glued back on if it's not in the
  current directory -- like this:

    [example deleted]


  -Greg


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

Date: Sat, 26 Jun 1999 00:29:09 GMT
From: emcmanus@worldnet.att.net
Subject: How do I do this?
Message-Id: <37741c6c.3016861@netnews.worldnet.att.net>

I have read the FAQ and I'm still not able to get this right.

I'm using the users IP address in a script, but what I'd 
prefer is only using the first three values of the IP address.

Example:
Using
151.204.202.20
Want
151.204.202

I can't specify the number of characters to cut from the right 
because that is different with each IP address.  When I 
searched and replaced on the "." it did it on the first "."
in the string and I didn't understand how to do the third instance
of "." search and delete.

Any help is appreciated.

Earl


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

Date: Fri, 25 Jun 1999 23:09:39 GMT
From: pedro@nospam.co.uk
Subject: Is dbi multi threaded?
Message-Id: <37750bbd.1675607@news.free-online.net>

Do you still get multi-threading
when you use dbi to access a
multi-threaded database?

pedro


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

Date: 26 Jun 1999 00:40:54 GMT
From: zippy@cs.brandeis.edu (Patrick Tufts)
Subject: large files (>2G), perl, solaris 2.6 x86
Message-Id: <7l17im$11e$1@new-news.cc.brandeis.edu>

I find that when the file I want to open exceeds 2G, perl barfs when I
attempt an:

        open <FILE> "<really-large-file" or die ...

Based on similar problems reported here in the past (but with other
operating systems), I bellieve the file postion associated with <FILE>
is an int, and on this machine, 2G is greater than the size of int.

What can I do?  What is necessary to open large text files in Perl on
this platform?

I'm running Perl 5.005_02 built for i86pc-solaris

Replies via email greatly appreciated.  I will post a summary of
responses here.

--Pat
Subject: large files (>2g), perl, solaris 2.6 x86
Followup-To: poster
Date: 25 Jun 1999 19:53:27 GMT
Organization: Brandeis University, Waltham MA
Lines: 22
Message-ID: <7l0mnn$o2n$1@new-news.cc.brandeis.edu>
NNTP-Posting-Host: spinel.cs.brandeis.edu
Summary: want to open a large file (>2G) in perl, how?
Xref: new-news.cc.brandeis.edu comp.lang.perl:2350

I want to open a >2G flat text file in perl on solaris 2.6 (x86).

I find that when the file I want to open exceeds 2G, perl barfs when I
attempt an:

        open <FILE> "<really-large-file" or die ...

Based on similar problems reported here in the past (but with other
operating systems), I bellieve the file postion associated with <FILE>
is an int, and on this machine, 2G is greater than the size of int.

What can I do?  What is necessary to open large text files in Perl on
this platform?

I'm running Perl 5.005_02 built for i86pc-solaris

Replies via email greatly appreciated.  I will post a summary of
responses here.

--Pat



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

Date: 26 Jun 1999 00:01:54 GMT
From: "Rich Campbell" <rcampbel@gbtech.net>
Subject: Re: Looking for very small, basic bulletin board system
Message-Id: <01bebf67$12b8f300$c5dfffcc@upstairs>

heh heh - I think there's a "bot" on here that randomly answers questions
with
"try reading PerlFaqXXXX" 

you might try http://www.worldwidemart.com/scripts/wwwboard.shtml
I've used it and customized it a little (it's sort of plain - but works
great)

ivanhead@my-deja.com wrote in article <7kospg$jos$1@nnrp1.deja.com>...
> Oh, I'm ecstatic.
> 
> Could you perhaps give me a some more useful information?
> 
> In article <376FD6EE.C7E6486F@mail.cor.epa.gov>,
>   David Cassell <cassell@mail.cor.epa.gov> wrote:
> > yvan@wharris.com wrote:
> > >
> > > I need a very small and basic bulletin board system for use in a web
> > > page.  What I would like is a cgi script that would allow me to do
[snip]
> > You'll be happy to know that there's a thousand of these on the
> > web.  Just don't go to Matt's Script Archive.  Happy searching!
> >
> > David
> > --
> > David Cassell, OAO                     cassell@mail.cor.epa.gov
> > Senior computing specialist
> > mathematical statistician



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

Date: Fri, 25 Jun 1999 18:41:52 -0500
From: Michael Carman <mjcarman@zeus.ia.net>
Subject: Re: problem passing array back
Message-Id: <377413C0.A034F24E@zeus.ia.net>

I think I see your problems...

> [....]
> my @rows;
> if ( (MyStuff::DataLoad::query_stu($stmt,$mydb,\@rows)) ) {
> [...]

This looks good, your passing a reference to @rows to the sub.

>  [...]
>  sub query_stu {
>     (my $query, my $handle,my $rows)=@_;

Okay here, taking the ref into a scalar.

> [...]

>  MyStuff::Mydb::exec_cmd($query,$handle,\$err1,\$err2,\$rows);

Bang. First problem.  You're passing \$rows as an argument. That's not a
reference to @rows, it's a reference to $rows. So you're
double-referencing your original array. Try passing $rows instead. Don't
feel bad, I've made the same mistake myself.

>     [...]

>     if ( $fndrows gt 0 ) {
>         $$errcd=$fndrows;
>         $$errtxt="success";
>         $row=$sth->fetchall_arrayref;
>         }

Two things here:
1) Is $row supposed to be $rows?  Obviously if you set the wrong variable
name you don't get data where you expect it to be. Did you run it with -w?
If so that and use strict should have warned you about this.
2) Assuming it is supposed to be $rows: I take it that
$sth->fetchall_arrayref returns an array *reference*? If so, you've
changed $rows to point to a different array; nothing at all to do with
where it pointed before. And if it returns an array? Well, it's still no
good. You're setting $rows here -- a scalar. You haven't dereferenced it,
so you aren't setting @rows, you're clobbering the reference you put
there. So what to do? Assuming that $sth->fetchall_arrayref does return an
array reference, try this:

@{$rows} = @{$sth->fetchall_arrayref};

That will derererence *both* things, and copy your data into @rows.

-mjc




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

Date: Fri, 25 Jun 1999 18:54:45 -0400
From: glasser@iname.com (David Glasser)
Subject: Re: Problem with regular expression
Message-Id: <1dtywci.11igcjv1vfgfgmN@usol-209-186-16-59.uscom.com>

Michael Wahl <tis5miwa@fht-esslingen.de> wrote:

> Tom Phoenix wrote:
> 
> > On Fri, 25 Jun 1999, Michael Wahl wrote:
> >
> > > Now the regexp should find the strings but only if it doesn't contain
> > > the word "Paper".
> >
> > Are you asking for a pattern which will match any string which does not
> > contain 'Paper'? Maybe you want to simply negate the result of /Paper/ .
>
> Yes thats exactly what I search for.
> I search for a regexp which will match any string which does not contain
> 'Paper'.

Right, so do:
if ($line !~ /Paper/)

The !~ operator does the exact same thing as =~, except it negates the
result, so this is the same as:

if (!($line =~ /Paper/))

See perldoc perlre for more information.

-- 
David Glasser: glasser@iname.com | raif FAQ: http://come.to/raiffaq/


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

Date: Fri, 25 Jun 1999 15:47:14 -0700
From: lr@hpl.hp.com (Larry Rosler)
Subject: Re: Question about hashes and lists
Message-Id: <MPG.11dda6cd8a6e0d25989c4a@nntp.hpl.hp.com>

In article <7l0jtk$cn8$1@nnrp1.deja.com> on Fri, 25 Jun 1999 19:05:34 
GMT, John Porter <jdporter@min.net> says...
 ...
> Tip: don't call hashes or arrays "lists"; that only confuses things.

She's just following the terminology in the documentation, which goes on 
forever about Lists of Lists and Hashes of Lists, etc.

perlLoL - Manipulating Lists of Lists in Perl

LoL!  But not ROTFLOL.  :-(

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


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

Date: 25 Jun 1999 23:14:57 GMT
From: mjtg@cus.cam.ac.uk (M.J.T. Guy)
Subject: Re: Read a file starting a a certain point in the middle
Message-Id: <7l12hh$1oh$1@pegasus.csx.cam.ac.uk>

Philip 'Yes, that's my address' Newton <nospam.newton@gmx.net> wrote:
>
>True. However, this does not help the person who knows "$. was 28792
>at the end of yesterday's run, so I'll just seek to ... errm, what
>(byte) offset *do* I seek to?"

But why would you remember $. ?     The obvious thing to remember is the
result from tell().


Mike Guy


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

Date: Fri, 25 Jun 1999 20:29:52 -0400
From: Gene Dolgin <Gened@ohinter.net>
Subject: Re: Regex question (i think)
Message-Id: <37741F00.56BD2AA5@ohinter.net>

You know, after all these responses, i sitill have no clue how to do it.
What i need is to go to a page like
http://www.networksolutions.com/cgi-bin/whois/whois/whois?SETSTYLE-DOM and
pull the email from it.  And for some weird reason, i only get blanks, i've
tried lotsa stuff, my current code is ($emailxtract) = $resp->content =~ /
 .*@.*\..*\n/; but that doesn't work.  Please help me

-gene

Gene Dolgin wrote:

> How can i use regex to extract an email from a $string?  Ive been trying
> for a while now and i can't get the entire email address.  Its not for a
> spammer.  Its for an email list converter (im switching mailing services
> and need to transfer the list)
>
> -gene



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

Date: 26 Jun 1999 00:16:06 GMT
From: "Rich Campbell" <rcampbel@gbtech.net>
Subject: Re: resize pics
Message-Id: <01bebf69$0f141c00$c5dfffcc@upstairs>

You might look at http://www.wizards.dupont.com/cristy/ImageMagick.html
I haven't tried the stuff there - but I hope to....

> >I4m looking for a perl script to resize gifs and jpgs.
> >I wanna make thunbnails automatically.



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

Date: Fri, 25 Jun 1999 23:09:12 +0100
From: "Troy Knight" <troyknight@troyknight.eurobell.co.uk>
Subject: Re: Server Running Perl - Resources?
Message-Id: <7l0ufv$7j0$1@aub.eurobell.net>

lol

TRG Software : Tim Greer <webmaster@chatbase.com> wrote in message
news:3772C63C.C10F9B5E@chatbase.com...
> Troy Knight wrote:
>
> <SNIP>
>
> > > > This isn't the best place to ask about servers but I guess your all
> > pretty
> > > > knowledgable about servers seeing as most people set them up when
they
> > > > program in perl.
> > >
> > > I would guess most don't. You should read through more of the posts
> > > here. :-)
> > >
> > > > What kind of a system would be needed to run a server online for one
> > large
> > > > website which uses up alot of cgi resources.
> > >
> > > I don't know, how well can you write a CGI script? Can you write them
> > > efficiently? Or do you write slow, buggy programs? Do you plan to make
> > > the same mistake as a lot of other sites and use free CGI scripts?
> > >
> >
> > --If I can program in perl why would I need to use free scripts?
>
> You never made mention of the fact that you could program. My point was,
> that it makes a big difference. If someone doesn't know how to code
> efficiently, then you'll need a faster server or a better programmer.
>
> > > > A pop, smtp, nntp server would
> > > > also be running on the same machine with a couple of hundred users.
> > >
> > > A couple of hundred users at once? A couple of hundred users at once
> > > hitting those CGI scripts? Relaying huge emails? downloading 100's of
NG
> > > posts per minute?
> > >
> >
> > --Couple of hundred users/accounts, as I said
>
> And again, I asked how many people would be accessing it at once (A good
> estimate or peek estimate) and what they'll be doing. This *does* matter
> a lot as well.. Not just the number.
>
> > > > The site
> > > > would be getting about 5000 visitors a day.
> > >
> > > Visitors or hits? What will they be doing? Is this on top of the 100
> > > other users?
> > >
> >
> > --5000 visitors, as it says
>
> Right, and yet again, again, I asked that those 5,000 visitors will be
> doing. Will they be calling CGI scripts, or will 95% or more be making
> simply httpd requests for web pages? I.e., "how many will be accessing
> the CGI scripts?". If very few are, then it calls for less system
> resources.
>
> > > > I have a p166mmx with 64meg of
> > > > ram and an average speed hd.
> > >
> > > What OS? What web server? What sort of connection?
>
> What OS, what sort of connection? Just kidding, I'm trying to explain
> why I stated those things. :-)
>
> > > > Any ideas then anyone on whether this could cope with all that load?
> > >
> > > I don't know, how well can *you* set up, maintain and run a web
server?
> > > How well can you code CGI scripts? Are you going to do this yourself
or
> > > hire someone to set it up? Why don't you ask the person you plan to
hire
> > > to set it up, of what would work? Do you have someone to set this up
for
> > > you? It sounds to me like you need someone to set it up... Want to
hire
> > > me? You can tell me everything you want to do, plan to do, etc. and
I'll
> > > tell you what you need, and I'll set it up for you.
> > >
> >
> > --I've seen better ads!
>
> It was a joke - not an ad. I wouldn't feel comfortable getting a job
> that way.
>
> > > You'd be better off asking this in another NG, something more geared
> > > towards web servers.
> >
> > --Okay, fair enough.
>
> Cool, you got the point. :-)
>
> <SNIP>
> --
> Regards,
> Tim Greer   : webmaster@chatbase.com  | software@linkworm.com
> The ChatBase: http://www.chatbase.com | 250,000+ hits daily Worldwide!
> TRG Software: http://www.linkworm.com | CGI scripts in Perl/C, & more.
> Unix/NT/Novell Administration, Security, Web Design, ASP, SQL, & more.
> Freelance Programming & Consulting, Musician, Martial Arts, +Sciences.




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

Date: 25 Jun 1999 17:39:36 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: The Perlfaq Man Can! (was: problems with chmod function)
Message-Id: <37741338@cs.colorado.edu>

     [courtesy cc of this posting mailed to cited author]

In comp.lang.perl.misc, 
    David Cassell <cassell@mail.cor.epa.gov> writes:
:"Tom Christiansen IS Gene Wilder!"  - Rex Reed

Thank God.  I was afraid it'd be Barry Manilow.

    http://language.perl.com/misc/perlfaq-man-can

--tom
-- 
    "If ease of use is the highest goal, we should all be driving golf carts."
    	--Larry Wall


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

Date: Fri, 25 Jun 1999 15:11:00 -0700
From: Tom Phoenix <rootbeer@redcat.com>
Subject: Re: timing for socket connect
Message-Id: <Pine.GSO.4.02A.9906251502000.6929-100000@user2.teleport.com>

On Fri, 25 Jun 1999, Dave Greenberg wrote:

> Does anyone know if there is a way to change the timeout for the connect
> function call? 

I've never heard of one, short of recompiling the kernel. But you
shouldn't do that, really - you must allow enough time for the connection
to be made, that's all.

> More important, if my connect times out, but the web server invoking
> my perl script times out waiting for a response first, how can I
> handle this elegantly?

What's to handle? Once the webserver has quit waiting for your program,
no amount of begging is going to make it come back. 

On the other hand, you could do as Randal has done in his twentieth Web
Techniques column and give back a "please wait" page. (Hey! He mentioned
me in that column! I've got to start reading these columns more
closely....)

   http://www.stonehenge.com/merlyn/WebTechniques/

Good luck with it!

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



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

Date: Fri, 25 Jun 1999 16:54:43 -0700
From: Raj <technology@workmail.com>
Subject: URL
Message-Id: <377416C3.EBB93B1A@workmail.com>

The login page is a plain HTML page and the subsequent pages are
CGI/Perl Scripts.
Is there any better way to send the login+password info other than
appending them to the URL while passing to the CGI/Perl script? and same
info across Perl scripts.
how do we do that? TIA,
~Raj



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

Date: Fri, 25 Jun 1999 15:45:47 -0700
From: artlore <artlore@sirius.com>
Subject: Using BigFloat?
Message-Id: <3774069B.90597ECC@sirius.com>

I'm getting spurious (to me) error messages from the BigFloat module
such as as use of an unititialized value on line 78, in the middle of
the package's regexp stringify routine...

Hmmm.... The documentation is quite scanty for this module....  I've
followed the syntax recommended in the synopsis and I'm performing
rather rudimentary division and multiplication, albeit as part of an
FDE....

Any BigFloat veterans out there who might care to enlighten me?

Thanks,

Ed



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

Date: Sat, 26 Jun 1999 00:30:26 GMT
From: eristic@lodz.pdi.net (marek jedlinski)
Subject: Re: webget, perl 5.005_03 on Linux, cryptic error
Message-Id: <3773ee1f.37294198@153.19.253.204>

Tom Phoenix <rootbeer@redcat.com>  wrote:

>> I've been trying to run Jeffrey Friedl's 'webget' 
>
>While that may be a fine program, you may find it easier to use LWP (and
>LWP::Simple). You can get LWP from CPAN.

I have LWP, but the latest release still doesn't seem to support resuming
downloads[1], which is the one feature I need. I was trying to hack this
into webget and already had an idea on how to do it; with LWP I'm a little
lost for now. There's 'headers.pm' with mentions of "Accept-Ranges" and
"Range" headers, but I'm... unsure on how to use that. (I know the HTTP
drill and I've written a simple resuming downloader before, but not in
Perl.) Still, thanks for pointing the way, I'll try to go on from there.

 .marek

[1] At least directly. Unless I've missed something in the pods, that is.


-- 
General Frenetics, Discorporated: http://www.lodz.pdi.net/~eristic/



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

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


Administrivia:

Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing. 

]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body.  Majordomo will then send you instructions on how to confirm your
]subscription.  This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.

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

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