[11404] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5004 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Feb 26 16:27:34 1999

Date: Fri, 26 Feb 99 13:22:32 -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           Fri, 26 Feb 1999     Volume: 8 Number: 5004

Today's topics:
        What wrong with printing? <tsnellma@ratol.fi>
        What's the equivalent of "extern" in Perl? (Brian Kendig)
    Re: What's the equivalent of "extern" in Perl? (Steve Linberg)
    Re: What's the equivalent of "extern" in Perl? (Brian Kendig)
    Re: What's the equivalent of "extern" in Perl? <stampes@xilinx.com>
    Re: What's the equivalent of "extern" in Perl? (Ronald J Kimball)
    Re: What's the equivalent of "extern" in Perl? (Brian Kendig)
    Re: What's the equivalent of "extern" in Perl? (Ronald J Kimball)
        Where are the Perl Progammers' Lists? <mnag@exeter.nospam.please>
        While a process is running.... <wfunk@dev.tivoli.com>
        Win32, How to delete a read only file? (RedWine)
    Re: Win32, How to delete a read only file? <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
        Win32: desktop BG refresh? <jwarnica@ns.sympatico.ca>
        Win32:Service-Not functioning properly? <WayneBailey@Hotmail.com>
        Winnipeg.pm meeting (Randy Kobes)
        Write to a file <debot@xs4all.nl>
    Re: Write to a file <tchrist@mox.perl.com>
        Writing Search Engine <hkultraman@usa.net>
    Re: Writing Search Engine <chrishowe@earthling.net>
    Re: WWW Hosting for a site in need of CGI chastity@lco.net
        WWW:Search ("D.K. FLETCHER")
        XML::Parse::Tree, what does it *do*? <mra@pobox.com>
    Re: XML::Parse::Tree, what does it *do*? <ebohlman@netcom.com>
        Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)

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

Date: Thu, 25 Feb 1999 08:24:58 +0200
From: Timo Snellman <tsnellma@ratol.fi>
Subject: What wrong with printing?
Message-Id: <36D4ECBA.8546FA10@ratol.fi>

I'm pretty new with perl and i got problem. Here's code and it works
just fine until I do this:

rlfifo something | more

why doesnt it pass output to more command?

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

#!/usr/bin/perl -w

$how_many = @ARGV;
$named_pipe = $ARGV[0];

if ($how_many != 1)
{
	goto USAGE;
}
else
{
	if ($ARGV[0] =~ /-[Hh]/)
	{
		goto USAGE;
	}
	else
	{
		open(FIFO,"$named_pipe") || die "Cannot open $! \n";
		while (1)
		{	 
			until (eof(FIFO))
			{
				$in_put = <FIFO>;
				print STDOUT "$in_put"; 
			}
		}
		close FIFO;
		exit;
	}
}

USAGE:
{
	print "Usage: rlfifo fifo\n";
	print "		Version 0.0.4\n";
	print "		fifo 		named pipe with full path\n";
}

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


Xfactor


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

Date: 23 Feb 1999 12:00:35 -0800
From: fox-at-enchanter-net@SPAM.BLOCK (Brian Kendig)
Subject: What's the equivalent of "extern" in Perl?
Message-Id: <7av1d3$11o$1@shell11.ba.best.com>

I've got a web application composed of several Perl CGI scripts.  I've
pulled all of the global variable assignments into a single file which
all of the scripts reference via a "require" statement.  Problem is,
when I turn on -w and "use strict"; I get a "Global symbol requires
explicit package name" error wherever any of my scripts use a global
variable.

I tried adding "package foo;" to the file which contains all of the
variable assignments and then changing the global variable references in
each script to "foo:myglobalvariable".  But then I got an error
"Identifier 'foo:myglobalvariable' used only once" (and it is used only
once in that script), which makes me suspicious that maybe it didn't
notice the variable being set in the 'require'd file.  Do I need to say
"use vars 'foo:myglobalvariable'" in each script?  Won't that make the
variable local to each script, and ignore the global assignment?

