[16521] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 3933 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 7 06:10:30 2000

Date: Mon, 7 Aug 2000 03:10:19 -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: <965643019-v9-i3933@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 7 Aug 2000     Volume: 9 Number: 3933

Today's topics:
    Re: killing process <jrl@ast.cam.ac.uk>
    Re: killing process <haggi@tappe.net>
    Re: Need help fixing a PerlShop problem <gellyfish@gellyfish.com>
    Re: Newbie needs help <debjit@oyeindia.com>
    Re: OT: find the number of characters in a string (Tim Hammerquist)
        perlscript has problems with sendmail johands@hotmail.com
        pipe STDERR <haggi@tappe.net>
    Re: pipe STDERR (Rafael Garcia-Suarez)
    Re: pipe STDERR <haggi@tappe.net>
    Re: pipe STDERR nobull@mail.com
    Re: Problem using DBI <barbr-en@online.no>
        Proper use of FTP (was Re: Editing.cfg file for use wit <gellyfish@gellyfish.com>
        Reap ? derek_chen@my-deja.com
    Re: Reap ? (Tim Hammerquist)
        Reg Expression Question tony_123@my-deja.com
    Re: Regexp problem - Stripping HTML <ian.stuart@ed.ac.uk>
        Retrieving data from dynamically created page paul5544@my-deja.com
        Send $Form{$Fields} from Linux to NT .....HOW ??? hugo.b@derivs.com
        sending javascript value to CGI <jimjamjoh@softhome.net>
    Re: sending javascript value to CGI <daverwin@hotmail.com>
    Re: sending javascript value to CGI <mphipps@brisbanebuslines.com.au>
    Re: sending javascript value to CGI <jimjamjoh@softhome.net>
    Re: sending javascript value to CGI <jimjamjoh@softhome.net>
    Re: Simple reg expression question <kennylim@techie.net>
        totally newbie to perl, I ... <seb@nospam.be>
    Re: Whats wrong with this???? <ian.stuart@ed.ac.uk>
    Re: Why won't $ua->credentials($URL,$realm,$uname,$pwor <gellyfish@gellyfish.com>
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Mon, 07 Aug 2000 09:01:30 +0100
From: Jim Lewis <jrl@ast.cam.ac.uk>
Subject: Re: killing process
Message-Id: <398E6CDA.D58A84D8@ast.cam.ac.uk>

"haggi@work" wrote:

> I tried this with several signals. I can catch the
> signal and try to exit, but there is still my render process which I started with
> "open" running in the background.
>
> maybe it is WindowsNT.
>
> haggi
>
> Ilja Tabachnik wrote:
> >
> > haggi@work wrote:
> > >
> > > Hi,
> > >
> > > I try to kill a process with perl command kill.
> > >
> > > I start a childprocess which starts a rendering program, while the
> > > parent process is waiting for new commands.
> > >
> > > The rendering programm is started with a pipe:
> > >
> > >
> > >
> > >    open (RENDER, $rcmd| )
> > >
> > > no problem the renderincommand starts. But if I kill the childprocess,
> > > the rendering programm is still running.
> > >
> >
> > If I understand right, you kill() the child process,
> > but the parent remains running.
> > This behavior is OK (and was discussed today in some
> > other thread here).
> >
> > BTW, you may install a signal handler for the parent process
> > (via $SIG{CHLD}) to catch the child's death and terminate himself.
> >
> > Hope this help.
> > Ilja.
>
> --
>
> ---------------------------------------------------------
>
>         haggi
>         www.haggi.de
>         haggi@haggi.de
>
>         haggi`s visual effects & animation
>
> ---------------------------------------------------------

Hi,

The open statement returns a PID.  Use that to kill the rendering program in the
$SIG{CHLD} callback routine.

Jim Lewis



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

Date: Mon, 07 Aug 2000 10:21:49 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: Re: killing process
Message-Id: <398E719D.47E450C0@tappe.net>


yes I tried this, but it doesent work. I think it has something to do
how the renderer is started. I can kill the process with a winnt kill command
and the 'system()' function.
Not the best way I know but it works.

haggi

> 
> Hi,
> 
> The open statement returns a PID.  Use that to kill the rendering program in the
> $SIG{CHLD} callback routine.
> 
> Jim Lewis

-- 

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

	haggi
	www.haggi.de
	haggi@haggi.de

	haggi`s visual effects & animation

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


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

Date: 6 Aug 2000 17:37:57 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Need help fixing a PerlShop problem
Message-Id: <8mk495$4ub$1@orpheus.gellyfish.com>

On Sun, 06 Aug 2000 13:31:02 GMT Colin Keith wrote:
>
> It opens files for reading without < and commits no end of CGI sins.
> 

Not using '<' is not in itself bad unless the filename is being supplied
from untrusted user input.

/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Mon, 7 Aug 2000 10:33:50 +0530
From: "Debjit" <debjit@oyeindia.com>
Subject: Re: Newbie needs help
Message-Id: <8mmkpq$dh5$1@news.vsnl.net.in>

download the window version of apache webserver(www.apache.org) and a
windows version of perl(eg. www.activestate.com) and use dos edit to write
cgi it will allow .cgi extention






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

Date: Mon, 07 Aug 2000 09:22:09 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: OT: find the number of characters in a string
Message-Id: <slrn8ot0gs.k5.tim@degree.ath.cx>

Godzilla! wrote:
> > True, my example would wipe out the letters.
>  
> > > $letters = $string =~ tr/a-zA-Z/a-zA-Z/;
>  
> > is correct;
>  
> pfffttt... you gave a correct answer via
> paying attention to what you read. Those
> who don't pay attention while reading, this
> really REALLY annoys an English teacher.

Maybe some self-important English teachers, but not all English teachers.
That's from personal experience.

Besides...he gets an A for effort, and nevermind he was wrong?  I thought
that would have been particularly offensive to a teacher...

I think the greatest achievement in this thread was his ability to admit
he was wrong and correct himself without bringing anyone down with him.
Everyone's allowed to make mistakes; its how someone deals with his own
mistakes that shows his character.

</Rant>

-- 
-Tim Hammerquist <timmy@cpan.org>
Most people are other people. Their thoughts are someone else's
opinions, their lives a mimicry, their passions a quotation.
	-- Oscar Wilde


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

Date: Mon, 07 Aug 2000 08:06:23 GMT
From: johands@hotmail.com
Subject: perlscript has problems with sendmail
Message-Id: <8mlqlt$jk9$1@nnrp1.deja.com>

hello,

 i have a problem with sendmail (it's located at /usr/sbin/sendmail of
my account at www.virtualave.net)
 I try to execute the following script (with chmod to 755), but it
doesn't work, nothing is send to the
 email-addresses and nothing, even the error-message of my dienice
subroutine, is showed in my browser
 The only showed in my browser is HTTP 500 - internal servererror. (I
have already executed other scripts on
 this server
 (www.virtualave.net, and they worked , even scripts with the commando
system !!!)

 My question: is there something wrong with my script (maybe To:, From,
 ... are wrong) or is the server
 causing problems and do i need to contact the webmaster of the server
?.

 nice greetings,
 thanks,

 johan

 #!/usr/bin/perl
 #
 #
 print"Content-type:text/html\n\n";
 print"<HTML><HEAD><TITLE>send something</TITLE></HEAD>";
print"<BODY>\n";
 print"hello";
 $mailprog = '/usr/sbin/sendmail';
 open (MAIL, "|$mailprog -t") or dienice("Cannot open $mailprog\n");
#print MAIL
 'Reply-to:mailjohan@yahoo.com\n';
 #print MAIL 'From: mailjohan@yahoo.com\n';
 #print MAIL 'To: johands@hotmail.com\n';
 #print MAIL 'Subject: We would like to invite you\n\n';
 #print MAIL '---------------------------------------------------\n';
#print MAIL 'test\n';
 #print MAIL 'test\n';
 #print MAIL '-----------------------------------------------------\n';
close(MAIL);
 print"</BODY>\n";
 print"</HTML>";

 sub dienice {
 my($errmsg) = @_;
 print "$errmsg\n";
 print"</BODY></HTML>\n";
 exit;
 }




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 07 Aug 2000 09:27:55 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: pipe STDERR
Message-Id: <398E64FB.29662277@tappe.net>


hi,

I execute a command this way

  open (RENDER,"$rcmd|") or die "Cannot start render command: $!\n";


then I analyze the output of the program, but is there a way to catch the
standard error too?

haggi

-- 

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

	haggi
	www.haggi.de
	haggi@haggi.de

	haggi`s visual effects & animation

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


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

Date: Mon, 07 Aug 2000 07:47:47 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: pipe STDERR
Message-Id: <slrn8osqmt.fjb.rgarciasuarez@rafael.kazibao.net>

haggi@work wrote in comp.lang.perl.misc:
>
>hi,
>
>I execute a command this way
>
>  open (RENDER,"$rcmd|") or die "Cannot start render command: $!\n";
>
>then I analyze the output of the program, but is there a way to catch the
>standard error too?

Use the shell syntax to redirect the standard error of $rmcd to its
standard output:
  open RENDER, "$rcmd 2>&1 |" or die "Cannot start render command: $!\n";
(see the perlopentut and perlipc manpages).

-- 
Rafael Garcia-Suarez


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

Date: Mon, 07 Aug 2000 10:22:08 +0200
From: "haggi@work" <haggi@tappe.net>
Subject: Re: pipe STDERR
Message-Id: <398E71B0.8C87DE9B@tappe.net>


Thanks 
exactly what I need.

haggi

Rafael Garcia-Suarez wrote:
> 
> haggi@work wrote in comp.lang.perl.misc:
> >
> >hi,
> >
> >I execute a command this way
> >
> >  open (RENDER,"$rcmd|") or die "Cannot start render command: $!\n";
> >
> >then I analyze the output of the program, but is there a way to catch the
> >standard error too?
> 
> Use the shell syntax to redirect the standard error of $rmcd to its
> standard output:
>   open RENDER, "$rcmd 2>&1 |" or die "Cannot start render command: $!\n";
> (see the perlopentut and perlipc manpages).
> 
> --
> Rafael Garcia-Suarez

-- 

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

	haggi
	www.haggi.de
	haggi@haggi.de

	haggi`s visual effects & animation

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


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

Date: 07 Aug 2000 09:44:21 +0100
From: nobull@mail.com
Subject: Re: pipe STDERR
Message-Id: <u9em41v4t6.fsf@wcl-l.bham.ac.uk>

"haggi@work" <haggi@tappe.net> writes:

> then I analyze the output of the program, but is there a way to catch the
> standard error too?

Please see the answer given to this question in the FAQ.

perldoc -q STDERR

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Mon, 7 Aug 2000 10:22:56 +0200
From: "Kåre Olai Lindbach" <barbr-en@online.no>
Subject: Re: Problem using DBI
Message-Id: <zkuj5.2793$aK5.44709@news1.online.no>


Á¶°æÇö <mckyung@hananet.net> skrev i
meldingsnyheter:SSsh5.3$M94.326@news.hananet.net...
> Hi...
>
>  I'm using Windows2000 professional and trying to make a board using perl
> and ODBC. i downloaded DBI and DBD-ODBC modules and installed them.
>
>  after i used a code to test it..
>
>  test-odbc.pl
> ==============
> #!/perl
>
> use DBI ;
> print "Content-type: text/html\n\n" ;
>
> end ;
> =============
>
> error message is
> =============
> Can't load 'E:/Perl/site/lib/auto/DBI/DBI.dll' for module DBI:
> load_file:ÁöÁ¤µÈ ¸ðµâÀ» ãÀ» ¼ö ¾ø½À´Ï´Ù at E:/Perl/lib/DynaLoader.pm line
> 200.
>  at E:/Perl/site/lib/DBI.pm line 158
> BEGIN failed--compilation aborted at E:/Perl/site/lib/DBI.pm line 158.
> Compilation failed in require at E:\Inetpub\cgis\test-odbc.pl line 6.
> BEGIN failed--compilation aborted at E:\Inetpub\cgis\test-odbc.pl line 6.
> ============
> i really need to make this board in hurry...
>
> bye.. :-)
>
>

How did you install the modules? It *seems like* your installation hasn't
put *the extra files it needs* in the right catalogs.
When I install DBI, using PPM, I get a file '.packlist' in the
'site\lib\auto\DBI'-catalog telling me that these files are installed:

D:\Perl615\bin\dbiproxy
D:\Perl615\bin\dbiproxy.bat
D:\Perl615\bin\dbish
D:\Perl615\bin\dbish.bat
D:\Perl615\site\lib\Bundle\DBI.pm
D:\Perl615\site\lib\DBD\ADO.pm
D:\Perl615\site\lib\DBD\ExampleP.pm
D:\Perl615\site\lib\DBD\NullP.pm
D:\Perl615\site\lib\DBD\Proxy.pm
D:\Perl615\site\lib\DBD\Sponge.pm
D:\Perl615\site\lib\DBI.pm
D:\Perl615\site\lib\DBI\DBD.pm
D:\Perl615\site\lib\DBI\FAQ.pm
D:\Perl615\site\lib\DBI\Format.pm
D:\Perl615\site\lib\DBI\ProxyServer.pm
D:\Perl615\site\lib\DBI\Shell.pm
D:\Perl615\site\lib\DBI\W32ODBC.pm
D:\Perl615\site\lib\Win32\DBIODBC.pm
D:\Perl615\site\lib\auto\DBI\DBI.bs
D:\Perl615\site\lib\auto\DBI\DBI.dll
D:\Perl615\site\lib\auto\DBI\DBI.exp
D:\Perl615\site\lib\auto\DBI\DBI.lib
D:\Perl615\site\lib\auto\DBI\DBIXS.h
D:\Perl615\site\lib\auto\DBI\Driver.xst
D:\Perl615\site\lib\auto\DBI\dbd_xsh.h
D:\Perl615\site\lib\auto\DBI\dbi_sql.h

If you unpack your tar.gz-file, using ex. WinZip, you might put them there
manually. Not all files are required, but it makes a complete installation.


--

Regards/mvh
Kåre Olai Lindbach
(LLP - 955626397 MVA)
+ 47 61282501(home/job)
+ 47 95282501(mobil/cellular)
+ 47 61282502(fax)
barbr-en@online.no
# HAR KASTET PERL'ER som ikke FOR-SVINner siden ' 94.






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

Date: 6 Aug 2000 17:29:18 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Proper use of FTP (was Re: Editing.cfg file for use with anti-leech Perl script...)
Message-Id: <8mk3ou$38j$1@orpheus.gellyfish.com>

On Sat, 05 Aug 2000 23:59:40 GMT Cyber Thief wrote:
> 
> I've got a script that uses the "HTTP REFERER" to verify that user's
> who download files from my site are actually at the site, and not some
> stolen link.  

A total non-starter in the face of :


#!/usr/bin/perl -w

use strict;

use LWP::UserAgent;

my $agent = new LWP::UserAgent;


$agent->agent("Gelzilla/666"); 

my $request = new HTTP::Request 'GET' => 'http://localhost';

$request->header( Referer => 'http://internettrash.com/users/cyberthief/');


my $result = $agent->request($request);



if ($result->is_success) 
  {
   print $result->content;
  } 
else 
 {
   print "Error: " . $result->status_line . "\n";
 }


>            The script relies on a .cfg file to know which URLS are
> permitted to access my files. In setting up this file, I was required
> to put in the URL like this:

> http:\/\/internettrash.com\/users\/cyberthief\/ 
> end

> Two lines, right? So, I make this file on Notepad and upload it to
> the CGI-BIN only to find all the info is bunched up together on one
> line. 

Transfer the file in ascii mode.

/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

Date: Mon, 07 Aug 2000 07:48:56 GMT
From: derek_chen@my-deja.com
Subject: Reap ?
Message-Id: <8mlpl8$isc$1@nnrp1.deja.com>

sub REAP {
    1 until (-1 == waitpid(-1, WNOHANG));
    $SIG{CHLD} = \&REAP;
}
$SIG{CHLD} = \&REAP;

This is the example to demonstrate how to avoid the zombie process
occur.But I'm wondering when does the sub REAP execute?And why are there
two $SIG{CHLD} = \&REAP .I tried to comment the first in the subroutine
and it worked as normal.why?The last question is ,I really can't
understand why the zombie won't occur with these codes.Thanks for help.

Derek


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 07 Aug 2000 09:43:27 GMT
From: tim@degree.ath.cx (Tim Hammerquist)
Subject: Re: Reap ?
Message-Id: <slrn8ot1or.k5.tim@degree.ath.cx>

derek_chen@my-deja.com wrote:
> sub REAP {
>     1 until (-1 == waitpid(-1, WNOHANG));
>     $SIG{CHLD} = \&REAP;
> }
> $SIG{CHLD} = \&REAP;
> 
> This is the example to demonstrate how to avoid the zombie process
> occur.But I'm wondering when does the sub REAP execute?And why are there
> two $SIG{CHLD} = \&REAP .I tried to comment the first in the subroutine
> and it worked as normal.why?The last question is ,I really can't
> understand why the zombie won't occur with these codes.Thanks for help.
> 
> Derek

REAP() executes when the program receives a CHLD signal.  Some signal
handlers need to reinstall themselves each time they are called; CHLD is
one of those.  See perlipc for more info.

-- 
-Tim Hammerquist <timmy@cpan.org>

To invent, you need a good imagination and a pile of junk.
	-- Thomas Edison


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

Date: Mon, 07 Aug 2000 09:18:37 GMT
From: tony_123@my-deja.com
Subject: Reg Expression Question
Message-Id: <8mluta$m9c$1@nnrp1.deja.com>

Hello

I have been pulling out my hair on the following problem.  I have
had a look at the cookbook examples and also in the perlfaq.  What I
have is
a string like

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[grover]=?iso-2022-jp?B?EndodedMessage1?=
        =?iso-2022-jp?B?EncodedMessage2=?=           (0)

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What I want to do is to rip out the parts

?iso-2022-jp?B?EndodedMessage1?=               (1)
=?iso-2022-jp?B?EncodedMessage2?=               (2)

and then from these rip out

EncodedMessage1             (3)
EncodedMessage2             (4)

Then, I will decode (3) and (4) to produce

DecodedMessage1             (5)
DecodedMessage2             (6)

I then want the replace the occurances of (1) and (2) in (0) with (5)
and (6).

Could someone please give me a few hints on how to do this.

Cheers

Tony


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 07 Aug 2000 09:16:17 +0100
From: Ian Stuart <ian.stuart@ed.ac.uk>
To: mbutt@my-deja.com
Subject: Re: Regexp problem - Stripping HTML
Message-Id: <398E7051.61D3532E@ed.ac.uk>

Posted and mailed, as Eli says...

mbutt@my-deja.com wrote:
> 
> I am trying to construct a regular expression to strip certain HTML tags
> out of a string.
Off the top of my head....

$matching_code = $php;

# Find anything segment that starts with an "<", then has 0 or more
spaces
#    followed by the string $matching_code (case-insensitive), then any
number 
#    of characters that DO NOT include a ">", then a trailing ">".  This
should 
#    pick up the tag, irrispective of the number of attributes, or their
size
# We also need to remove the closing tag, plus any text in between
$html_file =~ s/<[
*]$matching_code[^>]*>[^<\/$matching_code>]*<\/$matching_code>//ig

I think.....

PS - ow! my brain hurts.. ;-)

