[23047] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5268 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jul 24 18:05:48 2003

Date: Thu, 24 Jul 2003 15:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 24 Jul 2003     Volume: 10 Number: 5268

Today's topics:
    Re: Accessing elements in array ref of array references <fatted@yahoo.com>
        Algorithm for optimisation - using Graph.pm? (Clyde Ingram)
        document ID tracking (slash)
        document ID tracking (slash)
    Re: document ID tracking <me@home.com>
    Re: document ID tracking <asu1@c-o-r-n-e-l-l.edu>
    Re: document ID tracking <krahnj@acm.org>
        Mason, DBI, and DBI::Pg <asby@kinderen4kinderen.org>
        Net::HTTP, LWP::UserAgent, IO::Socket, etc <me@home.com>
    Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc <asu1@c-o-r-n-e-l-l.edu>
    Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc <me@home.com>
    Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc <asu1@c-o-r-n-e-l-l.edu>
    Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc <me@home.com>
        Q: Summarize/Condense already tight text string? (Brock Gunter-Smith)
    Re: references help (slash)
        Regex question (Math55)
    Re: Regex question <syscjm@gwu.edu>
    Re: request for perl TK Example (Go Perl)
    Re: simple web site mapper <pinyaj@rpi.edu>
    Re: simple web site mapper <usenet@dwall.fastmail.fm>
        UTF-8 module <jamesbond_422@hotmail.com>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 24 Jul 2003 22:58:26 +0200
From: "Fatted" <fatted@yahoo.com>
Subject: Re: Accessing elements in array ref of array references
Message-Id: <3f2047ad$0$146$1b62eedf@news.wanadoo.nl>


"Greg Bacon" <gbacon@hiwaay.net> wrote in message
news:vgtg7jqdhbkk67@corp.supernews.com...
> In article <4eb7646d.0307110111.4a18dd1d@posting.google.com>,
>     fatted <fatted@yahoo.com> wrote:
>
> : [...]
> :
> : What I was wondering about (for no particular reason) is doing
> : something like:
> :
> : if(map(/$keyword/i,cool_function(@$ref_ref, 0)))
> : {
> : # Do something equally cunningly clever...
> : }
> :
> : Any idea's? (or should I get back to work ;)
>
> If I understand you, cool_function would be equivalent to
>
>     sub cool_function {
>         my $i = pop;
>         map $_->[$i], @_;
>     }
>
> We're discussing things at such a low level that we may be obscuring
> an XY problem.  What are you trying to do?