Also, is it standard practice to turn a file with nothing but global
assignments into a package, or is there a more appropriate solution?

-- 
 ____    |\/|                  Brian Kendig   
 \  /\   / ..__.       fox at enchanter net     You are in a maze of twisty
  \/  \__\   _/    http://www.enchanter.net/    little passages, all alike.
   \__   __  \_       Be insatiably curious.  
      \____\___\            Ask "why" a lot.  


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

Date: Tue, 23 Feb 1999 16:43:33 -0500
From: linberg@literacy.upenn.edu (Steve Linberg)
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <linberg-2302991643330001@ltl1.literacy.upenn.edu>

In article <7av1d3$11o$1@shell11.ba.best.com>,
fox-at-enchanter-net@SPAM.BLOCK (Brian Kendig) wrote:

> I tried adding "package foo;" to the file which contains all of the
> variable assignments and then changing the global variable references in
> each script to "foo:myglobalvariable".

Use two colons for namespaces: foo::myglobalvariable.

-- 
Steve Linberg, Systems Programmer &c.
National Center on Adult Literacy, University of Pennsylvania
email: <linberg@literacy.upenn.edu>
WWW: <http://www.literacyonline.org>


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

Date: 23 Feb 1999 15:02:42 -0800
From: fox-at-enchanter-net@SPAM.BLOCK (Brian Kendig)
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <7avc2i$58s$1@shell11.ba.best.com>

linberg@literacy.upenn.edu (Steve Linberg) writes:
>Use two colons for namespaces: foo::myglobalvariable.

I did in my script, but I typoed in my article.  Sorry 'bout that.

I've worked around the problem at this point, but I'm not sure if I'm
doing it in the best way.  Let me illustrate with two Perl files...

test1.pl:

  $foo = "test";

test2.pl:

  require "test1.pl";
  use strict;
  use vars '$foo';
  print "$main::foo\n";

Running "perl -w test2.pl" prints out "test" as expected, but I find it
weird that I need to say "$main::foo" rather than "$foo".  Is this the
way it 'should' be done?

-- 
 ____    |\/|                  Brian Kendig   
 \  /\   / ..__.       fox at enchanter net     You are in a maze of twisty
  \/  \__\   _/    http://www.enchanter.net/    little passages, all alike.
   \__   __  \_       Be insatiably curious.  
      \____\___\            Ask "why" a lot.  


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

Date: 23 Feb 1999 22:16:00 GMT
From: Jeff Stampes <stampes@xilinx.com>
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <7av9b0$7p1@courier.xilinx.com>

Brian Kendig <fox-at-enchanter-net@SPAM.BLOCK> wrote:
: I've got a web application composed of several Perl CGI scripts.  I've
: pulled all of the global variable assignments into a single file which
: all of the scripts reference via a "require" statement.  Problem is,
: when I turn on -w and "use strict"; I get a "Global symbol requires
: explicit package name" error wherever any of my scripts use a global
: variable.

You probably need to spend some more time reading through 
'perldoc perlmod'.  When I need to do this, I turn it into a
module:

stampes@huckin [80] cat script
#!/devl/perl5/bin/perl -w

use strict;
use Beer;

print "My favorite Stout is $stout\n";
print "My favorite Pale Ale is $pale\n";
print "My favorite Porter is $porter\n";

stampes@huckin [81] cat Beer.pm
#!/devl/perl5/bin/perl -w

use Exporter;
package Beer;

@ISA    = Exporter;
@EXPORT = qw($stout $pale $porter);

$stout  = 'Obsidian';
$pale   = 'SNPA';
$porter = 'BlackJack';

stampes@huckin [82]  script
My favorite Stout is Obsidian
My favorite Pale Ale is SNPA
My favorite Porter is BlackJack

Hope this Helps,

