[16937] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4349 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Sep 17 14:05:23 2000

Date: Sun, 17 Sep 2000 11:05:09 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <969213909-v9-i4349@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sun, 17 Sep 2000     Volume: 9 Number: 4349

Today's topics:
    Re: Annoying quotation marks! (Clinton Pierce)
    Re: Annoying quotation marks! <tigz@ntlworld.com>
    Re: Annoying quotation marks! <flavell@mail.cern.ch>
    Re: Can I do this with perl/cgi ? (Clinton Pierce)
        Changing the meaning of "\n" <mjcarman@home.com>
    Re: Changing the meaning of "\n" (Clinton Pierce)
    Re: Compiling SSLeay on RedHat ? <info@thomas-fahle.de>
        Formatting a MAC address... <billy@nospamforme.com>
    Re: Formatting a MAC address... <uri@sysarch.com>
    Re: Formatting a MAC address... <tony_curtis32@yahoo.com>
    Re: Graphical Perl?? <anders@wall.alweb.dk>
        Help about using win32::API <wstsoi@netvigator.com>
    Re: Help with scope and module <mjcarman@home.com>
    Re: How to realize the cookies with perl script. <anders@wall.alweb.dk>
    Re: Just curious.. (Keith Calvert Ivey)
    Re: Life of a perl script (Gwyn Judd)
    Re: lynx shows html-tags <pilsl@goldfisch.atat.at>
    Re: Perl Debugger (Michael P. Soulier)
    Re: Perl Debugger (Mark-Jason Dominus)
    Re: please help a newbie in a simple question (Michael P. Soulier)
    Re: Possible to generate html frames from perl ??? (Tony L. Svanstrom)
    Re: Possible to generate html frames from perl ??? (Michael P. Soulier)
    Re: Possible to generate html frames from perl ??? (Craig Berry)
        Separating a script in 3 files? <agustinchernitsky@altavista.com>
    Re: Separating a script in 3 files? <anders@wall.alweb.dk>
    Re: Variable Substitution (Mark-Jason Dominus)
    Re: what is the best way to get the lastest line from a <uri@sysarch.com>
    Re: which the best scripting language? (Michael P. Soulier)
    Re: which the best scripting language? <bhoran@gate.net>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Sun, 17 Sep 2000 17:11:30 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: Annoying quotation marks!
Message-Id: <6X6x5.50748$QW4.585527@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <_v3x5.3438$ap5.58124@news6-win.server.ntlworld.com>,
	"Tigz" <tigz@ntlworld.com> writes:
> Could somebody please tell me how to remove them,

Sure!  Here's your opening quote:

>   print NEW "<b\>:</b\>\"";

And your close is in here:

>   print NEW "\"\n";

Any good book on Perl, or a reading of the built-in documentation will
help you figure out exactly what to remove.

> and also tell me how to change the font and size.

Learn HTML.  This is offtopic for this group.


-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Sun, 17 Sep 2000 18:41:37 +0100
From: "Tigz" <tigz@ntlworld.com>
Subject: Re: Annoying quotation marks!
Message-Id: <En7x5.5458$6T1.77430@news2-win.server.ntlworld.com>

Thanks,
now how do i change the font?

Clinton Pierce <clintp@geeksalad.org> wrote in message
news:6X6x5.50748$QW4.585527@news1.rdc1.mi.home.com...
> [Posted and mailed]
>
> In article <_v3x5.3438$ap5.58124@news6-win.server.ntlworld.com>,
> "Tigz" <tigz@ntlworld.com> writes:
> > Could somebody please tell me how to remove them,
>
> Sure!  Here's your opening quote:
>
> >   print NEW "<b\>:</b\>\"";
>
> And your close is in here:
>
> >   print NEW "\"\n";
>
> Any good book on Perl, or a reading of the built-in documentation will
> help you figure out exactly what to remove.
>
> > and also tell me how to change the font and size.
>
> Learn HTML.  This is offtopic for this group.
>
>
> --
>     Clinton A. Pierce              Teach Yourself Perl in 24 Hours!
>   clintp@geeksalad.org         for details see http://www.geeksalad.org
> "If you rush a Miracle Man,
> you get rotten Miracles." --Miracle Max, The Princess Bride




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