What I was interested in was keeping the map structure as I would normally
use it for mapping over a "normal" array and matching against $_ (eg
map(/$keyword/i,...), but mapping over the 0th element in each of the array
references which are stored in the array reference. Basically form an array,
which contains all the 0th elements of the array references, and then map
over it. If that makes sense :) I've no particular need to for this, but
just curiosity to see if I could form the map statement slightly
differently. (I think I'm forming an unhealthy fascination with map :)




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

Date: 24 Jul 2003 14:45:09 -0700
From: clyde@getofftheline.freeserve.co.uk (Clyde Ingram)
Subject: Algorithm for optimisation - using Graph.pm?
Message-Id: <29a184fc.0307241345.3a980528@posting.google.com>

At my son's school, each year has about 45 children, in 3 classes of
15
children each.  (Actually, each classroom contains 30 children -
banding together 15 from each of 2 years.  But that is irrelevant.)

At the end of the summer term, the teachers have the difficult task of
deciding how to re-group the 45 children into 3 classes
for next year.

They ask each child to list 4 friends they would like to be in the
same
class with next year (the next autumn term).
The child ranks each friend according to strength of friendship. 
Children
do not necessarily agree - just because Tom lists Dick and Harry, does
not
mean that Dick or Harry list Tom, or that they agree with how he ranks
them.

The teachers have the problem of how to split the 45 children into new
classes for next year, so that all children are as happy as possible. 
(They also take the chance to separate children who squabble!)

This sounds like a straight-forward problem in optimization (but with
45x4
variables?). Unfortunately my mathematics is very rusty, and I do not
know
what algorithm to use to get a solution.

One of my mathematically-minded colleagues suggests constructing a
directed graph, with one vetex per child, and a directed edge per
preference - with a cost according to weighting.  Somehow, I have to
partition the vertices into 3 subsets, cutting the minimum total cost
of weighted edges.  Sounds plausible.

I would appreciate any advice on the algorithm and how to implement
it.
Are there any modules to do such an optimisation - or should I build
on Graph.pm, which I am just starting to look at, whilst wading into
"Mastering Algorithms with Perl", Chapter 8: "Graphs".

Thank-you and regards,
Clyde Ingram


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

Date: 24 Jul 2003 12:53:36 -0700
From: satishi@gwu.edu (slash)
Subject: document ID tracking
Message-Id: <30fe9f1e.0307240405.4a8cbe5e@posting.google.com>

Hi,
I am trying to write a script that will allow me to manipulate words
in a certain way and also keep track of the documents from which those
words came from. In other words, let's say my corpus consisted of
htese three documents with the following contents.

DocID 1.TXT
Compose your message

DocID 2.TXT
Use this form to post your message

DocID 3.TXT
Remember that it can be viewed by millions

Now, when I do my processing for all files, I want to be able to see
that "message" is a word that appears in both DocID 1.TXT and DocID
2.TXT

How can I do this in Perl? Is this what an inverted index is minus the
term frequencies, etc.? I am under pressure and wanted to know if
there was any way I could perhaps get this code from somewhere else or
perhaps the pseudocode.
I would certainly appreciate any help.

Thanks,
Satish


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

Date: 24 Jul 2003 12:53:47 -0700
From: satishi@gwu.edu (slash)
Subject: document ID tracking
Message-Id: <30fe9f1e.0307240405.7908ae70@posting.google.com>

Hi,
I am trying to write a script that will allow me to manipulate words
in a certain way and also keep track of the documents from which those
words came from. In other words, let's say my corpus consisted of
htese three documents with the following contents.

DocID 1.TXT
Compose your message

DocID 2.TXT
Use this form to post your message

DocID 3.TXT
Remember that it can be viewed by millions

Now, when I do my processing for all files, I want to be able to see
that "message" is a word that appears in both DocID 1.TXT and DocID
2.TXT

How can I do this in Perl? Is this what an inverted index is minus the
term frequencies, etc.? I am under pressure and wanted to know if
there was any way I could perhaps get this code from somewhere else or
perhaps the pseudocode.
I would certainly appreciate any help.

Thanks,
Slash


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

Date: Thu, 24 Jul 2003 16:17:16 -0700
From: Steve in NY <me@home.com>
Subject: Re: document ID tracking
Message-Id: <ogp0iv4icia7dsk5cmpul0ftdhmde5pabl@4ax.com>

On 24 Jul 2003 12:53:47 -0700, satishi@gwu.edu (slash) wrote:

>Hi,
>I am trying to write a script that will allow me to manipulate words
>in a certain way and also keep track of the documents from which those
>words came from. In other words, let's say my corpus consisted of
>htese three documents with the following contents.
>
>DocID 1.TXT
>Compose your message
>
>DocID 2.TXT
>Use this form to post your message
>
>DocID 3.TXT
>Remember that it can be viewed by millions
>
>Now, when I do my processing for all files, I want to be able to see
>that "message" is a word that appears in both DocID 1.TXT and DocID
>2.TXT
>
>How can I do this in Perl? Is this what an inverted index is minus the
>term frequencies, etc.? I am under pressure and wanted to know if
>there was any way I could perhaps get this code from somewhere else or
>perhaps the pseudocode.
>I would certainly appreciate any help.
>
>Thanks,
>Slash

this doesn't check for frequencies, just that the word does exist in each file.
to check for frequencies, I would suggest first breaking up the line on each
word (break each word by whitespace), and then using a hash with the word as key
and vaule would be number of times it appears, etc....

#!/usr/bin/perl -w
use strict;

my $word = "message";

my @files = qw(DocID_1.TXT
                         DocID_2.TXT
                         DocID_3.TXT);

for my $file (@files) {
    open (FILE, "<$file");
        while (<FILE>) {
            if ($_ =~ /($word)/) {
                print "$file contains the word $word.\n"
            }
        }
}








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

Date: 24 Jul 2003 20:31:14 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: document ID tracking
Message-Id: <Xns93C2A80F838A4asu1cornelledu@132.236.56.8>

satishi@gwu.edu (slash) wrote in news:30fe9f1e.0307240405.7908ae70
@posting.google.com:

> Hi,
> I am trying to write a script that will allow me to manipulate words
> in a certain way and also keep track of the documents from which those
> words came from. In other words, let's say my corpus consisted of
> htese three documents with the following contents.
> 
> DocID 1.TXT
> Compose your message
> 
> DocID 2.TXT
> Use this form to post your message
> 
> DocID 3.TXT
> Remember that it can be viewed by millions
> 
> Now, when I do my processing for all files, I want to be able to see
> that "message" is a word that appears in both DocID 1.TXT and DocID
> 2.TXT

I am sure there is a better way to do this, but you can use a hash keyed 
on the words. My quick hack is below. (BTW, I do hope this is not 
homework).

# cw: Common Word
# Script to list words that appear in all the files
# passed on the command line

use diagnostics;
use strict;
use warnings;

die "$0: file1 ... fileN\n" unless scalar @ARGV;

my %word_to_files;

while(<ARGV>) {
  chomp;
  my @words = split /\s+/;
  foreach my $word (@words) {
	if(exists $word_to_files{$word}) {
		unless(grep /$ARGV/, @{$word_to_files{$word}}) {
			push @{$word_to_files{$word}}, ($ARGV);
		}
	} else {
		$word_to_files{$word} = [$ARGV];
	}
  }
}

foreach (sort keys %word_to_files) {
  print "$_: @{$word_to_files{$_}}\n";
}

__END__

C:\develop\perl\misc>cat file?.txt
Compose your message

Use this form to post your message

Remember that it can be viewed by millions

C:\develop\perl\misc>cw.pl file1.txt file2.txt file3.txt
Compose: file1.txt
Remember: file3.txt
Use: file2.txt
be: file3.txt
by: file3.txt
can: file3.txt
form: file2.txt
it: file3.txt
message: file1.txt file2.txt
millions: file3.txt
post: file2.txt
that: file3.txt
this: file2.txt
to: file2.txt
viewed: file3.txt
your: file1.txt file2.txt

-- 
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov


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

Date: Thu, 24 Jul 2003 21:07:36 GMT
From: "John W. Krahn" <krahnj@acm.org>
Subject: Re: document ID tracking
Message-Id: <3F204AC8.74D799E9@acm.org>

slash wrote:
> 
> I am trying to write a script that will allow me to manipulate words
> in a certain way and also keep track of the documents from which those
> words came from. In other words, let's say my corpus consisted of
> htese three documents with the following contents.
> 
> DocID 1.TXT
> Compose your message
> 
> DocID 2.TXT
> Use this form to post your message
> 
> DocID 3.TXT
> Remember that it can be viewed by millions
> 
> Now, when I do my processing for all files, I want to be able to see
> that "message" is a word that appears in both DocID 1.TXT and DocID
> 2.TXT
> 
> How can I do this in Perl? Is this what an inverted index is minus the
> term frequencies, etc.? I am under pressure and wanted to know if
> there was any way I could perhaps get this code from somewhere else or
> perhaps the pseudocode.
> I would certainly appreciate any help.

Something like this should work:

@ARGV = ( 'DocID 1.TXT', 'DocID 2.TXT', 'DocID 3.TXT' );

my %data;

while ( <> ) {
    # store the file name and line numbers for each occurance of word
    push @{ $data{ $_ }{ $ARGV } }, $. for split;
    # reset $. for next file
    close ARGV if eof;
    }


for my $word ( sort keys %data ) {
    for my $file ( sort keys %$word ) {
        print "$word $file @{$data{$word}{$file}}\n";
        }
    }



John
-- 
use Perl;
program
fulfillment


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

Date: Thu, 24 Jul 2003 23:04:27 +0200
From: "Asby" <asby@kinderen4kinderen.org>
Subject: Mason, DBI, and DBI::Pg
Message-Id: <3f2049db$0$49109$e4fe514c@news.xs4all.nl>

Heard a lot about Mason, so I'm playing around with it. I builded a
Postgresql database, with a simple table with one user in it. I wrote a
script which will check the database for the user and print the output.
Somehow it doesn't work always, don't know what is going wrong, but I get my
expected output and if I refresh it will give me sometimes the following
error:

System error
error: Undefined subroutine &DBD::Pg::db::_login called at
/usr/lib/perl5/site_perl/5.8.0/i686-linux/DBD/Pg.pm line 98.

context: ...
94: }
95: $sth->finish;
96: $dbh->disconnect;
97: return @sources;
98: }
99:
100:
101: sub connect {
102: my($drh, $dbname, $user, $auth)= @_;
 ...

code stack: /usr/lib/perl5/site_perl/5.8.0/i686-linux/DBD/Pg.pm:98
/usr/lib/perl5/site_perl/5.8.0/i686-linux/DBI.pm:513
/home/httpd/htdocs/challenge/autohandler:22

All my modules are fresh from CPAN and still I get this error sometimes.
What gives me this error and how can I solve it?

-- 
ttfn,

Asby
Follow your money: http://www.eurobilltracker.com/index.php?referer=6215




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

Date: Thu, 24 Jul 2003 14:51:44 -0700
From: Steve in NY <me@home.com>
Subject: Net::HTTP, LWP::UserAgent, IO::Socket, etc
Message-Id: <6ok0iv4hfug7gli7js7ej8g3p1bqp981op@4ax.com>

Hi all,

I am going through the list of standard modules and found the following which
all allow one to create an http connection:

Net::HTTP, LWP::UserAgent, IO::Socket, Socket, HTTP

Which is best? Are there any differences? Well, mostly I just use IO::Socket,
but something simpler might make my code a lot shorter. And also something that
handles time outs well would be good. Right now I am trying to poll urls using
the HEAD method and would like it to timeout well.

Also, on a related note, there is

CGI.pm and HTML.pm ...I like handling the cgi part myself, but getting html out
of my code would be nice, something like

form("my value");

table -> cell("data");

would be cool.

Thanks in advance!





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

Date: 24 Jul 2003 19:21:24 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc
Message-Id: <Xns93C29C385F41Basu1cornelledu@132.236.56.8>

Steve in NY <me@home.com> wrote in
news:6ok0iv4hfug7gli7js7ej8g3p1bqp981op@4ax.com: 

> I am going through the list of standard modules and found the
> following which all allow one to create an http connection:
> 
> Net::HTTP, LWP::UserAgent, IO::Socket, Socket, HTTP
> 
> Which is best? Are there any differences? 

Reading the documentation may help clarify the differences. You may want 
to ask here if you have specific programming question.

> Well, mostly I just use IO::Socket, but something simpler might make 
> my code a lot shorter. And also something that handles time outs well 
> would be good. Right now I am trying to poll urls using the HEAD method 
> and would like it to timeout well. 

I am not sure what you mean by "poll urls". Why do you think your HEAD 
request is not timing out?

> CGI.pm and HTML.pm ...I like handling the cgi part myself, but getting
> html out of my code would be nice, something like
> 
> form("my value");
> 
> table -> cell("data");
> 
> would be cool.

Again, reading the documentation for the relevant modules would be 
beneficial to you. I am not sure what package you are referring to with 
HTML.pm, but CGI.pm does have the facilities you need. Reciting the 
CGI.pm documentation here would be pointless, so read it.

Sinan.
-- 
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov


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

Date: Thu, 24 Jul 2003 15:54:26 -0700
From: Steve in NY <me@home.com>
Subject: Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc
Message-Id: <2mo0ivg4dodjf8iqcr3pmgfp29g9k164j8@4ax.com>

On 24 Jul 2003 19:21:24 GMT, "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu> wrote:


>Reading the documentation may help clarify the differences. You may want 
>to ask here if you have specific programming question.

I do have a specific programing question. My question is why are there so many
different modules to handle the same thing. And I am reading the documentation,
I just thought it would be interesting if anyone could give me insight on this
question.

And also, some modules are better than others, so I was hoping to get insight
here as well.

Steve




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

Date: 24 Jul 2003 20:02:33 GMT
From: "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
Subject: Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc
Message-Id: <Xns93C2A332992BBasu1cornelledu@132.236.56.8>

Steve in NY <me@home.com> wrote in
news:2mo0ivg4dodjf8iqcr3pmgfp29g9k164j8@4ax.com: 

> On 24 Jul 2003 19:21:24 GMT, "A. Sinan Unur" <asu1@c-o-r-n-e-l-l.edu>
> wrote: 
> 
> 
>>Reading the documentation may help clarify the differences. You may
>>want to ask here if you have specific programming question.
> 
> I do have a specific programing question. My question is why are there
> so many different modules to handle the same thing. And I am reading
> the documentation, I just thought it would be interesting if anyone
> could give me insight on this question.


Net::HTTP - Low-level HTTP client connection

The Net::HTTP class is a low-level HTTP client. An instance of the 
Net::HTTP class represents a connection to an HTTP server. The HTTP 
protocol is described in RFC 2616. The Net::HTTP class support HTTP/1.0 and 
HTTP/1.1. 

LWP: The libwww-perl collection is a set of Perl modules which provides a 
simple and consistent application programming interface (API) to the World-
Wide Web. The main focus of the library is to provide classes and functions 
that allow you to write WWW clients. The library also contain modules that 
are of more general use and even classes that help you implement simple 
HTTP servers.

IO::Socket - Object interface to socket communications

> And also, some modules are better than others

Depends on the task. 

Sinan.

-- 
A. Sinan Unur
asu1@c-o-r-n-e-l-l.edu
Remove dashes for address
Spam bait: mailto:uce@ftc.gov


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

Date: Thu, 24 Jul 2003 16:20:07 -0700
From: Steve in NY <me@home.com>
Subject: Re: Net::HTTP, LWP::UserAgent, IO::Socket, etc
Message-Id: <2cq0ivkhbuh90mac0kabaf1atvcsa6t4f5@4ax.com>

hmmm...I guess I better read the documentation some more ;-)