Jeff

-- 
Jeff Stampes -- Xilinx, Inc. -- Boulder, CO -- jeff.stampes@xilinx.com


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

Date: Tue, 23 Feb 1999 21:47:13 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <1dnp8co.so183ajas218N@bay1-193.quincy.ziplink.net>

Brian Kendig <fox-at-enchanter-net@SPAM.BLOCK> wrote:

> test1.pl:
> 
>   $foo = "test";
> 
> test2.pl:
> 
>   require "test1.pl";
>   use strict;
>   use vars '$foo';
>   print "$main::foo\n";
> 
> Running "perl -w test2.pl" prints out "test" as expected, but I find it
> weird that I need to say "$main::foo" rather than "$foo".  Is this the
> way it 'should' be done?

I find that weird too.

test1.pl:

  $foo = "test";

test2.pl:

  require "test1.pl";
  use strict;
  use vars '$foo';
  print "$foo\n";

Running "perl -w test2.pl" prints out "test" as expected.

-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        perl -le 'print "Just another \u$^X hacker"'


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

Date: 24 Feb 1999 00:11:20 -0800
From: fox-at-enchanter-net@SPAM.BLOCK (Brian Kendig)
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <7b0c78$ocj$1@shell11.ba.best.com>

rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
>test1.pl:
>
>  $foo = "test";
>
>test2.pl:
>
>  require "test1.pl";
>  use strict;
>  use vars '$foo';
>  print "$foo\n";
>
>Running "perl -w test2.pl" prints out "test" as expected.

Huh... for me, that gives a "global symbol foo requires explicit package
name" error and fails to run.

I have no idea what I'm doing wrong, but I'll poke around the packages
documentation some more.  Thanks!

-- 
 ____    |\/|                  Brian Kendig   
 \  /\   / ..__.       fox at enchanter net     You are in a maze of twisty
  \/  \__\   _/    http://www.enchanter.net/    little passages, all alike.
   \__   __  \_       Be insatiably curious.  
      \____\___\            Ask "why" a lot.  


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

Date: Thu, 25 Feb 1999 00:23:22 -0500
From: rjk@linguist.dartmouth.edu (Ronald J Kimball)
Subject: Re: What's the equivalent of "extern" in Perl?
Message-Id: <1dnr9ev.pcuqaa6upxuhN@bay1-206.quincy.ziplink.net>

Brian Kendig <fox-at-enchanter-net@SPAM.BLOCK> wrote:

> rjk@linguist.dartmouth.edu (Ronald J Kimball) writes:
> >test1.pl:
> >
> >  $foo = "test";
> >
> >test2.pl:
> >
> >  require "test1.pl";
> >  use strict;
> >  use vars '$foo';
> >  print "$foo\n";
> >
> >Running "perl -w test2.pl" prints out "test" as expected.
> 
> Huh... for me, that gives a "global symbol foo requires explicit package
> name" error and fails to run.

I only get that error if I leave off the

  use vars '$foo';

line.  As expected, because that's what strict vars does.


-- 
 _ / '  _      /         - aka -          rjk@linguist.dartmouth.edu
( /)//)//)(//)/(     Ronald J Kimball      chipmunk@m-net.arbornet.org
    /                                  http://www.ziplink.net/~rjk/
        "It's funny 'cause it's true ... and vice versa."


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

Date: Sun, 21 Feb 1999 17:43:42 -0500
From: "Manish Nag" <mnag@exeter.nospam.please>
Subject: Where are the Perl Progammers' Lists?
Message-Id: <gX%z2.827$HF4.1997341@brnws01.ne.mediaone.net>

I recall coming across sites where Perl programmers could leave their
information for companies looking for Perl contract work.  Can someone point
out url's like this for me?  Thanks.

_________________________
Manish Nag
Furnace Blast Technologies, Inc.
1800 Massachusetts Ave #31
Cambridge, MA 02140
(617) 868-9080
mnag@geocities.com





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