Date: Sun, 17 Sep 2000 19:32:26 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Annoying quotation marks!
Message-Id: <Pine.GHP.4.21.0009171926460.4077-100000@hpplus03.cern.ch>

On Sun, 17 Sep 2000, Clinton Pierce wrote:

> > and also tell me how to change the font and size.
> 
> Learn HTML.

But real HTML isn't interested in font and size.  That's delegated to
the stylesheet - just as was predicted in HTML2.0 before the
presentational crud of HTML3.2 was foisted on us and, thankfully, is
now well on its way out, and good riddance.

So my answer would be "learn CSS".

>  This is offtopic for this group.

Sure, both HTML and CSS are.  Still, if one's going to answer at
all...

[f'ups prophylactically set]



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

Date: Sun, 17 Sep 2000 17:15:05 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: Can I do this with perl/cgi ?
Message-Id: <t_6x5.50750$QW4.585527@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <8q24m4$30h$1@nnrp1.deja.com>,
	pularis@my-deja.com writes:
> We have NT 4.0 with IIS with perl installed.I have some Resource kit
> utilities that I would like the users to run off the web server and
> view the output as an html page. Is this attainable ?. Thx

Yes, probably.  So long as they can be driven from the command line 
and don't need a godforsaken GUI to run.

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Sun, 17 Sep 2000 16:29:23 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Changing the meaning of "\n"
Message-Id: <39C4F289.E41A1F18@home.com>

Here's an idle question that's been running through my mind. Is there a
way to change the meaning of "\n" for the output a script creates?

Here's the situation: I have a script which generates some files. Perl
automagically interprets "\n" based on the platform it's on, so that I
get *nix format files on *nix, and DOS format on Win*. That's fine, but
I'd like to be able to control the output file format from either
platform -- create *nix files from Win*, or vice versa.

The simplest method is obviously to just create the files and then
postprocess them as needed to convert the format, but that's too 
easy. :)

What I'd like to do is redefine "\n" such that 

print "foo\n";

print <<"EOT";
multi-line
text goes
here
EOT

will both work. Does anyone know of a way to do this?

-mjc

PS: Yes, I know that FTP programs will do this conversion for me, but
Winblows Explorer will not, and that is (most likely) how end-users of
my program will end up moving these files between platforms.


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

Date: Sun, 17 Sep 2000 17:13:45 GMT
From: clintp@geeksalad.org (Clinton Pierce)
Subject: Re: Changing the meaning of "\n"
Message-Id: <dZ6x5.50749$QW4.585527@news1.rdc1.mi.home.com>

[Posted and mailed]

In article <39C4F289.E41A1F18@home.com>,
	Michael Carman <mjcarman@home.com> writes:
> Here's the situation: I have a script which generates some files. Perl
> automagically interprets "\n" based on the platform it's on, so that I
> get *nix format files on *nix, and DOS format on Win*. That's fine, but
> I'd like to be able to control the output file format from either
> platform -- create *nix files from Win*, or vice versa.
> 
> What I'd like to do is redefine "\n" such that 

Piece o cake.  \n is a logical end-of-line character.  It gets translated
into whatever your OS normally uses.  Just redefine $\.  perldoc perlvar
for more information on that.

BTW: beware of windows and use binmode() or you might not get what you expect.

-- 
    Clinton A. Pierce              Teach Yourself Perl in 24 Hours! 
  clintp@geeksalad.org         for details see http://www.geeksalad.org
"If you rush a Miracle Man, 
	you get rotten Miracles." --Miracle Max, The Princess Bride


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

Date: Sun, 17 Sep 2000 18:58:59 +0200
From: Thomas Fahle <info@thomas-fahle.de>
Subject: Re: Compiling SSLeay on RedHat ?
Message-Id: <39C4F853.C6F4D776@thomas-fahle.de>

Thanks a lot.

It works :-))

Thomas