-- 
           --==**==--
Ian Stuart - University computing services.
---------------------------------
Truth is what you believe it to be.
  I cannot force my facts on you, only make you believe my beliefs.
---------------------------------
http://lucas.ucs.ed.ac.uk/


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

Date: Mon, 07 Aug 2000 05:27:51 GMT
From: paul5544@my-deja.com
Subject: Retrieving data from dynamically created page
Message-Id: <8mlhcl$cit$1@nnrp1.deja.com>

I am creating a list read from a pipe delimited file. Here is the
section that creates the body of the table for each valid line it reads

(Open file stuff and header of html page here)
while (<EMAILFILE>)
{
$line = $_;
chop($line);
($currentemail, $currentuser_name, $status) = split (/\|/, $line);
if ($currentemail ne "")
{
 if ($currentemail eq "Do Not Remove This Line")
  {
  #Do Nothing, skip
  }
  else
  {
  print "<tr>\n";
  print "<td>\n";
  print "            <p><select name=\"delete\" size=\"1\">\n";
  print "                <option value=\"no\">No</option>\n";
  print "                <option value=\"yes\">Yes</option>\n";
  print "            </select>Delete This Entry?</p>\n";
  print "</td>\n";
  print "<td>\n";
  print "" . $currentemail . "\n";
  print "<input type=\"hidden\" name=\"emailrecord\" value=\"" .
$currentemail . "\">\n";
  print "</td>\n";
  print "<td>\n";
  print "" . $currentuser_name . "\n";
  print "<input type=\"hidden\" name=\"userrecord\" value=\"" .
$currentuser_name . "\">\n";
  print "<td>\n";
  print "            <p><select name=\"subscribe\" size=\"1\">\n";
   if ($status eq "unsubscribed")
     {
     print "                <option
value=\"subscribed\">Subscribed</option>\n";
     print "                <option selected
value=\"unsubscribed\">Unsubscribed</option>\n";
     }
    if ($status eq "subscribed")
     {
    print "                <option selected
value=\"subscribed\">Subscribed</option>\n";
    print "                <option
value=\"unsubscribed\">Unsubscribed</option>\n";
     }
    print "            </select></p>\n";
    print "</td>\n";
    print "</tr>\n";
     }
}
(Footer of html page, close file and error checking stuff here)

This works great. It builds the page perfectly.
However, now I am trying to update the file it read from when the user
changes something and clicks on the appropriate button.
I know how to get the values and assign them to a variable, the problem
I am having is that each entry built is assigned the same field names
so when I parse the form, the variables are getting overwritten by the
next set of values read from the page.
Can anyone help me take all the values created and seperate them
into unique variables so I can then write them to a temp file in pipe
delimited form?
I have spent all day on this cannot figure it out.
Here is what I have so far for the creating of the temp file

sub updatemail
{
# Create a random temporary file.
local ($currentemail, $currentuser_name, $status) = @_;
local ($dir, $line, $TempEmail);
srand(time|$$);
$random_number = int(rand(10000000));
$TempEmail = $email_directory . "emailfile" . $random_number . ".tmp";
open (TEMPFILE, ">>" . $TempEmail) || die ("File Error","Unable to open
temporary file.");
print TEMPFILE "Do Not Remove This Line\n";

# Need to figure out how to pass all of the info from the printed page
#to the new temp file.

close(TEMPFILE);
unlink($email_directory . "email_names.txt");
rename($TempEmail,$email_directory . "email_names.txt");
&create_main_form("<b>Your EMail List Has Been Updated!</b>");
exit;
}


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Mon, 07 Aug 2000 09:45:45 GMT
From: hugo.b@derivs.com
Subject: Send $Form{$Fields} from Linux to NT .....HOW ???
Message-Id: <8mm0g8$n7c$1@nnrp1.deja.com>

What Function could I call in my Perl Script to send $Form{$Fields}
from LINUX to a dll on a Windows NT PC ?????

Thanks

Hugo.b@derivs.com

Hugo


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Sun, 06 Aug 2000 23:33:34 -0500
From: Kris Gonzalez <jimjamjoh@softhome.net>
Subject: sending javascript value to CGI
Message-Id: <398E3C1D.502AC725@softhome.net>

Is there a way to submit a javascript value to a CGI and continue
running scripts on the page? Specifically, I've got a javascript timer
that starts when a page loads and keeps track of how long a user is on a
page.  What I would like ideally to occur is that the javascript lets
the server know each time one minute has elapsed while still keeping
time until the user exits.  However, I haven't seen anything that will
submit a javascript value and keep the page going with scripts still
running...have I missed something?

Also, is there a way to return a value being calculated in a javascript
function when the user exits the page by closing the browser?

Please cc all responses to me via eMail.  Thanks for any and all
assistance.

-kg



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

Date: Sun, 6 Aug 2000 23:52:26 -0700
From: "http://daverwin.homepage.com" <daverwin@hotmail.com>
Subject: Re: sending javascript value to CGI
Message-Id: <Egrj5.619$Xb.127532@nnrp2.sbc.net>


Kris Gonzalez wrote in message <398E3C1D.502AC725@softhome.net>...
>Is there a way to submit a javascript value to a CGI and continue
>running scripts on the page? Specifically, I've got a javascript timer
>that starts when a page loads and keeps track of how long a user is on a
>page.  What I would like ideally to occur is that the javascript lets
>the server know each time one minute has elapsed while still keeping
>time until the user exits.  However, I haven't seen anything that will
>submit a javascript value and keep the page going with scripts still
>running...have I missed something?
yes but i cannot put all the code here
no easey cross browser
maybe you missed the get method
a simple setTimeout will do
if just for IE use Iframe as target
for NN load a lyer with the results
of a submit with get method
>Also, is there a way to return a value being calculated in a javascript
>function when the user exits the page by closing the browser?
no when the browser is closed its closed
cant do anything else
>Please cc all responses to me via eMail.  Thanks for any and all
>assistance.
>
>-kg
>
>




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

Date: Mon, 7 Aug 2000 15:18:46 +1000
From: "Michael Phipps" <mphipps@brisbanebuslines.com.au>
Subject: Re: sending javascript value to CGI
Message-Id: <8mlh44$2q8$1@gnamma.connect.com.au>

> >Also, is there a way to return a value being calculated in a javascript
> >function when the user exits the page by closing the browser?
> no when the browser is closed its closed
> cant do anything else

What about that annoying onunload event that the porn sites use in the body
tag?

<body onunload="yourjavascrip">

I haven't tried it yet, but see how you go.


--
Michael Phipps
michael_phipps@hotmail.com
http://michaelphipps.tripod.com





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

Date: Mon, 07 Aug 2000 00:29:04 -0500
From: Kris Gonzalez <jimjamjoh@softhome.net>
Subject: Re: sending javascript value to CGI
Message-Id: <398E4920.3351431F@softhome.net>

"http://daverwin.homepage.com" wrote:

> if just for IE use Iframe as target
> for NN load a lyer with the results

Can the above be done without refreshing the layer/frame...that is,
imperceptibly to the surfer?

-kg



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

Date: Mon, 07 Aug 2000 00:42:47 -0500
From: Kris Gonzalez <jimjamjoh@softhome.net>
Subject: Re: sending javascript value to CGI
Message-Id: <398E4C57.D3AAC0BF@softhome.net>

> <body onunload="yourjavascrip">

thanks.

-kg



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

Date: Mon, 07 Aug 2000 05:26:18 GMT
From: "Kenny Lim" <kennylim@techie.net>
Subject: Re: Simple reg expression question
Message-Id: <_Lrj5.23818$0W4.563037@newsread2.prod.itd.earthlink.net>


Hi Rafael,

Thanks for the great pointers ! Your solution works just fine.

I am just wondering if it's possible that we choose to "either"
increment only the major or the minor point version.

ie.

ETThread226

Major = 2 (ie. increment to 3)

or

Minor = 26 (ie. increment to 27)


What I am trying to achieve is to provide the flexibily to upgrade the
version based
on the release type. (major or minor release)

You have a pleasant evening Rafael.

Kenny-



"Rafael Garcia-Suarez" <rgarciasuarez@free.fr> wrote in message
news:slrn8oiadh.3oh.rgarciasuarez@rafael.kazibao.net...
> Kenny Lim wrote in comp.lang.perl.misc:
> >
> >Hi All,
> >
> >Given the followng project name and version, how do I get the current
> >version and increment by one ? It would be nice to also keep track
> >of the number increment, ie. from 99 to 100 instead of going back to 0.
ie.
> >90.
> >
> >ETThread226
> >ETDB2UI52
>
> If I correcly understood your question:
>
> $project_name =~ s/(\d+)$/1+$1/e;
>
> See perlop, perlre.
>
> --
> Rafael Garcia-Suarez




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

Date: Mon, 7 Aug 2000 10:18:06 +0200
From: "seb" <seb@nospam.be>
Subject: totally newbie to perl, I ...
Message-Id: <8mlra9$4rs$1@buty.wanadoo.nl>

Hi there ;

totally newbie to perl, I would like 2 know what do I need to run my first
perl script
(you know, something like ' Hello World ! '  ;-)) )
under W 9x (is it possible ? ) or W 2k.