Date: Wed, 24 Feb 1999 16:15:01 -0600
From: "Wade T. Funk" <wfunk@dev.tivoli.com>
Subject: While a process is running....
Message-Id: <36D479E5.BD593B51@dev.tivoli.com>

I have a script that runs as a large while loop.  While in the loop
I give commands to run other procedures in other files.  I am trying
to take a CGI approach to present a GUI for this.  My question is,
how do I pass data to this backgrounded script and get the results
from the other procedures' output?

If anyone can tell me how to use 'perldoc' I would also be much
appreciative.  I'm new to this stuff.  

Thanks,
-- 
Wade T. Funk
Systems Administrator
Tivoli Systems, Inc.
(512) 436-8302


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

Date: Fri, 26 Feb 1999 00:26:36 GMT
From: mordasm@home.com (RedWine)
Subject: Win32, How to delete a read only file?
Message-Id: <36d5e631.11978649@C48381-a>

I wrote a little program that will delete files older that X days from
Y directory and any sub directories.

If Read-only file attributes are set the file is not deleted.
If Archive,System, or Hidden are set the program works fine.

Win 98 OS with plans to move finished product to NT.
Perl version 5.004_02

Can some one point me in the right direction?

Thanks

Mike Mordas
mordasm@home.com





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

Date: Fri, 26 Feb 1999 00:25:34 -0800
From: "Dave Roth" <xrxoxtxhxdx@xrxoxtxhx.xnxextx>
Subject: Re: Win32, How to delete a read only file?
Message-Id: <wTsB2.16150$yv3.9160@news2.giganews.com>

RedWine wrote in message <36d5e631.11978649@C48381-a>...
>I wrote a little program that will delete files older that X days from
>Y directory and any sub directories.
>
>If Read-only file attributes are set the file is not deleted.
>If Archive,System, or Hidden are set the program works fine.
>
>Win 98 OS with plans to move finished product to NT.
>Perl version 5.004_02
>
>Can some one point me in the right direction?


An easy approach to this is to use Win32::File and turn off the
various flags you don't want.

I suppose you could also use chmod as in:
  chmod 0777, $File;
Yes, you need to specify a zero-seven-seven-seven. The leading 0
tells Perl you are referring to an octal number. Chmod works on
5.004 & 5.005 on NT (and I think 95).

dave
--
=================================================================
Dave Roth                                ...glittering prizes and
Roth Consulting                      endless compromises, shatter
http://www.roth.net                     the illusion of integrity
Win32, Perl, C++, ODBC, Training
rothd at roth dot net

Our latest Perl book is now available:
"Win32 Perl Programming: The Standard Extensions"
http://www.roth.net/books/extensions/





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

Date: Wed, 24 Feb 1999 20:46:32 -0400
From: "Jeff Warnica" <jwarnica@ns.sympatico.ca>
Subject: Win32: desktop BG refresh?
Message-Id: <919903601.665965@klaatu.wolf>

I havent realy even goton my feet wet with perl yet.. I only have tried
glueing together a couple of seemingly random scrips from books for this,
but have seemed to have failed.

I want to suck a .jpg of the WWW, and set it as my desktop background, and
refresh the bg. So I ask these specific questions:

I tried doing a simple webget baised on an example in Programing Perl (which
one I dont recall, I dont have the book anymore.. It was a oneliner,
thought) and failed. It looked like there was either extra header
information, or the file was send in textmode, not binary. I know that http
has no concept of text/binary, and someone on IRC thought that it /might/ be
a windows thing. What gives?

And: how would I tell windows that the file that has its background has
changed, and it should do a refresh?

Also, what is the win32 port status: My perl -v is:

This is perl, version 5.005_02 built for MSWin32-x86-object

Copyright 1987-1998, Larry Wall

Binary build 508 provided by ActiveState Tool Corp.
http://www.ActiveState.com
Built 16:22:15 Dec 22 1998