Jonathan Stowe schrieb:

> On Thu, 14 Sep 2000 10:29:12 +0200 Thomas Fahle wrote:
> > Hello all,
> >
> >
> > SSLeay compiles well but
> > /usr/local/src/SSLeay 0.9b/perl/ not.
> >
> > make returns the following error messages
> > bio.xs: In function `p5_bio_callback':
> > bio.xs:36: `sv_undef' undeclared (first use in this function)
> > bio.xs: In function `XS_SSLeay__BIO_new':
> > bio.xs:140: `na' undeclared (first use in this function)
> > ...
> > make: *** [bio.o] Error 1
> >
>
> run Makefile.PL with POLLUTE=1 and then everything will be fine.
>
> /J\
> --
> yapc::Europe in assocation with the Institute Of Contemporary Arts
>    <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>



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

Date: Sun, 17 Sep 2000 18:50:56 +0100
From: "Billy" <billy@nospamforme.com>
Subject: Formatting a MAC address...
Message-Id: <qv7x5.5471$6T1.77862@news2-win.server.ntlworld.com>

I've been mucking around trying to format a list of MAC
addresses like :

0:d0:96:3c:73:58
8:0:4e:c:1:f7

Into :

00:d0:96:3c:73:58
08:00:4e:0c:01:f7

I've been trying to do an elegant, single regex to do it, but I keep ending up
with a rather messy mix of two or three, or an increadibly complex expression.
Any pointers?

Billy.


-- 
I'm ANN LANDERS!!  I can SHOPLIFT!!


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

Date: Sun, 17 Sep 2000 17:58:59 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Formatting a MAC address...
Message-Id: <x7g0mygasb.fsf@home.sysarch.com>

>>>>> "B" == Billy  <billy@nospamforme.com> writes:

  B> 0:d0:96:3c:73:58
  B> 8:0:4e:c:1:f7

  B> Into :

  B> 00:d0:96:3c:73:58
  B> 08:00:4e:0c:01:f7

here is one way:

	s/\b(\w)\b/0$1/g

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: 17 Sep 2000 13:04:22 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Formatting a MAC address...
Message-Id: <87pum2j3o9.fsf@limey.hpcc.uh.edu>

>> On Sun, 17 Sep 2000 18:50:56 +0100,
>> "Billy" <billy@nospamforme.com> said:

> I've been mucking around trying to format a list of MAC
> addresses like :

> 0:d0:96:3c:73:58 8:0:4e:c:1:f7

> Into :

> 00:d0:96:3c:73:58 08:00:4e:0c:01:f7

> I've been trying to do an elegant, single regex to do
> it, but I keep ending up with a rather messy mix of two
> or three, or an increadibly complex expression.  Any
> pointers?

There are some "compact" solutions with /ge, but this
works too:

    split the string on /:/

    join back together with ':', formatting each value
    with sprintf '%02x'

e.g.

    while (<DATA>) {
      chomp;
      my @data = split /:/;
      my $s = join ':', map {sprintf '%02x', hex($_)} @data;
      print "$s\n";
    }
    
    __DATA__
    0:d0:96:3c:73:58
    8:0:4e:c:1:f7

A regexp solution could be:

    while (<DATA>) {
      s/([0-9a-fA-F]{1,2})/sprintf('%02x',hex($1))/ge;
      print;
    }
    
    __DATA__
    0:d0:96:3c:73:58
    8:0:4e:c:1:f7

but no doubt those with lower handicaps can better that.

hth
t
-- 
Woo!  A trillion dollar bill.  That's a spicy meatball!
                                         -- Homer Simpson


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

Date: Sun, 17 Sep 2000 16:51:47 GMT
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: Graphical Perl??
Message-Id: <DE6x5.378$KJ4.5964@news000.worldonline.dk>

Kyle Parfrey wrote:

> Hi all Perl people:
> I am a programming beginner just coming over to perl from a bit of java,
> liking perls control of the system a lot.  Two questions though:
> 
> 1) Is there a graphical toolkit for perl? I have heard something about
> Tk, but don't know what it is. Is it as easy to use as java's integrated
> gui widgets?
> 
> 2) I think this is partially covered by another post: I want to let my
> perl program control another command line application. Is it possible
> for perl to open another program , and then enter things in the other
> programs command prompt? Also would it be possible for my script to open
> a new terminal window , and have the second application running there?
> I'm using linux.
> 
> Thanks,
> Kyle

You can use most widget sets from within perl today.
There is modules for Gtk++, Qt/KDE and of cause Tk, and a few others.
Search CPAN for the modules.

If you run Mandrake Linux, you have the Gtk modules installed, as they are 
used for DrakConf, RpmDrake & friends...

-anders


-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Mon, 18 Sep 2000 00:28:13 +0800
From: "Lucas" <wstsoi@netvigator.com>
Subject: Help about using win32::API
Message-Id: <8q2r88$38m1@imsp212.netvigator.com>


Hi all,
I tried to ues Win32::API for calling a DLL by perl codes, but I just
failed,
so hope somebody here could help me.


The functions needed are defined in the header file as:
----------------------------------------------------------------------------
-----------------
__declspec(dllimport) int initTTS(char *dataPath, short gender);
__declspec(dllimport) void termTTS(void);
__declspec(dllimport) int spk(char *string, double sentenceRate, short
gender);



And I attach my c++ codes, it could work and speak"Talking agent works"
----------------------------------------------------------------------------
------------------
#include <stdio.h>
#include <stdlib.h>
#include "..\\talk.h"

void main(){
 //initialisation
 //printf("%d\n", 1|2);
 if( initTTS("d:\\tts_dll\\datafile", 3)==0 ){
  printf("CTTS initialisation fail\n");
  exit(0);
 }
 spk("Talking agent works", 1.5, F_VOICE);
 //termination
 termTTS();
}

However when I tried to call it by Perl codes with Win32::API module,
strangly, the functions were called with ok returned messages , but
it doesn't speak"talking aganet works", but some squeezed ones or
something strange. So I guess I did wrong something, but I could not
find any clues for several hours.
----------------------------------------------------------------------------
------------
use Win32::API;


$the_string = "Talking agent works";

$initTTS = new Win32::API("talk", "initTTS", [P, I], I);
$spk = new Win32::API("talk", "spk", [P, N, I], I);
$termTTS = new Win32::API("talk", "termTTS", [], V);


if ($initTTS->Call('d:\\tts_dll\\datafile',1)  == 1 ){
 print "init ok\n";
}


if ( ($spk->Call($the_string, 2, 1)) == 1) {
 print "Spk ok\n";}
else {
 print "Spk failed\n";
}

$termCTTS->Call();
----------------------------------------------------------------------------
--

Thanks very very much for looking into my problem.












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

Date: Sun, 17 Sep 2000 15:42:41 GMT
From: Michael Carman <mjcarman@home.com>
Subject: Re: Help with scope and module
Message-Id: <39C4E797.9972DF7B@home.com>

Garry Williams wrote:
> 
> Michael Carman wrote:
>
> >Declare it as global in the main file:
> >
> >use vars ($foo @bar %baz);
> 
> Did you try this?

Admittedly, no. Good catch, bad me. This should of course be:

use vars qw($foo @bar %baz);

On the plus side, my newserver seems to be talking to the rest of the
world again. :)

-mjc


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

Date: Sun, 17 Sep 2000 16:58:07 GMT
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: How to realize the cookies with perl script.
Message-Id: <zK6x5.382$KJ4.5964@news000.worldonline.dk>

i0519@my-deja.com wrote:

> I am program a CGI with perl in solaris.
> And we want to realize the cookie mechanism in the program.
> Is their any function /example about this?
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

use CGI;

For informaiton,
$perldoc CGI

-anders

-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Sun, 17 Sep 2000 14:22:14 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Just curious..
Message-Id: <39c6d1fc.84670673@news.newsguy.com>

halofive <halo_five@my-deja.com> wrote:

>%hash = ("one", "two", "three")
># Notice that there's an odd number, Key "three" returns Unef
>
>With that, here's the problem... If I wanted $hash{} to return "three",
>how would I go about doing so?  Would $hash{""} do the trick, or is it
>not that simple?

Well, $hash{} is a syntax error.  If you want $hash{""} to be
"three", then you have to set it that way:

    %hash = ("one", "two", "", "three");

I'd probably write it this way:

    my %hash = (
        one => 'two',
        ''  => 'three'
    );

Note that hash keys are always stringified, so $hash{$key} will
be 'three' if $key is undef or ''.  Also, lone barewords inside
hash braces are always interpreted as strings, so $hash{undef}
is the hash value associated with the key 'undef' (a five-letter
string).

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Sun, 17 Sep 2000 16:16:19 GMT
From: tjla@guvfybir.qlaqaf.bet (Gwyn Judd)
Subject: Re: Life of a perl script
Message-Id: <slrn8s9rig.d31.tjla@thislove.dyndns.org>

I was shocked! How could mufy@my-deja.com <mufy@my-deja.com>
say such a terrible thing:
>I want to run a perl script once every day.

>something like a sleep or suspend in my script,
>but I do not know the right function to call.

This sounds much like a self-answering question:

perldoc -f sleep

Be enlightened :) Although I suspect that you will encounter some other
problems when you get past this part.

-- 
Gwyn Judd (print `echo 'tjla@guvfybir.qlaqaf.bet' | rot13`)
The devil finds work for idle circuits to do.


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

Date: Sun, 17 Sep 2000 18:04:20 GMT
From: peter pilsl <pilsl@goldfisch.atat.at>
Subject: Re: lynx shows html-tags
Message-Id: <MPG.142f264d5c40ea5e98988b@news.chello.at>

In article <slrn8s85jm.h8o.abigail@alexandra.foad.org>, abigail@foad.org 
says...
> 
> Error in your coding or not, you would have the same problems if you 
> did something similar in C, Java, PHP, TECO macros or Ada.
>

wow ! you know quite a lot language-names ;)
To make it clear: Of course it was no error of lynx, it was a very-hard-
to-find-cause-too-simple error in my perl-coding. (therefore here) 
 
> 
> > And before Mr.Coffeine will kill me: these @@ as quoting-signs .. is it me 
> > or did you really set @@ as quoting sign ;)
>  
> Must be you.

You are right, i dont see them any more after 10hours of sleep and a day 
without computers.

peter

-- 
pilsl@
goldfisch.at


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

Date: Sun, 17 Sep 2000 15:40:55 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: Re: Perl Debugger
Message-Id: <slrn8s9pg9.nag.michael.soulier@localhost.localdomain>

In article <39C4CDE9.634B11E@galileo.co.il>, Doron Nisenbaum wrote:
>Hi,
>
>What tool i can use to debug my perl scripts?
>Simple,free,frendly?

    perl -d invokes the perl debugger. If you don't like command-line
debuggers, ddd is a graphical front-end for a lot of these debuggers, perl 
included. 

>Is there a way to use Xemacs?
>(I use SunOS  , UltraSPARC-IIi-Engine )

    I wouldn't know, I can't stand *emacs. 

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX


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

Date: Sun, 17 Sep 2000 15:56:41 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Perl Debugger
Message-Id: <39c4e9b9.5d2d$93@news.op.net>

In article <39C4CDE9.634B11E@galileo.co.il>,
Doron Nisenbaum  <doronn@galileo.co.il> wrote:
>What tool i can use to debug my perl scripts?
>Is there a way to use Xemacs?

Try M-x perldb.


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

Date: Sun, 17 Sep 2000 15:49:15 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: Re: please help a newbie in a simple question
Message-Id: <slrn8s9pvt.nag.michael.soulier@localhost.localdomain>