If there is no possibility for theses platforms, I also have a box running
FreeBSD (but I'm also a newbie there, that's why I would prefer Windows
info).

Any part of help would be MUCH more than greater appreciated ;

tia ;

e-SEB........................................................

www.e-seb.com








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

Date: Mon, 07 Aug 2000 09:00:16 +0100
From: Ian Stuart <ian.stuart@ed.ac.uk>
Subject: Re: Whats wrong with this????
Message-Id: <398E6C90.388D2351@ed.ac.uk>

psycho wrote:
> 
> im haveing a problem with this trying to print to a file, can
> anyone help?
Lets have a (novices) look....


> Code Below:
> 
> #!/usr/bin/perl -w
> 
> $zonedir = "Base dir/cgi-bin/cgimania/banner/";
I presume that 'base dir' is actually replaced by something else?

If not, then the open below will try to open 'Base', and ignore the
rest....

> print "content-type: text/html\n\n";
Aha - so output to a web page hun?....

> $lookfor = "6343914";
> 
> @put = ();
> 
> open(FILE,"$zonedir/test.txt");
> @stuff = <FILE>;
> close(FILE);
Should do: Grab everything from test.txt..

Try using:
open(FILE,"$zonedir/test.txt") || die "Cannot open file in $zonedir";

for error-checking.