Is it worthwhile upgrading?

thanx




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

Date: Mon, 22 Feb 1999 12:53:02 -0500
From: "Spanky" <WayneBailey@Hotmail.com>
Subject: Win32:Service-Not functioning properly?
Message-Id: <7as5ib$55j$1@holly.prod.itd.earthlink.net>

Hi Everyone,

I have downloaded the new 509 build of Perl, and trying to use
Win32::Service to evaluate if a certain service has stopped.  When trying to
write the script, all I get is compilation error's.  The documentation for
this mod is weak.  Can someone out there give a proper sample of how this
mod is used.

use Win32::Service
    Getstatus(hostname,service,status);

Then I would like to use an if statement to evaluate the Boolean value.
Then if service is stopped, then restart the service and send e-mail.

    Startservice(hostname,Service);

I would really appreciate it :-)

Thanks!





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

Date: 23 Feb 1999 22:33:11 GMT
From: randy@theory.uwinnipeg.ca (Randy Kobes)
Subject: Winnipeg.pm meeting
Message-Id: <slrn7d6bo4.hhh.randy@theory.uwinnipeg.ca>


Hi,
   The next meeting of the Winnipeg perl monger's group will be
Wednesday, Feb 24th at 8:30 PM at Applebee's in the Grant Park
Plaza. Anyone interested in perl, at any level, is welcome.
Hope to see you there.

-- 
		Best regards,
		Randy Kobes

Physics Department		Phone: 	   (204) 786-9399
University of Winnipeg		Fax: 	   (204) 774-4134
Winnipeg, Manitoba R3B 2E9	e-mail:	   randy@theory.uwinnipeg.ca
Canada				http://theory.uwinnipeg.ca/


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

Date: Sun, 21 Feb 1999 21:01:50 +0100
From: Frank de Bot <debot@xs4all.nl>
Subject: Write to a file
Message-Id: <36D0662E.A33D7980@xs4all.nl>

How can I write something to the first line of a file. Nomally perl
writes with this to the last line: open(FILE, ">>file.txt");





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

Date: 21 Feb 1999 13:27:31 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Write to a file
Message-Id: <36d06c33@csnews>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, Frank de Bot <debot@xs4all.nl> writes:
:How can I write something to the first line of a file. Nomally perl
:writes with this to the last line: open(FILE, ">>file.txt");

You can't.  

The fundamental operations of a file are

    opening the file
    closing the file
    reading a number of bytes from the file at the current byte offset
    writing a number of bytes from the file at the current byte offset
    seeking to a different byte offset

Notice this is all bytes, not lines.  

Somehow you appear to have missed the proper answer when you studiously
searched the standard Perl documentation on your very own system.
It was there waiting for you.

