[6429] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 54 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Mar 5 08:11:51 1997

Date: Wed, 5 Mar 97 05:00:37 -0800
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 5 Mar 1997     Volume: 8 Number: 54

Today's topics:
     asosiate array - problems (Afgin Shlomit)
     Automated C++ prototyping? <ihh@sanger.ac.uk>
     CW File Permissions <105026.1111@CompuServe.COM>
     Deamons (or Services)  on WinNT--Anyone written any? <dduncan@realogic.com>
     Forking <schajer@dircon.co.uk>
     Re: Formatting numbers <dduncan@realogic.com>
     graphs and charts for WWW applications <mike@soft-tek.com>
     Re: Help: IlyaZ's Perl and SIGSEGV (Petr Prikryl)
     Re: How to spam - legitimately (Abigail)
     Re: How to spam - legitimately (tedder)
     Re: Image sending <eryq@enteract.com>
     Re: Is it possible? <lupex@ascu.unian.it>
     Re: Mail an attatchment with Perl <eryq@enteract.com>
     Passing more than one array <forster@hq.rnp.br>
     Perl & HTML complicatons <surber@earthlink.net>
     Re: Perl & HTML complicatons (brian d foy)
     Perl 5.003 compilation on BSDI 1.1 (Ian Kettleborough)
     Re: PLEASE HELP! I don't wanna get fired tomorrow!!  My (brian d foy)
     Re: Problem with LEARNING PERL Example <joiner@houston.omnes.net>
     Q: Good Perl Book <sigge.eriksson@usa.net>
     Re: Returning a reference to a 'my' variable <dbenhur@egames.com>
     Testing if a variable is a number or a string.(Newbie q <ceklof@vt.edu>
     Re: The Disappearing DOS box and cmd32.exe <d.j.evans@rdg.ac.uk>
     Re: weird split prob <dduncan@realogic.com>
     writing an inetd server in Perl (Des Herriott)
     Year2000 Conference Toronto (Year2000 Information Network)
     Digest Administrivia (Last modified: 8 Jan 97) (Perl-Users-Digest Admin)

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

Date: Wed, 5 Mar 1997 07:58:33 GMT
From: vshlomit@wishful.weizmann.ac.il (Afgin Shlomit)
Subject: asosiate array - problems
Message-Id: <1997Mar5.075833.18832@wisipc.weizmann.ac.il>


I write a program that scan a file and put the results in a few arrays
one of then is progs.
At the begining I initialize the array by writing :
     @progs = ();

then I count the line it apear with :
     $progs{$1} += 1;

Then when I print the output to a file I got a wrong number in a very few lines.
     foreach $prog (sort progbyvalue keys(%progs)) {
        printf PROGS1 "%-17s: %-9d %-16.3f %-15d\n", $prog, $progs{$prog}, $prog
time{$prog}, $number_of_user{$prog};

(sub progbyvalue { $progs{$b} <=> $progs{$a}; })
Is it my initializtion okay? I cannot reset the fields of the array because 
I dont know how much will be .

Please reply to  vshlomit@wishful.weizmann.ac.il.
Thanks, 

	Shlomit.
-- 

	Shlomit.


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

Date: Wed, 5 Mar 1997 09:18:25 +0000
From: Ian Holmes <ihh@sanger.ac.uk>
Subject: Automated C++ prototyping?
Message-Id: <Pine.OSF.3.91.970305091308.22481R-100000@scarp>


Hi all, quick question, help would be appreciated.

Like the slack programmer I am, I've been writing most of my C++ in my 
header files, not bothering to put separate prototypes and definitions 
in .h and .cc files respectively.

However, I'd now like to extricate the method definitions and put them in 
separate .cc files. Is there a perl program to do this?

Cheers,                 |    "Cake is a MADE-UP DRUG"
Ian Holmes              |                         --- Chris Morris


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

Date: 5 Mar 1997 01:05:05 GMT
From: Chuck/Debby Williams <105026.1111@CompuServe.COM>
Subject: CW File Permissions
Message-Id: <5figs1$s8l$1@mhafn.production.compuserve.com>

What would constitute proper file permissions for Perl on a Unix

(Op Sys BSDI 2.1) server?

I've seen chmod 755, chmod a+rx, and chmod +x <filename> in 
various tutorials.

Chuck Williams
aj321@detroit.freenet.org

-- 
Chuck/Debby Williams
105026.1111@compuserve.com


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

Date: Tue, 04 Mar 1997 12:41:36 -0500
From: Diana Duncan <dduncan@realogic.com>
Subject: Deamons (or Services)  on WinNT--Anyone written any?
Message-Id: <331C5ED0.784A@realogic.com>

I've written several daemons in Perl on Unix, but I am unsure how to go
about writing one on NT (and, unfortunately, I need to.  Woe is me).  I
was wondering if anyone had any examples of how to "daemonize" the
program?

I'll be working on this with help or no, and will post my results if
there is interest.
-- 
Diana Duncan	     | My opinions are my own.
Sr. Consultant	     | 
REALOGIC, Inc.	     | Excitement, Adventure and
dduncan@realogic.com | Really Wild Things - Z.B.


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

Date: Wed, 05 Mar 1997 10:13:44 +0000
From: Alex Schajer <schajer@dircon.co.uk>
Subject: Forking
Message-Id: <331D4758.794B@dircon.co.uk>

Hi,

I have two search scripts, one takes longer than the other to return
it's results. How do I start the first search (fork), do and show the
results of the second search, and then the first search should of been
returned and displayed?

Any ideas?

Thanks,

Alex


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

Date: Tue, 04 Mar 1997 13:29:11 -0500
From: Diana Duncan <dduncan@realogic.com>
Subject: Re: Formatting numbers
Message-Id: <331C69F7.4C73@realogic.com>

Dico Reyers wrote:
> 
> 
> Hello There...
> 
> I would like some help with formating numbers.
> 
> Say that:
> 
> $number = 1.345;
> 
> I would like that number rounded off to two decimal spots. So number
> would be  1.35  .
> 
> Please.... any help
> 
> ~Dico

Use sprintf.
	$rounded_number = sprintf("%.2f", $number);

Now, I've heard noises that sprintf is not efficient, but haven't seen
any other rounding functions.  Are there any?  What are the many ways to
do this?
-- 
Diana Duncan	     | My opinions are my own.
Sr. Consultant	     | 
REALOGIC, Inc.	     | Excitement, Adventure and
dduncan@realogic.com | Really Wild Things - Z.B.


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

Date: Tue, 04 Mar 1997 08:40:42 -0600
From: Mike Christensen <mike@soft-tek.com>
Subject: graphs and charts for WWW applications
Message-Id: <331C3469.3182@soft-tek.com>

For powerful charts and graphs for your web-based applications, please
take a look at GRAFSMAN/WWW from Soft-tek International, Inc.

Easily built into your applications, GRAFSMAN/WWW generates a GIF image
of your chart and will automatically create an imagemap to go along with
it.  You get dynamic graphs and the ability to make them an interactive
element in your application.

You will find a LIVE demonstration on our web site, along with links to
demonstrations showing GRAFSMAN/WWW in action with WebDBC and Web+:

http://www.soft-tek.com

If you need charts and graphs for your web applications, take a look at
the one that can have you on-line in no time--GRAFSMAN/WWW!


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

Date: 5 Mar 1997 10:58:39 GMT
From: prikryl@dcse.fee.vutbr.cz (Petr Prikryl)
Subject: Re: Help: IlyaZ's Perl and SIGSEGV
Message-Id: <5fjjkv$t0a@boco.fee.vutbr.cz>

Ilya Zakharevich (ilya@math.ohio-state.edu) wrote:
>[A complimentary Cc of this posting was sent to Petr Prikryl
><prikryl@dcse.fee.vutbr.cz>],
>who wrote in article <5f7cmi$605@boco.fee.vutbr.cz>:
 ...
>> glob() or backticks, the Perl quits with the message:
>>    Process terminated by SIGSEGV

>This is a bug on 5.003_05 (corrected soon afterwards). It means that
>your installation is broken (PERL_SH_DIR part). As usual, running with
>-w may help.

>> set perl_sh_dir=%perlroot%/bin

>Try forward slashes in perl_sh_dir (it gets some backward ones from
>%perlroot%). Again, it is fixed in later version.

Thanks. Now it works fine.

Petr

--
Petr Prikryl (prikryl@dcse.fee.vutbr.cz)   http://www.fee.vutbr.cz/~prikryl/
TU of Brno, Dept. of Computer Sci. & Engineering;    tel. +420-(0)5-7275 218


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

Date: Wed, 5 Mar 1997 05:44:30 GMT
From: abigail@ny.fnx.com (Abigail)
Subject: Re: How to spam - legitimately
Message-Id: <E6K2M7.6wo@nonexistent.com>

On Tue, 04 Mar 1997 23:30:32 GMT, Matthew Ahrens wrote in comp.lang.perl.misc:
++ 
++ How about, "I need to get cash at the ATM machine." Now, this is a little
++ more obviously bad form, because the "Automated Teller Machine machine"
++ doesn't make much sense (at least, not to me :).

Well, how do you think they call the machine that makes ATMs?

++ Also, "FTP" is often made into a verb, as in "Just FTP the upgrade.", using
++ FTP to mean "transfer using the File Transfer Protocal".

Perhaps. But there is also a program called 'ftp'. (Which of course
uses FTP, but that's not recursive). So, people might actually say
'Just ftp the upgrade', meaning to use the ftp program.

Too bad we can't speak in capitals.

Bottom line is that every knows what you mean if you say 'just ftp
the upgrade'. Whether it makes sense on a more abstract is not
relevant.


Abigail



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

Date: 5 Mar 1997 06:28:32 GMT
From: tedder@e-z.net (tedder)
Subject: Re: How to spam - legitimately
Message-Id: <5fj3qg$ea8@work2.e-z.net>

Maybe this should all go to alt.english or where ever all the English
freaks hang out :^)

Mike Zorn (rigoleto@kaiwan009.kaiwan.com) wrote:
: In <8cvi7itdjw.fsf@gadget.cscaper.com> Randal Schwartz <merlyn@stonehenge.com> writes:
: >>>>>> "Terry" == Terry Carroll <carroll@tjc.com> writes:
: >Terry> On 22 Feb 1997 05:09:42 GMT, Tom Christiansen <tchrist@mox.perl.com>
: >>> In comp.lang.perl.misc, Valdis Kletnieks <valdis.kletnieks@vt.edu> writes:
: >Terry> It's pretty common now to hear "email" as a noun.  "eletter" would be an
: >again. :-)
: >So, there's no such word as "emails".
:  
:     [newsgroups clipped to c.l.p.m., 'cause this really doesn't have
: anything to do with any of them, but Randal touched it last.]
:    I agree.  (Though I have been known to work on several CGIs
: simultaneously.  In Perl.  Of course)
:    'emails' is equivalent to 'deers'; an unnecessary plural.
:    Unfortunately, it is an uphill battle (see Sisyphus).  This morning
: someone said in a newsgroup, "I'm webmastering a site...".   Maybe he's
: pursuing the art of webmastery.
: 
: Mike Zorn      rigoleto@kaiwan.com
:   http://www.kaiwan.com/~rigoleto/
: "As the most participatory form of mass speech yet developed, the
: Internet deserves the highest protection from governmental intrusion."
:     - - U. S. District Judge Stewart Dalzell


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

Date: Wed, 05 Mar 1997 00:45:18 -0600
From: Eryq <eryq@enteract.com>
To: paolo.p@oasi.asti.it
Subject: Re: Image sending
Message-Id: <331D167E.41737461@enteract.com>

paolo.p@oasi.asti.it wrote:
> 
> How can I send image through the server with a perl 5 script but without
> uuencoded them?
> I would like to send them in mime format as file attach in the mail.
> How can I do?
> Help me!! :(

Get a copy of the new (Alpha-release) MIME::Lite module, either
from the CPAN authors/Eryq directory, or directly from:

	http://enteract.com/~eryq/CPAN/MIME-Lite/

Documentation also online, at:

	http://enteract.com/~eryq/CPAN/MIME-Lite/docs/MIME/

You can do attachments, the files can be really long, you can output
the MIME to a string, or a filehandle, and you can even send the message
(on Unix).  Hope that helps!
-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@enteract.com)
 / _ \| '_| | | |/ _ ' /  Hughes STX, NASA/Goddard Space Flight Cntr.
|  __/| | | |_| | |_| |   http://www.enteract.com/~eryq
 \___||_|  \__, |\__, |___/\  Check out STREETWISE, Chicago's newspaper
           |___/    |______/ of the homeless: http://www.streetwise.org


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

Date: Wed, 5 Mar 1997 09:53:37 +0100
From: Roberto Lupi <lupex@ascu.unian.it>
To: Pascal Houde <houde@lynx.cisti.nrc.ca>
Subject: Re: Is it possible?
Message-Id: <Pine.LNX.3.93.970305095211.9586B-100000@ascu.unian.it>



On Mon, 13 Jan 1997, Pascal Houde wrote:

> I have a HTML form that calls a Perl script.

> --------------------
> 
> Do you catch the idea?  I want to show a different screen after the user
> pushed the submit button.  Then, once the order is processed, I want to
> display another screen (on a different page of course).  Actually, it 
> waits the perl script to be finished then it outputs everything on the
> same page...

You should use Server Push or Client Pull... but I have no idea about how
to do it.



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

Date: Wed, 05 Mar 1997 00:44:09 -0600
From: Eryq <eryq@enteract.com>
To: Cheng Tyh Lin <a00lcj00@elc012.nchc.gov.tw>
Subject: Re: Mail an attatchment with Perl
Message-Id: <331D1639.7A108A28@enteract.com>

Cheng Tyh Lin wrote:
> 
> Hi,
>   How can I do that if I want to attatch a file(not an plain text, such as
> tgz, zip...) after an mail? This may be useful if the file is too large
> to download or the network speed is so slow. By using this method, it may
> save much time to download from abroad on the web! Is there somebody could
> tell me how to do that or how to find the tools.
>   Thanks in advance.
> 
> Lin.

Get a copy of the new (Alpha-release) MIME::Lite module, either
from the CPAN authors/Eryq directory, or directly from:

	http://enteract.com/~eryq/CPAN/MIME-Lite/

Documentation also online, at:

	http://enteract.com/~eryq/CPAN/MIME-Lite/docs/MIME/

You can do attachments, the files can be really long, you can output
the MIME to a string, or a filehandle, and you can even send the message
(on Unix).  Hope that helps!

-- 
  ___  _ _ _   _  ___ _   Eryq (eryq@enteract.com)
 / _ \| '_| | | |/ _ ' /  Hughes STX, NASA/Goddard Space Flight Cntr.
|  __/| | | |_| | |_| |   http://www.enteract.com/~eryq
 \___||_|  \__, |\__, |___/\  Check out STREETWISE, Chicago's newspaper
           |___/    |______/ of the homeless: http://www.streetwise.org


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

Date: Tue, 4 Mar 1997 14:43:38 -0300
From: Antonio Paulo Salgado Forster <forster@hq.rnp.br>
Subject: Passing more than one array
Message-Id: <Pine.SOL.3.95.970304142005.12741A-100000@colibri.hq.rnp.br>


Hello Gurus,

I'd appreciate your help on this...
I need to pass more than one array to a subroutine, but I'm not sure about
the best way to do it...
do I need to pass the number of elements of each array before the arrays
themselves?
e.g.:

&sub ($#array1, $#array2, @array1, @array2);

how about to get them from the function? Should I return the $#...s first?

TIA,

Antonio Forster
--

Antonio Paulo Salgado Forster  
Operacoes em Redes - RNP




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

Date: Wed, 05 Mar 1997 00:16:24 -0800
From: "Christopher M. Surber" <surber@earthlink.net>
Subject: Perl & HTML complicatons
Message-Id: <331D2BD7.3D44@earthlink.net>

yes yes its more perl questions;
here goes:

as the script is read by perl it is reading the "HTML" code and
confusing it with the perl code, ive tyied to escape the html  in
different ways but to not much avail, the code i have so far is 
++++++++++++++++++++++++++++++++++++++++
#!/usr/local/bin/perl -w

print "what file?";
chomp($filename = <STDIN>);
open (THATFILE, "$filename") || die"cannot open $filename";

while (<THATFILE>) {

($lname,$fname,$location,$mailstop,$phone) = split(/\s/);

{

print"<HTML>\n";
print"<HEAD>\n";
print"<TITLE>No Title Yet</TITLE>\n";
print"</HEAD>\n";

print'<TABLE WIDTH="450" BORDER="1" CELLSPACING="2" CELLPADDING="0">\n';
print'<TR>\n';

print'<TD WIDTH="20%">$lname</TD>\n';
print'<TD WIDTH="20%">$fname</TD>\n';
print'<TD WIDTH="20%">$location</TD>\n';
print'<TD WIDTH="20%">$mailstop</TD>\n';
print'<TD WIDTH="20%">$phone</TD>\n';
print'</TR>\n';
print'</TABLE>\n';

print'</BODY>\n';
print'</HTML>\n';



}

}
++++++++++++++++++++++++++++++



and what im gitting is 


+++++++++++++++++++++++++++++


<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>
<TABLE WIDTH="450" BORDER="1" CELLSPACING="2"
CELLPADDING="0">\n<TR>\n<TD WIDTH=
"20%">$lname</TD>\n<TD WIDTH="20%">$fname</TD>\n<TD
WIDTH="20%">$location</TD>\n
<TD WIDTH="20%">$mailstop</TD>\n<TD
WIDTH="20%">$phone</TD>\n</TR>\n</TABLE>\n</
BODY>\n</HTML>\n

++++++++++++++++++++++++++++++

the $variables are not gitting inserted into the output, and the "\n" is
being inserted in between each frame.

i would be gratefull any help on this

thanx chrisssssssssssssssss...
-- 
================================ 
Just because you're not Paranoid,
 don't mean their not after you.
================================
   ONLY THE PARANOID SURVIVE!
================================
      surber@earthlink.net
   surberc@elwha.evergreen.edu
================================


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

Date: Wed, 05 Mar 1997 06:59:30 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: Perl & HTML complicatons
Message-Id: <comdog-0503970659300001@nntp.netcruiser>

In article <331D2BD7.3D44@earthlink.net>, surber@earthlink.net wrote:

> as the script is read by perl it is reading the "HTML" code and
> confusing it with the perl code, ive tyied to escape the html  in
> different ways but to not much avail, the code i have so far is 

> 
> print'<TABLE WIDTH="450" BORDER="1" CELLSPACING="2" CELLPADDING="0">\n';
> print'<TR>\n';
>
> print'<TD WIDTH="20%">$lname</TD>\n';

what's all this then? if you want variable interpolation, you need to
use double quotes (" or the qq method).

what might even be better for you are here documents, which make
your life much easier and your code much easier to read and to 
maintain.  like so:

print <<"HTML";
<HTML>
<HEAD>
<TITLE>No Title Yet</TITLE>
</HEAD>

<TABLE WIDTH="450" BORDER="1" CELLSPACING="2" CELLPADDING="0">\n';
<TR>

<TD WIDTH="20%">$lname</TD>
<TD WIDTH="20%">$fname</TD>
<TD WIDTH="20%">$location</TD>
<TD WIDTH="20%">$mailstop</TD>
<TD WIDTH="20%">$phone</TD>
</TR>
</TABLE>

</BODY>
</HTML>
HTML

-- 
brian d foy                              <URL:http://computerdog.com>                       
unsolicited commercial email is not appreciated


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

Date: 5 Mar 1997 08:44:05 GMT
From: ian@idk.com (Ian Kettleborough)
Subject: Perl 5.003 compilation on BSDI 1.1
Message-Id: <5fjbol$lj4@hoho.quake.net>

I'm having trouble coompiling Perl 5.003 on BSDI 1.1. Compile 
errors. Has someone successfully compiled and installed this 
version on 1.1 and can offer some advice of how to do it.

Thanks
Ian



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

Date: Wed, 05 Mar 1997 01:14:06 -0500
From: comdog@computerdog.com (brian d foy)
Subject: Re: PLEASE HELP! I don't wanna get fired tomorrow!!  My girlfriend leaves me last week now this!  Ugh!
Message-Id: <comdog-0503970114060001@nntp.netcruiser>

In article <331CE6C8.7176@Media-Link.Com>, Steve.Karr@Media-Link.Com wrote:

> Please, oh, please help!  If my boss asks "Ya got it done yet?" one
> more time I think I'll curl up into a ball and cry (while chewing on
> my camel book).
> 
> SOLUTION: to be able to click on a file and have a browser pop up
> dialog to save it locally (no matter the file type) for the user to
> download it with out having to right click save as.  I need to serve
> up files.  No biggie?  I've been working on this since Monday morning
> and I'm way burned out.
> 
> PROBLEM: (1) when the save box appears, the default save as filename
> is my script name...I need to be able to suggest file name (2) this
> script works with (successfully downloads) text files, but nothing else.

hmmmm. this comes up all the time in comp.infosystems.www.authoring.cgi.

maybe your girlfriend would have stayed with you if you had checked
<URL:http://www.dejanews.com> for all of the excellent answers given
in previous discussions of this CGI/HTTP (i.e. not Perl) question.

or maybe you should put the project out to bid.  plenty of people make
money on projects that someone else thought that they could do.

(hint:  begging is not endearing)

-- 
brian d foy                              <URL:http://computerdog.com>                       
unsolicited commercial email is not appreciated


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

Date: Tue, 04 Mar 1997 13:16:59 -0600
From: Paul Joiner <joiner@houston.omnes.net>
Subject: Re: Problem with LEARNING PERL Example
Message-Id: <331C752B.70F5@houston.omnes.net>

David Dickerson wrote:
> 
> ...I have compared my code to the code in the book...
>
>             if ($words[$i] eq $guess  { # right?
>...

The problem is that you have no closing parenthesis on line 19.
-- 
paul joiner, graphic designer - joiner@houston.omnes.net
ftp://paulj.houston.omnes.net/ - http://paulj.houston.omnes.net
pjoiner@nol.net - http://www.nol.net/~pjoiner


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

Date: Wed, 05 Mar 1997 10:16:18 +0100
From: Sigge Eriksson <sigge.eriksson@usa.net>
Subject: Q: Good Perl Book
Message-Id: <331D39E2.2976@usa.net>

Anyone know a good book for a Perl beginner?

	/ Sigge Eriksson


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

Date: Tue, 04 Mar 1997 18:38:21 -0800
From: Devin Ben-Hur <dbenhur@egames.com>
To: Stijn van Dongen <stijnvd@cwi.nl>
Subject: Re: Returning a reference to a 'my' variable
Message-Id: <331CDC9D.53AF@egames.com>

[courtesy reply emailed]
Stijn van Dongen wrote:
> Following up on this question:
> Is there a difference in performance between doing
>         my $x = [];
>         # ..
>         return $x;              # and
> 
>         my @x;
>         # ..
>         return \@x;

The answer to "is there a difference in performance"
questions is almost always, "try it and see."

The Benchmark module makes this pretty easy...
------ t.pl ------
use Benchmark;
sub s1 { my $x = []; return $x; }
sub s2 { my @x = (); return \@x; }
sub s3 { my $x = []; 
	foreach (qw(one two three four)) { push @$x, $_; }
	return $x;
}
sub s4 { my @x = (); 
	foreach (qw(one two three four)) { push @x, $_;	}
	return \@x;
}
timethese(50000, {
	s1 => '&s1();',
	s2 => '&s2();',
	s3 => '&s3();',
	s4 => '&s4();',
} );
----------------
perl t.pl produces:
Benchmark: timing 50000 iterations of s1, s2, s3, s4...
        s1:  3 secs ( 2.00 usr  0.08 sys =  2.08 cpu)
        s2:  3 secs ( 2.10 usr  0.13 sys =  2.23 cpu)
        s3:  9 secs ( 9.10 usr  0.05 sys =  9.15 cpu)
        s4:  8 secs ( 7.63 usr  0.05 sys =  7.68 cpu)

which tells us that the trivial case of just defining 
and returning an empty array is a teensy bit quicker 
using the ref and anonymous array than a lexical array
and the \ operator.  However, once you start doing some
significant work on the array, using it by name (@x)
instead of by reference (@$x) seems to be significantly
faster.

HTH
--
Devin Ben-Hur      <dbenhur@egames.com>
eGames.com, Inc.   http://www.egames.com/
eMarketing, Inc.   http://www.emarket.com/
"Sometimes you just have to step in it and see if it stinks"  O-
    -- Sonia Orin Lyris



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

Date: Mon, 03 Mar 1997 23:49:28 -0400
From: Carl <ceklof@vt.edu>
Subject: Testing if a variable is a number or a string.(Newbie question)
Message-Id: <331B9BC8.2E97@vt.edu>

Hello,

Newbie (to perl) question:

Can anyone tell me how to test if a vaiable is a number vs. a string?
eg.
<code>
$MyVariable1 = 26; #number
$MyVariable2 = "this is not a number"; #string
</code>

I am creating a web interface to an ODBC database. Queries are
done/finished. Now inserting is a problem because some fields are text,
some numbers, some dates(numbers). I am using the sql "INSERT INTO" to
append records, which requires double quotes around text values, but not
number values.

If anyone has any hints/tips/tricks on the topic of web/database design,
I'd definately love to hear it.

Thanks all,

-Carl


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

Date: Wed, 05 Mar 1997 07:16:52 +0000
From: "David J. Evans" <d.j.evans@rdg.ac.uk>
Subject: Re: The Disappearing DOS box and cmd32.exe
Message-Id: <331D1DE4.7666@rdg.ac.uk>

Simon Griffiths wrote:
> 
> Gregory Goodwin wrote:
> >
> > The problem though is that the DOS box disappears too fast to read.  I
> > can add a sleep command, but that only works ............
> 
> You may like to try Alan Phillips' excellent Programmer's File Editor
> available from http://www.lancs.ac.uk/people/cpaap/pfe/. This has an
> option which allows perl to be run in a DOS window whilst all terminal
> output is collected. After the run is complete the editor also open a
> new edit window and displays the command output.
> 
> PFE seems to me to be an excellent MS-windows editor and I use it
> constantly to write perl, java, SQL and much else. I use it on NT 3.51,
> Windows95 and Win3.11.
> 
> Simon.

Textpad (http://www.textpad.com/) also has this facility together with
excellent file manipulation tools, regexp searches, macro language and
more .... I've used both, and preffered Textpad.

David
d.j.evans@rdg.ac.uk


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

Date: Tue, 04 Mar 1997 13:32:35 -0500
From: Diana Duncan <dduncan@realogic.com>
Subject: Re: weird split prob
Message-Id: <331C6AC3.228C@realogic.com>

Douglas L. Cordero, PhD wrote:
> 
> Hi all:
>         This one is making me crazy.  Where am I screwing up?
> 
> > cat test.pl
> 
> #!/usr/local/bin/perl -w
> 
> $line = "/lastly/I/have.hadit/jkdnkjnvf.89090100";
> 
> @fields = split(/./, $line);
> 
> print "Here is field 0:",$fields[0],":\n";
> print "Here is field 1:",$fields[1],":\n";
> print "Here is field 2:",$fields[2],":\n";
> 
> RESULTS:
> 
[ deleted ]

Since a period is a regular expression matching any single character,
you need to escape the period and split /\./
-- 
Diana Duncan	     | My opinions are my own.
Sr. Consultant	     | 
REALOGIC, Inc.	     | Excitement, Adventure and
dduncan@realogic.com | Really Wild Things - Z.B.


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

Date: 5 Mar 1997 11:21:02 GMT
From: des@corp.netcom.net.uk (Des Herriott)
Subject: writing an inetd server in Perl
Message-Id: <5fjkuu$cfp$1@taliesin.netcom.net.uk>

Hello,

As the subject says, I've been trying to write a server in Perl which
gets started from inetd on Solaris 2.5, without much success.

I've added the necessary stuff to /etc/services and /etc/inetd.conf.
Here's the the gist of the entry from inetd.conf:

  myserver  stream tcp  wait nobody /path/to/server/myserver myserver

The (very simple) server looks like:

 #!/usr/local/bin/perl

 use Socket;

 $mysockaddr = getsockname(STDIN) or die "can't getsockname: $!";
 ($port, $myaddr) = unpack_sockaddr_in($mysockaddr);
 $hostname    = gethostbyaddr($myaddr, AF_INET);
 $straddr     = inet_ntoa($myaddr);

 select(STDOUT); $| = 1;
 print "myserver on $hostname [$straddr]\n";

Now when I telnet to the server port,  I should get a message to the
effect of "myserver on myhost [x.x.x.x]", yes?  However, this is all I
get from telnet:

 $ telnet myhost myserver
 Trying x.x.x.x...
 Connected to myhost.my.domain.
 Escape character is '^]'.

 ...and nothing more.

Am I missing something fundamental here?  I was under the impression
that inetd connected STDIN to the incoming socket - I've done this
successfully in the past with C.

-- 
Des Herriott
des@corp.netcom.net.uk


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

Date: 5 Mar 97 07:58:04 UTC
From: mbsprog@idirect.com (Year2000 Information Network)
Subject: Year2000 Conference Toronto
Message-Id: <331D27F8.564B@idirect.com>

The Year2000 Information Network ("Network") in partnership
with DCI, the largest US-based provider of conferences and 
exhibitions to the IT community, has recently formed a Year2000
Conference & Seminar Series for the Province of Ontario. 

The objective of the "Series" is to share Year2000 methodologies,
strategies and conversion techniques as well as supply project
managers with the information they need to manage Year2000 projects.
(11 events are planned for 1997 at the Metro Toronto Convention Centre
and the Howard Johnson Hotel).

As an attendee you'll receive a free report that lists over 100
programmers 
and managers who would like to work on Year2000 projects and or 
provide their services as professional speakers/lecturers.  If you would
like to be added to this list please let us know. 

More information at http://web.idirect.com/~mbsprog

ATTENDANCE:

250 to 500 attendees are expected at each monthly Year2000
seminar or conference.

10,000 IT professionals are expected to attend 
DCI's Database & Client/Server World Expo at the Metro
Toronto Convention Centre.  Be sure to visit the Year2000 
Information Network Pavilion on the Expo floor and the
Year2000 conferences downstairs.

WHEN:

March Event:  

The next event will be held on March 24, 1997, 12:00 pm - 
5:00 pm at the Howard Johnson, Weston Ballroom,  2737 
Keele Street, North York,  (At Keele & 401, North of the 401).   
Cost: $25.

April Event:  

The April event will be held at the Metro Toronto 
Convention Centre as part of DCI's Database & Client/Server 
World in Toronto, April 15-17.  Cost:  $40

Full day conferences are planned for May, June, July, August,
September, October & November, 1997.

SPEAKERS:  

Speakers include Peter de Jager, Kenn Orr, Andre Lefreneure, 
Leland Freeman, Girard Pedley, Jim Wood, Hiroo Tadaney,
Pat Brooks, Gord Stein,  etc...

SPONSORS:  

DCI, Transition Software, Miasoft Inc, Challenge 2000 Inc, 
Year2000 Information Network, Look Multimedia Inc., Xpress 
Software Inc., Contractors Network Corporation, Sterling Software,
Transformation Systems Inc., Microm Management Accountants, MBS
Program, National Computer Consulting, etc...

REGISTRATION:

Please complete and fax the form below to (905) 819-8013.
Call (905) 454-8577 or (416) 650-9475 to register.  Email to 
mbsprog@idirect.com.  Register online at 
http://web.idirect.com/~mbsprog/y2kfree.html


Name:  _______________________________________

Title: _________________________________________

Number of Attendees: ____________________________

Company: _____________________________________

Tel: __________________________________________

Fax: _________________________________________

Email: ________________________________________

For more information point your web browser 
to http://web.idirect.com/~mbsprog

___________________________________________________
YEAR2000  SEMINARS, CONFERENCE & EXPO SERIES
10,000 plus IT decision makers expected - Visit the Year2000 
Information Network Pavilion.  Sponsored by DCI and the 
Year2000 Information Network.

March 24, 1997               Howard Johnson Hotel  - Toronto
April 15 - 17, 1997          Metro Toronto Convention Centre
Tel:   (416) 650-9475 	    http://web.idirect.com/~mbsprog
Tel:   (905) 454-8577       mbsprog@idirect.com      
Fax:  (905) 819-8013       year2000@interlog.com


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

Date: 8 Jan 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Jan 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.

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

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