thanks for the reply,

Steve




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

Date: 24 Jul 2003 14:23:39 -0700
From: brock@gunter-smith.com (Brock Gunter-Smith)
Subject: Q: Summarize/Condense already tight text string?
Message-Id: <f6181183.0307241323.39cf7e14@posting.google.com>

I'm dealing with a set of over 8,000 file that need to have their long
filenames (up to 125 characters) reduced down to a maximum of 40
characters. Right now I basically:

 if > maxlength remove all non alphanumeric characters
 if still too long, remove all vowels
 if still too long, trim from the middle to reduce length to maxlength

This process works well, but not always generating intelligible
filenames. 90% of the time it works well. Are there algorithms out
there that would "summarize" or otherwise more intelligibly condense a
text string while maintaining the best possible representation of the
original string?

Sounds odd, I know, and maybe this is ridiculous, but I would enjoy
hearing anyone's thoughts on how most effectively to do this if I am
missing an otherwise obvious or commonly used solution.

Thanks.


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

Date: 24 Jul 2003 12:45:17 -0700
From: satishi@gwu.edu (slash)
Subject: Re: references help
Message-Id: <30fe9f1e.0307241145.31dff24a@posting.google.com>

Thanks Tad!!
I have another situation (mentioned in an earlier posting.) First, I
want to know how to run this program on multiple input files. Second,
I want to output the result into a single dump file where document IDs
associated with each word in the leftmost column in the __DATA__ are
incorporated into the tree or the indented output below.
Would I need to build some sort of an inverted index? I am not sure
how that will pan out?
Again, many thanks in advance!!!

