[23874] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6077 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 4 09:05:52 2004

Date: Wed, 4 Feb 2004 06:05:06 -0800 (PST)
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, 4 Feb 2004     Volume: 10 Number: 6077

Today's topics:
        =?ISO-8859-1?Q?How_to_get_into_a_variable_the_r=E9sult_ (hurluberlu)
    Re: =?ISO-8859-1?Q?How_to_get_into_a_variable_the_r=E9s <usenet@morrow.me.uk>
        ANNOUNCE: AFS Perl API 2.2.0 released <nog@MPA-Garching.MPG.DE>
        ANNOUNCE: CGI::TabPane V 1.03 <ron@savage.net.au>
        Can't locate IO/Tty/Constant.pm in @INC (Newbie)
    Re: capturing a match (Chris)
    Re: CGI syntax error not behaving as I expected but... <usenet@morrow.me.uk>
    Re: CGI syntax error not behaving as I expected but... <uri@stemsystems.com>
    Re: CGI syntax error not behaving as I expected but... <bik.mido@tiscalinet.it>
    Re: ISO lightweight OO-RDBMS in Perl <invalid-email@rochester.rr.com>
    Re: ithreads at runtime? (Walter Roberson)
    Re: network card <wherrera@lynxview.com>
    Re: Perl For Amateur Computer Programmers <bik.mido@tiscalinet.it>
        RegExp for matching word "karl@aol.com" or word "paul@h (Gerd Pohlmann)
    Re: RegExp for matching word "karl@aol.com" or word "pa <tadmc@augustmail.com>
    Re: RegExp for matching word "karl@aol.com" or word "pa <noreply@gunnar.cc>
        Site Visitor's eMail Address <askjinu@earthlink.net>
    Re: Site Visitor's eMail Address <josef.moellers@fujitsu-siemens.com>
    Re: Site Visitor's eMail Address <tore@aursand.no>
    Re: Site Visitor's eMail Address (Steve)
    Re: Site Visitor's eMail Address <noemail@noemail4u.com>
        Very basic RPC::XML - passing arguments <no-spam@no-spam.org>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 4 Feb 2004 02:53:44 -0800
From: hurlu.berlue@laposte.net (hurluberlu)
Subject: =?ISO-8859-1?Q?How_to_get_into_a_variable_the_r=E9sult_of_?= =?ISO-8859-1?Q?a_Carp::croak/cluck/confess_instruction_=3F?=
Message-Id: <d9b80c0c.0402040253.6755304d@posting.google.com>

When the next instruction is executed in my code
   Carp::confess "exception occured";

there is a lot of informations written on STDERR. I'd like to get
these informations to put them into a HTML window. What can I do for
that ?

Thanks for your help


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

Date: Wed, 4 Feb 2004 11:17:28 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: =?ISO-8859-1?Q?How_to_get_into_a_variable_the_r=E9sult_of_?= =?ISO-8859-1?Q?a_Carp::croak/cluck/confess_instruction_=3F?=
Message-Id: <bvqkc8$cff$1@wisteria.csv.warwick.ac.uk>


hurlu.berlue@laposte.net (hurluberlu) wrote:
> When the next instruction is executed in my code
>    Carp::confess "exception occured";
> 
> there is a lot of informations written on STDERR. I'd like to get
> these informations to put them into a HTML window. What can I do for
> that ?

my $msg = Carp::longmess "exception occurred";

Ben

-- 
   Razors pain you / Rivers are damp
   Acids stain you / And drugs cause cramp.                    [Dorothy Parker]
Guns aren't lawful / Nooses give
  Gas smells awful / You might as well live.                   ben@morrow.me.uk


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

Date: Tue, 3 Feb 2004 09:10:46 GMT
From: Norbert Gruener <nog@MPA-Garching.MPG.DE>
Subject: ANNOUNCE: AFS Perl API 2.2.0 released
Message-Id: <HsK8KL.17B1@zorch.sf-bay.org>


AFS Perl API Version 2.2.0
    I am pleased to announce the AFS Perl API 2.2.0 release

    The AFS module bundle is a dynamically loadable extension to
    Perl. It gives the AFS user and administrator access to many of
    the AFS programming APIs, allowing you to make these calls
    directly from Perl, rather then processing the output of a
    command. The AFS module bundle is a thin layer above the low-level
    AFS APIs.