> foreach $i (@stuff) {
> chomp($i);
> ($crap, $found) = split(/\|/,$i);
> if($crap eq "$lookfor"){
> push(@put, $i);
> }
> }
> 
> $get = $put[0];
> ($crap, $found) = split(/\|/,$get);
This seems overly complex.....

You seem to be looking for a key in a pipe-delimited text file; putting
the line into a 1-element array; and re-splitting it again, exactly as
you did during your test!

If you exit the foreach with a LAST jump, then $crap and $found will
keep the values you need.


> open(INF,"+<$zonedir/test.txt");
Again - add the error-checking......

-- 
           --==**==--
Ian Stuart - University computing services.
---------------------------------
Truth is what you believe it to be.
  I cannot force my facts on you, only make you believe my beliefs.
---------------------------------
http://lucas.ucs.ed.ac.uk/


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

Date: 7 Aug 2000 09:49:40 +0100
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Why won't $ua->credentials($URL,$realm,$uname,$pword) work on a web site?
Message-Id: <8mlt74$obd$1@orpheus.gellyfish.com>

On Thu, 03 Aug 2000 23:21:27 -0500 Dennis wrote:
> I'm trying to access a web site that requires a login username and password.
> 

The lwpcook manpage has an example.


/J\
-- 
yapc::Europe in assocation with the Institute Of Contemporary Arts
   <http://www.yapc.org/Europe/>   <http://www.ica.org.uk>


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

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


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