So, for the data at the end of the post, I would like something like
this:

brown
 fox
  jumped
   DocID:fox.txt
 quick
   DocID:fox.txt
dog
 lazy
  over
   DocID:fox.txt
 tripped
  over
   DocID:fox.txt
fox
 brown
  quick
   DocID:fox.txt
 jumped
  over
   DocID:fox.txt
 resting
  over
   DocID:fox.txt


tadmc@augustmail.com (Tad McClellan) wrote in message news:<slrnbhtb7u.4o7.tadmc@magna.augustmail.com>...
> slash <satishi@gwu.edu> wrote:
> 
> > And the output I seek is the following:
> 
> [ hierarchy of the tree shown with indentation ]
> 
> 
> 
> The easiest way to fix your code, is to discard it and come up
> with a cleaner algorithm.  :-)
> 
> This program makes the output you've asked for (assuming that
> the order does not matter):
> 
> ---------------------------------------------------------------------
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Data::Dumper;
> 
> my %tree; # HoH
> while (<DATA>) {
>    chomp;
>    my $href = \%tree;
> 
>    foreach my $key ( split /\s+/ ) {
>       $href = \%{ $href->{$key} };    # autovivification creates anon hash
>    }
> }
> #print Dumper \%tree;
> 
> children( 0, \%tree );
> 
> sub children {
>    my($level, $href) = @_;
> 
>    foreach my $key ( sort keys %$href ) { # stop recursing at an empty hash
>       print ' ' x $level, "$key\n";
>       children( $level+1, $href->{$key} );
>    }
> }
> 
> 
> __DATA__
> quick    brown   fox
> brown    quick
> brown    fox     jumped
> fox      brown   quick
> fox      jumped  over
> fox      resting over
> jumped   fox     brown
> jumped   over    lazy
> over     jumped  fox
> over     lazy    dog
> lazy     over    jumped
> lazy     dog     tripped
> dog      lazy    over
> dog      tripped over
> tripped  dog     lazy
> tripped  over    resting
> over     tripped dog
> over     resting fox
> resting  tripped over
> resting  fox
> ---------------------------------------------------------------------


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