In article <Pine.GSO.4.10.10009170002090.8364-100000@ux5.cso.uiuc.edu>, 
qi wu wrote:
>Hi gurus! I have a simple question that needs to be answered. Where can I
>find a PERL module that enables me to set username and password to control
>access to a certain webpage of a website. I checked some relevant sites
>and found out that the only available modules are for UNIX system.
>However, the website uses ZBserver pro(software that allows you to publish
>your website right from your computer) as the server. I don't understand
>whether there are any differences. If so, what should I do to impose
>access control on the particular webpage? Thanks in advance!

    Get a real web server? The standard is to use .htaccess files for this,
and programs running on the server side can edit the contents. You'll have to
invesigate what the mechanism used is for this server, and make use of it.

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX


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

Date: Sun, 17 Sep 2000 17:31:28 +0200
From: tony@svanstrom.com (Tony L. Svanstrom)
Subject: Re: Possible to generate html frames from perl ???
Message-Id: <1eh4607.t26dud1p6zwpuN%tony@svanstrom.com>

Alone <Alone@Work.com> wrote:

> Is it possible to generate an html frameset without writing to a file?

Yes.


     /Tony
-- 
     /\___/\ Who would you like to read your messages today? /\___/\
     \_@ @_/  Protect your privacy:  <http://www.pgpi.com/>  \_@ @_/
 --oOO-(_)-OOo---------------------------------------------oOO-(_)-OOo--
   on the verge of frenzy - i think my mask of sanity is about to slip
 ---ôôô---ôôô-----------------------------------------------ôôô---ôôô---
    \O/   \O/  ©99-00 <http://www.svanstrom.com/?ref=news>  \O/   \O/


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

Date: Sun, 17 Sep 2000 15:49:46 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: Re: Possible to generate html frames from perl ???
Message-Id: <slrn8s9q0r.nag.michael.soulier@localhost.localdomain>

In article <39c4cb8e.51769585@news.reliable-net.net>, Alone wrote:
>
>Is it possible to generate an html frameset without writing to a file?

    Elaborate. CGI?

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX


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

Date: Sun, 17 Sep 2000 17:12:29 GMT
From: cberry@cinenet.net (Craig Berry)
Subject: Re: Possible to generate html frames from perl ???
Message-Id: <ss9urtrdh3t13@corp.supernews.com>

Alone (Alone@Work.com) wrote:
: Is it possible to generate an html frameset without writing to a file?

This is a nearly meaningless question.  A frameset is just another
HTML document.  Any agent capable of generating HTML, from a text file
served through a web server, to a CGI application, to a Java servlet, can
produce a frameset document.  What are you actually trying to do?

-- 
   |   Craig Berry - http://www.cinenet.net/~cberry/
 --*--  "Every force evolves a form."
   |              - Shriekback


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

Date: Sun, 17 Sep 2000 13:27:39 -0300
From: "Agustin Chernitsky" <agustinchernitsky@altavista.com>
Subject: Separating a script in 3 files?
Message-Id: <8q2re0$efdoo$1@ID-48235.news.cis.dfn.de>

Hi,

    I would like to separate a program in 3 files. What command I could use
to call the new files with the code from the main script? It would be like
an include or something like that...

Thanks!


--
Agustín Chernitsky
InterEmpresa

E-mail:       agustinchernitsky@altavista.com
ICQ:          20020826




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

Date: Sun, 17 Sep 2000 16:41:18 GMT
From: Anders Lund <anders@wall.alweb.dk>
Subject: Re: Separating a script in 3 files?
Message-Id: <Ou6x5.373$KJ4.6154@news000.worldonline.dk>

Agustin Chernitsky wrote:

> Hi,
> 
>     I would like to separate a program in 3 files. What command I could
>     use
> to call the new files with the code from the main script? It would be like
> an include or something like that...
> 
> Thanks!
> 
> 
> --
> Agustín Chernitsky
> InterEmpresa
> 
> E-mail:       agustinchernitsky@altavista.com
> ICQ:          20020826
> 
> 

Please read your documentation!
The fact that you don't know proberly means that you didn't take the time 
to learn about modules either, so you will want to do that. In the mean 
time, you caould use "require"

use lib "."; #ask perl to look in current directory
use lib "/home/fred/perlscripts" # guess what
require "<SCRIPT NAME>"; # like myscript.pl