Where To Get It
    The version 2.2.0 is now available at

        http://www.MPA-Garching.MPG.de/~nog/perl/AFS-2.2.0.tar.gz
        http://www.cpan.org/authors/id/N/NO/NOG/AFS-2.2,0.tar.gz

    This release should work on all UNIX/Linux platforms which have
    AFS API interfaces and the appropriate C compilation environment.

User visible changes in this release
    - New modules VOS and VLDB which implement the VOS command suite.
    - Support for CM function "getvolstats".
    - improved test drivers
    - improved Make scripts


For more information about the current state of the AFS Perl API,
check my "AFS Perl API Kwiki" site at:

        http://www.mpa-garching.mpg.de/kwiki/nog/afsperl/


Share and Enjoy!

Norbert
-- 
Ceterum censeo          | PGP encrypted mail preferred.
Redmond esse delendam.  | PGP Key at www.MPA-Garching.MPG.de/~nog/




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

Date: Tue, 3 Feb 2004 07:31:08 GMT
From: Ron Savage <ron@savage.net.au>
Subject: ANNOUNCE: CGI::TabPane V 1.03
Message-Id: <HsK8K3.1zsM@zorch.sf-bay.org>

The pure Perl module CGI::TabPane V 1.03
is available immediately from CPAN,
and from http://savage.net.au/Perl-modules.html.

On-line docs, and a *.ppd for ActivePerl are also
available from the latter site.

An extract from the docs:

NAME
CGI::TabPane - Support panes with clickable tabs

Recent changes:
1.03  Tue Feb 03 12:37:29 2004
	- Add warning to docs that the CSS file given by the final_css parameter to new()
		must follow, in the <head> of the HTML, the CSS file given by the style_css
		parameter. Add corresponding comment to examples/test-cgi-tabpane.cgi
	- Only add the infix_html between panes, not also after the last pane as I was doing
	- Cut all unused CSS selectors from *.css. This makes it much easier to combine this
		module with other CSS files
	- Change docs to recommend separating panes vertically by 1 paragraph rather than 2.
		Since the CSS selector 'p' was cut from *.css, your demos will change appearence
		whether you use 1 or 2 paragraphs in this way
--
Cheers
Ron Savage, ron@savage.net.au on 3/02/2004
http://savage.net.au/index.html




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

Date: 3 Feb 2004 20:30:35 -0800
From: diwaneel@yahoo.com (Newbie)
Subject: Can't locate IO/Tty/Constant.pm in @INC
Message-Id: <8a54fd80.0402032030.1a7cf600@posting.google.com>

Hi

My script is using Expect.pm. The pre-requisites of using this is
IO::tty and IO::pty. I downloaded Bundle-Expect-1.09, which says that
it has both these packages. Later executing this script gave this eror
message:

Can't locate IO/Tty/Constant.pm in @INC (@INC contains:
/avo/tools/PerlLib /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
/usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .)
at /usr/perl5/5.00503/sun4-solaris/IO/Tty.pm line 8.
BEGIN failed--compilation aborted at
/usr/perl5/5.00503/sun4-solaris/IO/Tty.pm line 8.
BEGIN failed--compilation aborted at
/usr/perl5/5.00503/sun4-solaris/IO/Pty.pm line 8.
BEGIN failed--compilation aborted at /avo/tools/PerlLib/Expect.pm line
22.
BEGIN failed--compilation aborted at /avo/tools/File.pl line 356.

The existing package on my machine: 5.005_03
Is this s dependancy issue or difference in versions is causing the
problem? How to resolve it?

Thanks


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

Date: 4 Feb 2004 02:23:39 -0800
From: c.cole@umist.ac.uk (Chris)
Subject: Re: capturing a match
Message-Id: <da822336.0402040223.33caed8a@posting.google.com>

Brad Baxter <bmb@ginger.libs.uga.edu> wrote in message news:<Pine.A41.4.58.0402031147430.14072@ginger.libs.uga.edu>...
> On Tue, 3 Feb 2004, Chris wrote:
> 
> > But I wanted to do this:
> > my $h{$F[3]} = $F[0] =~ /(pr\d{5})/;
> >
> > However, this gives 'asni00107=1'. How can I get the capturing to
> > return the match rather than the number of matches? I've done
> > this before with success and I'm sure I haven't missed anything
> > obvious (have I?).
> > Any pointers appreciated.
> 
> I think this is what you're after:
> 
> ($h{$F[3]}) = $F[0] =~ /(pr\d{5})/;
> 