Date: 24 Jul 2003 12:40:10 -0700
From: magelord@t-online.de (Math55)
Subject: Regex question
Message-Id: <a2b8188a.0307240345.7f9acc1c@posting.google.com>

hi, the regex .* should match everything but newline, right? but it
doesnt. sime time ago i read something that .* will not match
evrything? is that true?

THANKS...


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

Date: Thu, 24 Jul 2003 16:32:00 -0400
From: Chris Mattern <syscjm@gwu.edu>
Subject: Re: Regex question
Message-Id: <3F204240.70802@gwu.edu>

Math55 wrote:
> hi, the regex .* should match everything but newline, right?

Correct.

> but it
> doesnt. 

Give specifics of when you observed that it did not.

                 Chris Mattern



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

Date: 24 Jul 2003 14:33:11 -0700
From: puissant00@yahoo.com (Go Perl)
Subject: Re: request for perl TK Example
Message-Id: <d3825316.0307240557.5e41ac77@posting.google.com>

Thanks for the help. It is really helping a lot


Bob Walton <bwalton@rochester.rr.com> wrote in message news:<3F1F56C4.9040005@rochester.rr.com>...
> Go Perl wrote:
> 
> > I am trying to develop GUI on win-32 using perl/TK. I am reading stuff
> > on it and i would like to know if anyone can provide me a sample
> > script so that i can play around with it and if needed alter it to my
> > needs. All i want from this GUI is to a couple of radio buttons to
> > select the particular script to run and then some variables to be
> > passed into the script and then hit run for the simulation.
> > 
> > I will be glad if anyone can help me in this. I am newbie when it
> > comes to working on TK.
> > Thanks in advance
> > 
> 
> You should be able to type:
> 
>     widget
> 
> at your command prompt and try out dozens of Tk examples, complete with 
> displays, listing, commentary.  widget should have been made available 
> when you installed Tk.  Wonderful little program.


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