The code in a required script gets evaluated when the interpreter sees the 
"require" statement, meaning that statements outside of subs takes effect 
at this time.

-anders


-- 
[ the word wall - and the trailing dot - in my email address
is my _fire_wall - protecting me from the criminals abusing usenet]


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

Date: Sun, 17 Sep 2000 15:58:54 GMT
From: mjd@plover.com (Mark-Jason Dominus)
Subject: Re: Variable Substitution
Message-Id: <39c4ea3d.5d42$3e0@news.op.net>

In article <39c5cf15.83928331@news.newsguy.com>,
Keith Calvert Ivey <kcivey@cpcug.org> wrote:
>You might also want to look at Mark-Jason Dominus's three-part
>article (it's not as long as it sounds) on why what you're doing
>is probably a bad idea:

It isn't about that. 



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

Date: Sun, 17 Sep 2000 15:52:37 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: what is the best way to get the lastest line from a file?
Message-Id: <x7k8cbf22h.fsf@home.sysarch.com>

>>>>> "MD" == Mark-Jason Dominus <mjd@plover.com> writes:

  MD> In article <x7d7idinpr.fsf@home.sysarch.com>,
  MD> Uri Guttman  <uri@sysarch.com> wrote:
  JJ> my $last = `tail -1 blah`;
  >> 
  >> and what if that is a large log file which has to be completely
  >> processed. then you just read it all into ram 

  MD> No, it doesn't.  The person who wrote 'tail' was not as stupid as
  MD> you think.

i know tail will work backwards in a file. but what if you wanted to
read the whole file line by line? you couldn't use tail that way as ``
would slurp in the entire file before you could loop over the lines. you
would have to do a open( TAIL, "tail foo |" ) and a while ( <TAIL> )
loop. and you can't simply tell tail to read the entire file that way
without passing it a very large number or determining the size of the
file first. and you have differing options on versions of tail as
well. so for those type of problems the module would be simpler (and
faster since there is no fork). tail is not meant to read a file line by
line from the end but to return the last part of a file (in the forward
order). reading one line from the end is a degenerate case.

uri

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com


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

Date: Sun, 17 Sep 2000 15:50:58 GMT
From: michael.soulier@home.com (Michael P. Soulier)
Subject: Re: which the best scripting language?
Message-Id: <slrn8s9q33.nag.michael.soulier@localhost.localdomain>

In article <39c4847e.0@news.cbn.net.id>, Lucisferre wrote:
>You think which is the best scripting language?  Perl or TCL?  What is your
>best scripting language?

    How about you just learn them all and make up your own mind? This posting
is flame-bait. 

    Mike

-- 
Michael P. Soulier <msoulier@storm.ca>
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX


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

Date: Sun, 17 Sep 2000 13:13:05 -0400
From: Brian Horan <bhoran@gate.net>
To: msoulier@storm.ca
Subject: Re: which the best scripting language?
Message-Id: <Pine.A41.4.21.0009171310390.38358-100000@dakota.gate.net>

I agree, TCL (tickle) can be embedded in Perl and both Perl and TCL (not
to mention (Tk) can be imbedded within C/C++.

One trick I use pretty frequently is perl scripts run from Expect and
ExpecTk. Expect =~ TCL!

in other words: By whatever means necessary.....



   ~             
  'v'   Brian Horan
 // \\  Systems Analyst/Administrator/Programmer 
/(   )\ Miami Herald Publishing Company		 bhoran@herald.com
 ^`~'^   
Linux: For when you're sick of CTRL-ALT-DEL

On Sun, 17 Sep 2000, Michael P. Soulier wrote:

> In article <39c4847e.0@news.cbn.net.id>, Lucisferre wrote:
> >You think which is the best scripting language?  Perl or TCL?  What is your
> >best scripting language?
> 
>     How about you just learn them all and make up your own mind? This posting
> is flame-bait. 
> 
>     Mike
> 
> -- 
> Michael P. Soulier <msoulier@storm.ca>
> "...the word HACK is used as a verb to indicate a massive amount
> of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX
> 



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

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


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