Thanks very much to all of you. It was indeed list context that I
needed. BTW the 'my $h{$F[3]}' is a mistake. I'd copied it across
whilst trying rememdy the problem half-way through...


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

Date: Wed, 4 Feb 2004 02:11:35 +0000 (UTC)
From: Ben Morrow <usenet@morrow.me.uk>
Subject: Re: CGI syntax error not behaving as I expected but...
Message-Id: <bvpkcn$n5f$1@wisteria.csv.warwick.ac.uk>


Jim Gibson <jgibson@mail.arc.nasa.gov> wrote:
>
> The same compiler laxity is present in C and C++, and this is a common
> error there, too. I have seen programmers turn the conditional around,
> putting the constant first:
> 
> if( 12 == substr($date_time_raw[$loop] ) {  ## do something }
> 
> Then, if they forget the second equal sign, the compiler terminates
> with a syntax error:
> 
> "Can't modify constant item in scalar assignment at myprogram.pl line
> 2, near ") ) "
> 
> I don't do this because I don't like the readability of the result, but
> it does work.

I, OTOH, often do do this, because I much prefer list operators
without parentheses:

if (12 == substr $data_time_raw[$loop], 8, 2) { }

TMTOWTDI, as usual :)

Ben

-- 
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based 
on the strictest morality.  [Samuel Butler, paraphrased]       ben@morrow.me.uk


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

Date: Wed, 04 Feb 2004 02:21:34 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: CGI syntax error not behaving as I expected but...
Message-Id: <x7ptcv7ff6.fsf@mail.sysarch.com>

>>>>> "JG" == Jim Gibson <jgibson@mail.arc.nasa.gov> writes:

  JG> As pointed out by others, this is not a syntax error. However, if you
  JG> had put "use warnings" at the top of your program, perl would have
  JG> flagged the assignment in the if conditional as a warning:

  JG> "Found = in conditional, should be == at myprogram.pl line 2."

that warning is not worded correctly. look at these:

perl -we 'if ( my $x = 3 ) {print "foo\n"}'
Found = in conditional, should be == at -e line 1.
foo

perl -we 'if ( my $x = $y ) {print "foo\n"}'
Name "main::y" used only once: possible typo at -e line 1.

perl -we 'if ( $x = $y ) {print "foo\n"}'
Name "main::x" used only once: possible typo at -e line 1.
Name "main::y" used only once: possible typo at -e line 1.

that warning only happens when you assign a constant in the
conditional. i use if ( my $x = $y ) in plenty of places. $y is really
most commonly a hash lookup like this:

	if ( my $foo = $self->{'foo'} ) {

		do something with $foo
	}

this keeps $foo tightly scoped. it also eliminates the extra hash lookup
that would be needed otherwise. the typical ways that is coded is:


	if ( $self->{'foo'} ) {

		do something with $self->{'foo'}
	}

or

	my $foo = $self->{'foo'} ;
	if ( $foo ) {

		do something with $foo
	}

  JG> The same compiler laxity is present in C and C++, and this is a common
  JG> error there, too. I have seen programmers turn the conditional around,
  JG> putting the constant first:

  JG> if( 12 == substr($date_time_raw[$loop] ) {  ## do something }

and another point i should mention to the OP, substr deal with strings
so the == should be eq. and if it was that, then the confusion over = vs
== wouldn't happen.

this constant on the left trick is old and the book code complete
mentions it. since i don't fall into the =/== bugs (too) often, i don't
worry about it.

  JG> I don't do this because I don't like the readability of the result, but
  JG> it does work.

same here.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Thu, 05 Feb 2004 13:41:07 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: CGI syntax error not behaving as I expected but...
Message-Id: <6id420t84rpv8u9t3kfuvohnrfv1cf0a5o@4ax.com>

On Tue, 03 Feb 2004 18:10:35 +0100, Thomas Kratz
<ThomasKratz@REMOVEwebCAPS.de> wrote:

>> Thank you both for the explaination. Should have relized with was my 
>> logic error and not syntax. My thinking was that since it was in an if 
>> statement I could not do an assignment. Everything makes sense now. I'll 
>> check that document.
>> 
>> Yes I can be taught.
>
>Can you be taught to stop top posting?

Also, it is customary that people post here (OT) CGI questions wrongly
assuming that CGI==Perl, without even specifying in the subject line
that their post is about CGI. This, along with the actual nature and
tone of those questions, tends to cause irritation in many group
regulars.

Now you have the opposite situation, where you had a true Perl
question that you presented like a CGI one: note that many valuable
contributors to this ng may have kept away from this thread because of
this and the above mentioned circumstance!

I suggest you try to choose more pertinent subjects for the future...


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Wed, 04 Feb 2004 02:48:15 GMT
From: Bob Walton <invalid-email@rochester.rr.com>
Subject: Re: ISO lightweight OO-RDBMS in Perl
Message-Id: <40205CE3.7050403@rochester.rr.com>

kj wrote:

> I have 4 or 5 personal coding projects in my to-do list, all of
> which feature simple relational databases (e.g. a catalog of TV
> show episodes on tape; a catalog of all my books; a catalog of all
> my CDs; a catalog of xeroxed/printed journal articles archive;
> etc.) Therefore, I'm looking CPAN modules to facilitate the process
> of creating, querying, updating, and maintaining *persistent* tables
> of Perl objects.
> 
> The applications I have in mind have pretty light requirements.
> The tables may be relationally linked, so their management should
> preserve the integrity of the relational schema.  But, they will
> interact with a single user at a time; security is not a big issue;
> nor is transaction management; performance demands are light, since
> no table would be bigger than a few hundred records.
> 
 ...


Check out the DBI module with DBD::CSV.  It gives you SQL on a 
collection of comma-separated-value files, in which each file is a table 
of a "database".  Slow, but it works fine on small sets of data, and is 
ultra simple to set up and use.  I'm not sure, but it may be part of the 
standard distribution these days.  DBD::RAM is another possibility.


> kj

-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl



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

Date: 4 Feb 2004 04:15:22 GMT
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Subject: Re: ithreads at runtime?
Message-Id: <bvprkq$rn4$1@canopus.cc.umanitoba.ca>

In article <bvnnf9$dcm$4@wisteria.csv.warwick.ac.uk>,
Ben Morrow  <usenet@morrow.me.uk> wrote:

:roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) wrote:
:> I wonder if someone could give me some hints how to enable
:> ithread support conditionally at run-time ?

:or, if you'd rather:

:use if not grep($_ eq '-nothreads', @ARGV), 'threads';

Thanks, I ended up using something akin to that, and now have
a single program that enables or disables thread support at runtime.

It ended up being a lot cleaner than I expected -- when I was written
the program first several weeks ago, the code for supporting or
not supporting threads at need looked like it was going to be excessively
messy.

The bit you reminded me of, of share() and lock() being no-ops
unless  use threads  is in effect, helps a fair bit.


Another part that helped a fair bit was using share() as a call
instead of using the  my $var : shared  syntax that doesn't work at all
when threading is not enabled. Using share() as a call also allowed
me to get around some issues that 'my' variables are local to the
block, so you can't define them conditionally -- e.g., you can't have

  if ( $Config{useithreads} ) {
     my $sharedvar : shared;
  } else {
     my $sharedvar;
  }

because the variable would go out of scope after the 'if'. But this works:

  my $sharedvar;
  share $sharedvar if $Config{useithreads};
-- 
   Scintillate, scintillate, globule vivific 
   Fain would I fathom thy nature specific. 
   Loftily poised on ether capacious 
   Strongly resembling a gem carbonaceous.   -- Anon


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

Date: Tue, 03 Feb 2004 19:19:23 -0700
From: Bill <wherrera@lynxview.com>
Subject: Re: network card
Message-Id: <H5mdnUt_Z4g1y73d4p2dnA@adelphia.com>

Xaver Biton wrote:
>>> but by make it give me an error:
>>> Makefile:299 *** multiple target patterns. Stop.
>>>
>>> what is that?
>>
>>
>>
>> Are you using cygwin make? For AS Perl you probably need M$ nmake
>> (free download from M$), unless you mess with the configuration.
> 
> 
> ok, now, I've compiled it sucsessful with nmake, but I've alway the same 
> error as it was istalled manually. when I run the script example.pl I 
> recieve the error message:
> 
> Win32::RASE::TAPIlineGetTranslateCaps() called too early to check 
> prototype at c:/Perl/site/lib/Win32/RASE.pm line 266.
> No one RAS entry were found
> BEGIN failed--compilation aborted at examples.pl line 500.

Yes, there is a prototypo :) in this one, probably older perl version.
try this--it works here:

#!/usr/bin/perl

# FIRST edit line 3031 of RASE.pm to remove the () to kill the error
# with current perl compiler.

use strict;
use warnings;
use Win32::RASE qw 'RasCreateEntry';

my %properties = (
	name => 'Mydialer',
	LocalPhoneNumber => '555-1212',
	AreaCode => '800',
	NetProtocols => ['Ip'],
	FramingProtocol => 'PPP',
	DeviceName => 'Standard 28800 bps Modem'
	);
	
my $props = \%properties;
RasCreateEntry( $props ) or die "Could not make the entry work: $!";



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

Date: Thu, 05 Feb 2004 13:41:06 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Perl For Amateur Computer Programmers
Message-Id: <m5c420l6525u44dg4c5t7a82d9efdiisa2@4ax.com>

On Tue, 03 Feb 2004 15:43:47 +1100, Iain Chalmers
<bigiain@mightymedia.com.au> wrote:

>mention, it has documentation containing things like this:
          ^^

[Perl, that is]

>>perldoc -f sprintf
>
>       sprintf FORMAT, LIST
>               Returns a string formatted by the usual `printf'
>               conventions of the C library function `sprintf'.
>               See sprintf(3) or printf(3) on your system for an
>               explanation of the general principles.
[snip]
>Which is fine if you once knew enough c to be able to work out what you 
>get there, but like you've identified, its not in the useful for "people 
>around the world who are not professional computer programmers could use 
>with the same ease as Basic" category...

I disagree, for one. I am not a professional computer programmer. I've
been programming in C/C++, as an amateur. But that was over 10 year
ago and I hardly remember anything about it!

When I started programming in Perl I didn't knew anything about
printf() formats any more. Now I'm still definitely at a pre-expertise
level in Perl, but when I first *needed* to use sprintf() I checked
the documentation and had no problem finding the relevant pieces of
info.

So either I have a higher intelligence, which is not the case, I
assure you! or your claim is plainly unsupported by facts.

>(note, the perldoc -f sprintf doco actually does go on a lot more than 
>just the bit I quoted up there, but I think my arguement holds - in that 

Should you have carefully checked the "lot more" you could have
verified yourself that you think it wrong!

>I suspect a complete programming beginner is going to be completely 
>mystified by everything it provides, its clearly written for a 
>non-newbie audience. Perhaps intentionally - maybe the doco 

Under this point of view, you *may* be partially right, in the sense
that for the very newbie a simple print() should suffice in most
cases, whereas printf() and sprintf() are somewhat more advanced
functions.

But honestly I can't understand which parts of that page are not well
suited, in your opinion, to a beginner.

>writers/maintainers aren't intending to write beginners programming 
>doco, but _programmers_ programming doco...)

For what is my experience, parts of the documentation dealing with
general/basic topics are well suited *both* for beginners and
experienced programmers. Parts of the documentation dealing with more
advanced topics are naturally biased towards a more experienced
audience. It doesn't seem so strange to me, after all...


Michele
-- 
#!/usr/bin/perl -lp
BEGIN{*ARGV=do{open $_,q,<,,\$/;$_}}s z^z seek DATA,11,$[;($,
=ucfirst<DATA>)=~s x .*x q^~ZEX69l^^q,^2$;][@,xe.$, zex,s e1e
q 1~BEER XX1^q~4761rA67thb ~eex ,s aba m,P..,,substr$&,$.,age
__END__


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

Date: Wed, 4 Feb 2004 13:47:49 +0100
From: gpohl@email.com (Gerd Pohlmann)
Subject: RegExp for matching word "karl@aol.com" or word "paul@hotmail.com" ?
Message-Id: <bvqplj$er1$02$1@news.t-online.com>

Just a stupid question from a newbie: 
How do I setup a reg exp which matches if the text (line) contains
either the full word "karl@aol.com" or the full word "paul@hotmail.com" (without quotes)?

(karl@aol.com|paul@hotmail.com)

does not work.

Gerd



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

Date: Wed, 4 Feb 2004 07:19:12 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: RegExp for matching word "karl@aol.com" or word "paul@hotmail.com" ?
Message-Id: <slrnc21sag.ipv.tadmc@magna.augustmail.com>

Gerd Pohlmann <gpohl@email.com> wrote:


> (karl@aol.com|paul@hotmail.com)
> 
> does not work.


Of course not, it is not Perl code.

Did you mean to ask a question about Perl code?

If so, then show us the Perl code that your question is about...


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: Wed, 04 Feb 2004 14:03:05 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: RegExp for matching word "karl@aol.com" or word "paul@hotmail.com" ?
Message-Id: <bvqqfc$v2eoi$1@ID-184292.news.uni-berlin.de>

Gerd Pohlmann wrote:
> Just a stupid question from a newbie:
> How do I setup a reg exp which matches if the text (line) contains 
> either the full word "karl@aol.com" or the full word
> "paul@hotmail.com" (without quotes)?
> 
> (karl@aol.com|paul@hotmail.com)
> 
> does not work.

Does not work?

Please post a small but complete program, where you have included "use
strict;" and "use warnings;" at the top, and that illustrates your
problem. Let us know which error or warning messages you get (if any),
and try to avoid just saying "does not work".

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl



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

Date: Wed, 04 Feb 2004 07:54:03 GMT
From: "snoopy" <askjinu@earthlink.net>
Subject: Site Visitor's eMail Address
Message-Id: <vy1Ub.12526$uM2.525@newsread1.news.pas.earthlink.net>

I teach Mathematics using Internet to secondary school students.  I have
many students to whom I send emails on Monday, Wednesday, and Friday.

Each email I send to my students have a link to the problem sets for that
day, and when my students receive that email, they are supposed to click on
the link, and do the problems.

Now I have many students, and need to follow up who is visiting the site and
doing the problems.  At this point, I see how many visitors incur for each
site through Log file, but there is no way for me to know which students are
visiting the site and which students are not doing the problems at all.

Would it be possible for me to get email addresses of those who click on the
link in the email I send them??  Can anybody help me realize this using
Perl??

Any help will be deeply appreciated.

Thanks.




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

Date: Wed, 04 Feb 2004 09:09:31 +0100
From: Josef =?iso-8859-1?Q?M=F6llers?= <josef.moellers@fujitsu-siemens.com>
Subject: Re: Site Visitor's eMail Address
Message-Id: <4020A8BB.27633DB5@fujitsu-siemens.com>

snoopy wrote:
> =

> I teach Mathematics using Internet to secondary school students.  I hav=
e
> many students to whom I send emails on Monday, Wednesday, and Friday.
> =

> Each email I send to my students have a link to the problem sets for th=
at
> day, and when my students receive that email, they are supposed to clic=
k on
> the link, and do the problems.
> =

> Now I have many students, and need to follow up who is visiting the sit=
e and
> doing the problems.  At this point, I see how many visitors incur for e=
ach
> site through Log file, but there is no way for me to know which student=
s are
> visiting the site and which students are not doing the problems at all.=

> =

> Would it be possible for me to get email addresses of those who click o=
n the
> link in the email I send them??  Can anybody help me realize this using=

> Perl??
> =

> Any help will be deeply appreciated.

I doubt that there is a means to get the email address of the student
without the student actually entering it.

Have you considered using some generated email message to each student
with a personalized link?
E.g. either each student gets a different link where all links point to
the very same file. You can then collect the necessary information from
your web server's log.
Another possibility would be to send a link to a cgi script with some
parameter (email address) that you log when the script is called. The
script would then send the problem.

My 2cts,

Josef
-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
	If failure had no penalty success would not be a prize
						-- T.  Pratchett


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

Date: Wed, 04 Feb 2004 10:35:46 +0100
From: Tore Aursand <tore@aursand.no>
Subject: Re: Site Visitor's eMail Address
Message-Id: <pan.2004.02.04.09.20.45.53525@aursand.no>

On Wed, 04 Feb 2004 07:54:03 +0000, snoopy wrote:
> Would it be possible for me to get email addresses of those who click on
> the link in the email I send them?

Yes.  What have you tried so far?  What didn't work?


-- 
Tore Aursand <tore@aursand.no>
"Omit needless words. Vigorous writing is concise. A sentence should
 contain no unnecessary words, a paragraph no unnecessary sentences,
 for the same reason that a drawing should have no unnecessary lines
 and a machine no unnecessary parts." -- William Strunk Jr.


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

Date: 4 Feb 2004 04:20:30 -0800
From: ineverlookatthis@yahoo.com (Steve)
Subject: Re: Site Visitor's eMail Address
Message-Id: <f0d57f86.0402040420.419b7d92@posting.google.com>

"snoopy" <askjinu@earthlink.net> wrote in message news:<vy1Ub.12526$uM2.525@newsread1.news.pas.earthlink.net>...
> 
> 
> Would it be possible for me to get email addresses of those who click on the
> link in the email I send them??  Can anybody help me realize this using
> Perl??
> 

You could send a link like this 

http://www.mysite.com/stuff/grab.pl?name=johnsmith

to john smith and when he clicks on the link the parameter name =
johnsmith will be available to your script which could record the
event somewhere and then fire-up the page you want.

You could make it less transparent by using a hard to guess code
rather than the raw name eg an MD-5 digest.

Still fails if student 1 emails the link to student 2 !

HTH 



Steve


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

Date: Wed, 04 Feb 2004 12:42:10 GMT
From: Dang Griffith <noemail@noemail4u.com>
Subject: Re: Site Visitor's eMail Address
Message-Id: <eabf84de54a5aa843a7a72db2c59babc@news.teranews.com>

On Wed, 04 Feb 2004 07:54:03 GMT, "snoopy" <askjinu@earthlink.net>
wrote:

>I teach Mathematics using Internet to secondary school students.  I have
>many students to whom I send emails on Monday, Wednesday, and Friday.
>
>Each email I send to my students have a link to the problem sets for that
>day, and when my students receive that email, they are supposed to click on
>the link, and do the problems.
>
>Now I have many students, and need to follow up who is visiting the site and
>doing the problems.  At this point, I see how many visitors incur for each
>site through Log file, but there is no way for me to know which students are
>visiting the site and which students are not doing the problems at all.
>
>Would it be possible for me to get email addresses of those who click on the
>link in the email I send them??  Can anybody help me realize this using
>Perl??
I *hope* there is no way.  Consider the potential abuse.  (Someone
please scare me (gently) with the truth if I'm wrong.)

Create a login screen and student accounts.  Each student will need to
log in first, at which time you will know who is doing their homework.

Josef's idea of a unique link for each student is also a good one, but
it might require regular maintenance.

    --dang


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

Date: Wed, 4 Feb 2004 07:40:56 -0000
From: "Chris Plumber" <no-spam@no-spam.org>
Subject: Very basic RPC::XML - passing arguments
Message-Id: <gm1Ub.175$Wc5.19413@newsfep2-gui.server.ntli.net>

I cant get RPC::XML to pass arguments to the invoked function on the server.
Can anyone tell me what I am doing wrong?

------- server.pl --------

use RPC::XML::Server;
my $srv = new RPC::XML::Server (host => 'localhost', port => 9000);
$srv->add_method( "local.test1.xpl" );
$srv->server_loop;

------- local.test1.xpl -------

<?xml version="1.0"?>
<!DOCTYPE methoddef SYSTEM "rpc-method.dtd">
<methoddef>
<name>local.test1</name>
<version>1.1</version>
<signature>string</signature>
<code language="perl">
<![CDATA[
#!/usr/bin/perl
sub test1
{
        return uc( $_[0] );
}
__END__
]]></code>
</methoddef>

------ client.pl --------

use Data::Dumper;
require RPC::XML;
require RPC::XML::Client;
$cli = RPC::XML::Client->new('http://localhost:9000/RPCSERV');
$resp = $cli->send_request( "local.test1", "Hello world" );
print Dumper( $resp );

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

When I run this lot, I get the following from the client...

$VAR1 = bless( {
                 'faultString' => bless( do{\(my $o = 'method local.test1
nas no matching signature for the argument list')}, 'RPC::XML::string' ),
                 'faultCode' => bless( do{\(my $o = '301')},
'RPC::XML::int' )
               }, 'RPC::XML::fault' );




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

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.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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


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