Date: Thu, 24 Jul 2003 14:18:43 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: simple web site mapper
Message-Id: <Pine.SGI.3.96.1030724141713.165630A-100000@vcmr-64.server.rpi.edu>

On Thu, 24 Jul 2003, David K. Wall wrote:

>Dan Jacobson <jidanni@jidanni.org> wrote:
>
>> print <<EOF;
>><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN"
>> "http://www.w3.org/TR/html4/strict.dtd"><HTML><TITLE>$name\'s site
>                                                            ^^
>It's not necessary to escape that single-quote after $name.

Yes it is.  $name's is pre-Perl 5 syntax for $name::s.  It's something
that bites many Perl programmers from time to time.

-- 
Jeff Pinyan            RPI Acacia Brother #734            2003 Rush Chairman
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: Thu, 24 Jul 2003 18:54:40 -0000
From: "David K. Wall" <usenet@dwall.fastmail.fm>
Subject: Re: simple web site mapper
Message-Id: <Xns93C297AF279BEdkwwashere@216.168.3.30>

Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote:

> On Thu, 24 Jul 2003, David K. Wall wrote:
> 
>>Dan Jacobson <jidanni@jidanni.org> wrote:
>>
>>> print <<EOF;
>>><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN"
>>> "http://www.w3.org/TR/html4/strict.dtd"><HTML><TITLE>$name\'s
>>> site 
>>                                                            ^^
>>It's not necessary to escape that single-quote after $name.
> 
> Yes it is.  $name's is pre-Perl 5 syntax for $name::s.  It's
> something that bites many Perl programmers from time to time.

Damn.  I knew about the pre-Perl 5 syntax, but a quick 
copy/paste/edit/run of code from the OP convinced me that it didn't 
matter any more.  But there are *two* places in the here-doc that use 
an escape quote.  I edited one and saw the output from the other.



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

Date: Thu, 24 Jul 2003 21:10:49 +0000 (UTC)
From: "Jerry Maguire" <jamesbond_422@hotmail.com>
Subject: UTF-8 module
Message-Id: <bfpi0p$i6p$1@titan.btinternet.com>

Hi,
Is there any module to encode a URL into UTF-8 format? I have looked at cpan
and could not find anything.
At the moment I am using MIME::base64 perl module to do URL
encoding/decoding but also need a UTF-8 encoding/decoding.


Thanks
Jerry




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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
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.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 V10 Issue 5268
***************************************


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