% man perlfaq5

    NAME
	perlfaq5 - Files and Formats ($Revision: 1.34 $, $Date:
	1999/01/08 05:46:13 $)

    DESCRIPTION
	This section deals with I/O and the "f" issues: filehandles,
	flushing, formats, and footers.

    ...

      How do I change one line in a file/delete a line in a file/insert a
      line in the middle of a file/append to the beginning of a file?

	Those are operations of a text editor. Perl is not a text
	editor. Perl is a programming language. You have to decompose
	the problem into low-level calls to read, write, open, close,
	and seek.

	Although humans have an easy time thinking of a text file as
	being a sequence of lines that operates much like a stack of
	playing cards -- or punch cards -- computers usually see the
	text file as a sequence of bytes. In general, there's no direct
	way for Perl to seek to a particular line of a file, insert text
	into a file, or remove text from a file.

	(There are exceptions in special circumstances. You can add
	or remove at the very end of the file. Another is replacing
	a sequence of bytes with another sequence of the same
	length. Another is using the `$DB_RECNO' array bindings as
	documented in the DB_File manpage. Yet another is manipulating
	files with all lines the same length.)

	The general solution is to create a temporary copy of the
	text file with the changes you want, then copy that over the
	original. This assumes no locking.

	    $old = $file;
	    $new = "$file.tmp.$$";
	    $bak = "$file.orig";

	    open(OLD, "< $old")         or die "can't open $old: $!";
	    open(NEW, "> $new")         or die "can't open $new: $!";

	    # Correct typos, preserving case
	    while (<OLD>) {
		s/\b(p)earl\b/${1}erl/i;
		(print NEW $_)          or die "can't write to $new: $!";
	    }

	    close(OLD)                  or die "can't close $old: $!";
	    close(NEW)                  or die "can't close $new: $!";

	    rename($old, $bak)          or die "can't rename $old to $bak: $!";
	    rename($new, $old)          or die "can't rename $new to $old: $!";

	Perl can do this sort of thing for you automatically with the `-i'
	command-line switch or the closely-related `$^I' variable (see
	the perlrun manpage for more details). Note that `-i' may require
	a suffix on some non-Unix systems; see the platform-specific
	documentation that came with your port.

	    # Renumber a series of tests from the command line
	    perl -pi -e 's/(^\s+test\s+)\d+/ $1 . ++$count /e' t/op/taint.t

	    # form a script
	    local($^I, @ARGV) = ('.orig', glob("*.c"));
	    while (<>) {
		if ($. == 1) {
		    print "This line should appear at the top of each file\n";
		}
		s/\b(p)earl\b/${1}erl/i;        # Correct typos, preserving case
		print;
		close ARGV if eof;              # Reset $.
	    }

	If you need to seek to an arbitrary line of a file that changes
	infrequently, you could build up an index of byte positions
	of where the line ends are in the file. If the file is large,
	an index of every tenth or hundredth line end would allow you
	to seek and read fairly efficiently. If the file is sorted,
	try the look.pl library (part of the standard perl distribution).

	In the unique case of deleting lines at the end of a file,
	you can use tell() and truncate(). The following code snippet
	deletes the last line of a file without making a copy or reading
	the whole file into memory:

		open (FH, "+< $file");
		while ( <FH> ) { $addr = tell(FH) unless eof(FH) }
		truncate(FH, $addr);

	Error checking is left as an exercise for the reader.

--tom
-- 
     There is always a better way.
                     -- Thomas Edison


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

Date: Thu, 25 Feb 1999 01:33:13 +0800
From: "Michael" <hkultraman@usa.net>
Subject: Writing Search Engine
Message-Id: <7b1d2k$ccf@ustsu10.ust.hk>

I am starting to write a search engine using PERL. But I am actually a
beginner. Could anyone tell me how can I start and any reference URL there
is useful?

Thanks.

Michael
(A Student in Hong Kong)




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

Date: Thu, 25 Feb 1999 13:00:32 -0600
From: Chris Howe <chrishowe@earthling.net>
To: Michael <hkultraman@usa.net>
Subject: Re: Writing Search Engine
Message-Id: <36D59DD0.7FB97F30@earthling.net>

Michael wrote:

> I am starting to write a search engine using PERL. But I am actually a
> beginner. Could anyone tell me how can I start and any reference URL there
> is useful?
>
> Thanks.
>
> Michael
> (A Student in Hong Kong)

Look at the module WWW::Robot. It may be useful for you search engine, if not
it provides an example of how to use the various HTML modules (even though it
is a little out of date.)






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

Date: Thu, 25 Feb 1999 22:27:34 GMT
From: chastity@lco.net
Subject: Re: WWW Hosting for a site in need of CGI
Message-Id: <7b4io9$n9p$1@nnrp1.dejanews.com>

Please visit http://www.lco.net.  We offer three different hosting plans for
as little as $19.95/month.  We allow you to use your custom CGI scripts as
well as Active Server Pages, Visual Interdev 6.0 and FrontPage extensions,
100mb of storage and unmetered data transfer.

Thank you and we look forward to hearing from you soon.
Chastity

In article <7ad7c8$nqs$1@pugsley.tor.metronet.ca>,
  "Boomer" <boomer@info-internet.net> wrote:
> Hi everyone..
>     I'm presently searching for a hosting site.. but my host right now
> doesn't allow me to make my own CGI's, scared of big bad hackers. What
> should i do? Anyone know a free place to place my CGI's to use them
> remotelly? Or someone willing to host my site?
>
> All i need is a little directory for 5 megs, and i'll redirect it to there..
>
> WWW with msgboard, chatroom and pop-mail checking...  So the whole things is
> full of CGI's..
> I'm still lurning Perl.. but since i lurned VB in 2 days.. i guess i can
> lurn Perl in 3 or less.. all i need is to test out my stuff..
>
> It's as if your trying to do grafix without a screen..
>
> Thanks guys..
>
> Reply by mail please..
> boomer@info-internet.net
>
>

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


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

Date: Wed, 24 Feb 1999 09:56:38 +0000 (GMT)
From: CSC6DKF@leeds.ac.uk ("D.K. FLETCHER")
Subject: WWW:Search
Message-Id: <36D3CCD1.19FF@leeds.ac.uk>

I,ve Have WWW:Search installed on UNIX, Does anyone Know
	How I can put this in a web page, at the moment it is 
	working from command line.

	I a bit of a novice to perl programming so try not to be too
	technical

	Thanks


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

Date: 24 Feb 1999 15:55:40 -0500
From: Mark Atwood <mra@pobox.com>
Subject: XML::Parse::Tree, what does it *do*?
Message-Id: <m14sobed2r.fsf@zot.localdomain>


I'm having some problems understanding what XML::Parse(Style=>Tree)
does. I've figured out most everything (I think) except for the
numbers (which seems to be always zero) that go in front of the "text
parts". I've highlighted them below. Can someone tell me what they
are?

>From the XML::Parse POD:

|Parse will return a tree structured as the document is. So for example
|the result of parsing:
|
|  <foo><head id="a">Hello</head><bar>There<ref/></bar>All</foo>
|
|would be:
|
|  [foo, [{}, head, [{id => "a"}, 0, Hello],
                                 ^^^
|	 bar, [{}, 0, There,
                  ^^^
|	       ref, [{}]
|	      ],
|	 0, All
        ^^^
|	]
|  ]

-- 
Mark Atwood   | But that's the way of the puritans - mind like a steel trap:
mra@pobox.com | you take the bait, and it snaps shut in its deathgrip.
              | -- Rich Grise <richgrise@entheosengineering.com>


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

Date: Thu, 25 Feb 1999 03:55:40 GMT
From: Eric Bohlman <ebohlman@netcom.com>
Subject: Re: XML::Parse::Tree, what does it *do*?
Message-Id: <ebohlmanF7oyws.Bu9@netcom.com>

Mark Atwood <mra@pobox.com> wrote:

: I'm having some problems understanding what XML::Parse(Style=>Tree)
: does. I've figured out most everything (I think) except for the
: numbers (which seems to be always zero) that go in front of the "text
: parts". I've highlighted them below. Can someone tell me what they
: are?

: From the XML::Parse POD:

: |Parse will return a tree structured as the document is. So for example
: |the result of parsing:
: |
: |  <foo><head id="a">Hello</head><bar>There<ref/></bar>All</foo>
: |
: |would be:
: |
: |  [foo, [{}, head, [{id => "a"}, 0, Hello],

The 0 (it's always a zero) simply indicates that there's text, as opposed 
to a nested element, at the current position in the tree.  The next 
element of the list is the actual text.  If the 0 were omitted, you 
wouldn't be able to tell whether 'Hello' was text or a <Hello> element 
(at least not without looking ahead to see if it was followed by a 
reference).



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

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

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