[25289] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7534 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Dec 19 03:05:40 2004

Date: Sun, 19 Dec 2004 00: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           Sun, 19 Dec 2004     Volume: 10 Number: 7534

Today's topics:
        /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/ <please@send.replies.to.ng>
    Re: /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/ <wyzelli@yahoo.com>
    Re: [PATTERN MATCHING] <jl_post@hotmail.com>
    Re: [Q] $ARGV, <>, and command-line Perl <abigail@abigail.nl>
        _Re: Some Programing Needed (Murray J)
    Re: Finding out if another copy of a CGI Perl scripts i <nobull@mail.com>
    Re: Finding out if another copy of a CGI Perl scripts i <amead@comcast.net>
    Re: Finding out if another copy of a CGI Perl scripts i <dlr93612@yahoo.com>
    Re: Finding out if another copy of a CGI Perl scripts i <amead@comcast.net>
    Re: Finding out if another copy of a CGI Perl scripts i <noreply@gunnar.cc>
    Re: Finding out if another copy of a CGI Perl scripts i <flavell@ph.gla.ac.uk>
    Re: Finding out if another copy of a CGI Perl scripts i <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
    Re: Finding out if another copy of a CGI Perl scripts i <dlr93612@yahoo.com>
    Re: Finding out if another copy of a CGI Perl scripts i <joe@inwap.com>
    Re: Finding out if another copy of a CGI Perl scripts i <1usa@llenroc.ude.invalid>
        Hep with Regular Expression <ebenze@hotmail.com>
    Re: Hep with Regular Expression <jkeen_via_google@yahoo.com>
    Re: MS Perl question -- how to use hacked script to wor <joe@inwap.com>
    Re: Page can not be displayed... <not@home.net>
    Re: Page can not be displayed... <wyzelli@yahoo.com>
    Re: Some Programing Needed <joe@inwap.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 19 Dec 2004 00:34:14 +0000 (UTC)
From: Mike <please@send.replies.to.ng>
Subject: /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/
Message-Id: <cq2ia6$1pu$1@reader2.panix.com>





I want a regexp that will match (as a "whole word") any of the
(non-empty) prefixes of the word "foobar", i.e. "f", "fo", "foo",
"foob", etc.  One way to do it is this:

  /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/ 

Yuk.  Is there a better way?

Mike



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

Date: Sun, 19 Dec 2004 01:53:56 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/
Message-Id: <Ua5xd.78292$K7.70403@news-server.bigpond.net.au>

"Mike" <please@send.replies.to.ng> wrote in message 
news:cq2ia6$1pu$1@reader2.panix.com...
:
: I want a regexp that will match (as a "whole word") any of the
: (non-empty) prefixes of the word "foobar", i.e. "f", "fo", "foo",
: "foob", etc.  One way to do it is this:
:
:  /\bf(?:o(?:o(?:b(?:a(?:r)?)?)?)?)?\b/
:
: Yuk.  Is there a better way?

It took me a while to understand exactly what you want here so apologies if 
I am wrong (not yet awake and had second coffee.. :))

Does this do what you want?

m/\b(f|fo|foo|foob|fooba|foobar)\b/

It would be fairly easy to build up the alternation string

$string = 'f|fo|foo|foob|fooba|foobar';

from any word this way and incorporate that into the regex.

so then

m/\b($string)\b/

would do the same job.

$string = substr $word,0,1;
$string = join '|', $string, substr $word,0,$_ for (2 .. length $word);

$match = $1 if $test =~ m/\b($string)\b/;

Seems to do what you want.

On a side note, I seem to not be able to replace the '$string' in the second 
expression with 'substr $word,0,1' for the first element of the list.  When 
I do, I only get the last element of the second part of the list 'foobar' 
and not all the others.  The same if I discard the first element and write 
the list generator as 'substr $word,0,$_ for (1 .. length $word);'  I expect 
this to give me a list which can be joined, but I only get the last element.

The fact it works in the case above, convinces me that it is returning a 
list like I expect, I just dont see why 'join' is only getting the last 
element of that list.

Maybe I should go have that coffee now

-- 
Wyzelli
*snore* 




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

Date: 18 Dec 2004 20:54:20 -0800
From: "jl_post@hotmail.com" <jl_post@hotmail.com>
Subject: Re: [PATTERN MATCHING]
Message-Id: <1103432060.182228.215810@c13g2000cwb.googlegroups.com>

Nicolas  Vautier wrote:
>
> Let's say that I have this:
>
> $line =~ s/$pattern/$replacement/;
>
> It should find every $pattern in $line and replace it by $replacement
> right?

No.  It will replace only the first occurrence of $pattern (if at
least one exists) with $replacement.  To replace every occurrence, use
the /g switch, like this:

$line =~ s/$pattern/$replacement/g;

> But since I have characters such as "|", """, "'", "!", "?" in my
> strings, it has a very strange behavior.
>
> Is there any way to specify perl NOT TO USE regular expressions in my
> example?

Yes.  Others posters have (correctly) said:

$line =~ s/\Q$pattern\E/$replacement/;

but you can also "backslash" the special characters (like "|", """,
"'", "!", "?") with the quotemeta() function.  This function will
return a new pattern that you can use that has all the special
characters escaped (so that they won't interfere with the regular
expression matching).  You use it like this:

my $escapedPattern = quotemeta($pattern);
$line =~ s/$escapedPattern/$replacement/g;

In other words, if you have the line:

print quotemeta("Again? (y/n)");

you'll see the output:

Again\?\ \(y\/n\)

meaning that if you use that output in a pattern match, the "?", "(",
and ")" characters won't affect how you match a pattern.

Note that, according to "perldoc -f quotemeta", the line:

my $escapedPattern = quotemeta($pattern);

is equivalent to:

my $escapedPattern = "\Q$pattern\E";

which makes the following regular expression substitutions equivalent:

my $escapedPattern = quotemeta($pattern);
$line =~ s/$escapedPattern/$replacement/g;

$line =~ s/\Q$pattern\E/$replacement/g;

Which method should you use?  In my opinion, you should use
whichever one you find more readable and easier to understand.  And of
course, that part depends on you.
I hope this helps, Nicolas.

   -- Jean-Luc



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

Date: 18 Dec 2004 23:12:41 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: [Q] $ARGV, <>, and command-line Perl
Message-Id: <slrncs9eb9.fj.abigail@alexandra.abigail.nl>

J Krugman (jkrugman345@yahbitoo.com) wrote on MMMMCXXV September MCMXCIII
in <URL:news:cpshgj$3ti$1@reader1.panix.com>:
;;  
;;  
;;  
;;  
;;  I've rtfm'd this to death, but I still don't get it.  If someone
;;  can explain it to me (as opposed to tell me something like "man
;;  perlfrotz"), I'd be very grateful.
;;  
;;  The immediate problem that serves as the context of the question
;;  is this: find all the files below /path/to/subdir (this is Linux)
;;  that contain either of the strings "foo bar baz" or "quux frobozz",
;;  and do this *from the command line* (i.e. I'm looking for a one-liner
;;  here, not a longwinded affair using File::Find, etc.).


    $ grep -l -r 'foo bar baz|quux frobozz' /path/to/subdir/


Abigail
-- 
   my $qr =  qr/^.+?(;).+?\1|;Just another Perl Hacker;|;.+$/;
      $qr =~  s/$qr//g;
print $qr, "\n";


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

Date: 18 Dec 2004 15:47:00 -0800
From: murrayscs@sasktel.net (Murray J)
Subject: _Re: Some Programing Needed
Message-Id: <71f844a7.0412181547.338563b0@posting.google.com>

Unable to retrieve message vdSdnYG3RaPuHVncRVn-tg@comcast.com?????????

Thanks Sinan & Scott.


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

Date: Sat, 18 Dec 2004 23:27:34 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <cq2e4c$f93$1@sun3.bham.ac.uk>

Lisa wrote:

> How would one go about finding out if another copy of a CGI Perl
> scripts is running?

Have it lock something.

> I want to set up a script to run as a cron job,

Huh?  I thought we were talking about CGI scripts, not cron scripts. 
Not of course that it makes any difference.

 > starting about once a
> minute, however, the first thing I want to do when the script starts is
> to check and see if the last incarnation is still (highly unlikly but
> could happen on very busy days) running and shut down if it is, so that
> there is only one version of the script proccessing data.

In that case, the data would seem the obvious thing to lock.



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

Date: Sat, 18 Dec 2004 17:43:57 -0600
From: Alan Mead <amead@comcast.net>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <pan.2004.12.18.23.43.56.205712@comcast.net>

Star date: Sat, 18 Dec 2004 15:00:23 -0800, Lisa's log:


> I want to set up a script to run as a cron job, starting about once a
> minute, however, the first thing I want to do when the script starts is
> to check and see if the last incarnation is still (highly unlikly but
> could happen on very busy days) running and shut down if it is, so that
> there is only one version of the script proccessing data.

First, if it runs from a cron job then it's just a script. CGI is a way
that scripts generate dynamic web pages.

There are probably several ways you can do this.  An obvious one would be
to make a "lock file"... if your script detects the lock file then either
(1) there is a copy running or (2) a copy died leaving a stale
lock.

I've never done this in Perl, but I bet you could grep the running
processes for your script name (e.g., 'my $rs = `ps -aux | grep
[m]yscript.pl`'). Of course, you'd have to ignore the currently running
version.


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

Date: 18 Dec 2004 15:45:03 -0800
From: "Lisa" <dlr93612@yahoo.com>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <1103413503.545709.214820@z14g2000cwz.googlegroups.com>

OK, but I do not want the second iteration to wait for a lock I want it
to recognize the existance of the previously running version still
being active and to exit gracefully.



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

Date: Sat, 18 Dec 2004 17:50:18 -0600
From: Alan Mead <amead@comcast.net>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <pan.2004.12.18.23.50.18.141551@comcast.net>

Star date: Sat, 18 Dec 2004 15:45:03 -0800, Lisa's log:

> OK, but I do not want the second iteration to wait for a lock I want it
> to recognize the existance of the previously running version still
> being active and to exit gracefully.

exit if ( -x $lockfile );

'-x' is from memory...



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

Date: Sun, 19 Dec 2004 00:50:13 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <32ju4nF3mu7loU1@individual.net>

Lisa wrote:
> OK, but I do not want the second iteration to wait for a lock I want it
> to recognize the existance of the previously running version still
> being active and to exit gracefully.

So don't have it wait, but have it exit if the file is locked.

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


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

Date: Sun, 19 Dec 2004 00:13:19 +0000
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <Pine.LNX.4.61.0412190009030.21691@ppepc56.ph.gla.ac.uk>

On Sat, 18 Dec 2004, Alan Mead wrote:

> First, if it runs from a cron job then it's just a script.

agreed

> CGI is a way that scripts generate dynamic web pages.

CGI is a software interface between a web server and a script.

What you do with it beyond that is... well, limited only by the 
designer's imagination...

I don't know about you, but to me the term "dynamic web pages" could
cover a wide multitude of sins.  Many of which don't involve CGI.

But yes, you could dynamically create web pages.  Creating "dynamic 
web pages" isn't quite the same thing, though.

SCNR.


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

Date: Sun, 19 Dec 2004 01:06:51 +0000 (UTC)
From: KKramsch <karlUNDERSCOREkramsch@yahooPERIODcom.invalid>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <cq2k7b$2bq$1@reader2.panix.com>

In <1103413503.545709.214820@z14g2000cwz.googlegroups.com> "Lisa" <dlr93612@yahoo.com> writes:

>OK, but I do not want the second iteration to wait for a lock I want it
>to recognize the existance of the previously running version still
>being active and to exit gracefully.

Then request a non-blocking lock:

  open MY_DATA, $datafile or die "Couldn't read $datafile\n";
  exit GRACEFULLY unless flock(MY_DATA, LOCK_EX|LOCK_NB);

See The Perl Cookbook pp. 245-247.

	Karl
-- 
Sent from a spam-bucket account; I check it once in a blue moon.  If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.


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

Date: 18 Dec 2004 22:21:28 -0800
From: "Lisa" <dlr93612@yahoo.com>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <1103437288.177230.209620@c13g2000cwb.googlegroups.com>

Here is what I have been trying and it does not work as I expexcted it
to.

if(-e "LockFile.txt"){
print "LockFile already exists",br();
exit;
}else{
if(open("LOCKFILE",">LockFile.txt")){
print "opening LockFile",br();
print LOCKFILE "1";
close LOCKFILE;
}else{
die "Can't open LockFile";
}
}

sleep(20)
unlink("LockFile.txt");

print "Done",br();
exit


If I comment out the sleep and unlink commands,  and let the script end
without deleting the file, then the next run of the script finds the
file and exits. However if I leave the sleep unlink in the script and
run two iterations of the script they both run instead of the second
one exiting because the first one is sleeping and has not unlinked the
lock file as I expect it to.

Lisa



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

Date: Sun, 19 Dec 2004 06:23:33 GMT
From: Joe Smith <joe@inwap.com>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <E79xd.260298$HA.125493@attbi_s01>

Alan Mead wrote:

> I've never done this in Perl, but I bet you could grep the running
> processes for your script name (e.g., 'my $rs = `ps -aux | grep
> [m]yscript.pl`'). Of course, you'd have to ignore the currently running
> version.

I have an extremely NON-portable version that works on Linux.
	-Joe

#!/usr/bin/perl
# Purpose: Starts a command only if it is not already running

use strict; use warnings;

my $Usage = "Usage: $0 command args\n";
# Runs command if not already running
my @cmd = @ARGV or die $Usage;
my $cmd_line = "@cmd";
die "Command line too long: $cmd_line\n" if length $cmd_line > 4095;

my ($user,$header) = get_uid_from_ps();
my $count = 0;
foreach (`ps -efww`) {          # This has a limit of 4096 bytes for CMD
   my ($who,$pid,$cmd) = (split /\s+/,$_,7)[0,1,6];
   next unless $who eq $user and $cmd =~ /\Q$cmd_line\E$/;
   next if $pid == $$;
   print STDERR "  $user is running '$cmd_line'\n$header" unless $count++;
   print STDERR $_;
}
print STDERR "   count = $count\n" if $count > 1;
exit 1 if $count;
print "$cmd_line\n";
exec @cmd;

sub get_uid_from_ps {
   my @ps = `ps -fp $$`;
   my @cols = split ' ',$ps[0];
   $_ = "UID PID PPID C STIME TTY TIME CMD";
   die "'@cols' != '$_'" unless "@cols" eq $_;
   @cols = split ' ',$ps[1];
   ($cols[0], $ps[0]);
}


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

Date: 19 Dec 2004 07:57:10 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Finding out if another copy of a CGI Perl scripts is running?
Message-Id: <Xns95C41E095AAF9asu1cornelledu@132.236.56.8>

"Lisa" <dlr93612@yahoo.com> wrote in 
news:1103437288.177230.209620@c13g2000cwb.googlegroups.com:

> Here is what I have been trying and it does not work as I expexcted it
> to.

The code you posted does not compile. Please see the posting guidelines and 
follow those to help us help you.

D:\Home>perl t.pl
syntax error at t.pl line 18, near ")
unlink"
Execution of t.pl aborted due to compilation errors.

> if(-e "LockFile.txt"){
> print "LockFile already exists",br();
> exit;

This is wrong. The file can come into existence between the test and the 
open below.


> However if I leave the sleep unlink in the script and run two iterations 
> of the script they both run instead of the second one exiting because the 
> first one is sleeping and has not unlinked the lock file as I expect it 
> to.

This analysis is likely incorrect. At the very least, you should have read

perldoc -q lock
perldoc -f flock

before posting.

Other suggested reading:

http://tinyurl.com/6q2gc
http://tinyurl.com/6vzy6

Sinan.


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

Date: Sat, 18 Dec 2004 23:02:04 -0500
From: "Eric B." <ebenze@hotmail.com>
Subject: Hep with Regular Expression
Message-Id: <1103429049.895152@www.vif.com>

Hi,

I'm hoping someone can help me come up with a regular expression that I need
to match the following.

I'm looking to match all occurances of format <word>.<word> in a string that
is not followed by the words AS.  This is coming from an SQL select
statement.

Basically, I'm looking to match all the field names in an SQL select
statement that are not being aliased.

For example, in the following statement:

                Select
                        payment_module.module_name as `alias.name`,
                        payment_module.module_description,
                        payment_module.is_enabled,
                        configuration.configuration_key,
                        configuration.configuration_value,
                        configuration.store_id as `alias.storeid`


I'm looking to match only:
    payment_module.module_description
    payment_module.is_enabled
    configuration.configuration_key
    configuration.configuration_value

Ideally, am looking for an expression using subexpressions that further
seperate the table name from the field name in this select statement:
    ie:        payment_module         and        module_description
                payment_module         and        is_enabled
                configuration                and        configuration_key
                configuration                and        configuration_value


Any help would be greatly appreciated.  So far I've managed to come up with:
/(?<!as )(?>([A-Z0-9_-]*)\.([A-Z0-9_-]*))(?![ ]+as[ ]+[A-Z0-9_\-.]+)/i

but that doesn't seem to work as it sees the expression alias.name as not
being preceeded by "as ".

Thanks!

Eric









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

Date: Sun, 19 Dec 2004 05:11:39 GMT
From: Jim Keenan <jkeen_via_google@yahoo.com>
Subject: Re: Hep with Regular Expression
Message-Id: <f48xd.1936$He3.948@trndny05>

Eric B. wrote:

> Hi,
> 
> I'm hoping someone can help me come up with a regular expression that I need
> to match the following.
> 
> I'm looking to match all occurances of format <word>.<word> in a string that
> is not followed by the words AS.  This is coming from an SQL select
> statement.
> 
> Basically, I'm looking to match all the field names in an SQL select
> statement that are not being aliased.
> 
> For example, in the following statement:
> 
>                 Select
>                         payment_module.module_name as `alias.name`,
>                         payment_module.module_description,
>                         payment_module.is_enabled,
>                         configuration.configuration_key,
>                         configuration.configuration_value,
>                         configuration.store_id as `alias.storeid`
> 
> 
> I'm looking to match only:
>     payment_module.module_description
>     payment_module.is_enabled
>     configuration.configuration_key
>     configuration.configuration_value
> 
> Ideally, am looking for an expression using subexpressions that further
> seperate the table name from the field name in this select statement:
>     ie:        payment_module         and        module_description
>                 payment_module         and        is_enabled
>                 configuration                and        configuration_key
>                 configuration                and        configuration_value
> 
> 
> Any help would be greatly appreciated.  So far I've managed to come up with:
> /(?<!as )(?>([A-Z0-9_-]*)\.([A-Z0-9_-]*))(?![ ]+as[ ]+[A-Z0-9_\-.]+)/i
> 
> but that doesn't seem to work as it sees the expression alias.name as not
> being preceeded by "as ".

Would this suffice?

use Data::Dumper;

my $string = "
                         payment_module.module_name as `alias.name`,
                         payment_module.module_description,
                         payment_module.is_enabled,
                         configuration.configuration_key,
                         configuration.configuration_value,
                         configuration.store_id as `alias.storeid`
";

my @statements = split(/,\s+/, $string);
my (@results);
foreach my $stm (@statements) {
	next if $stm =~ / as `/;
	$stm =~ s/^\s+//;
	my @parts = split(/\./, $stm);
	push(@results, \@parts);
};
print Dumper(\@results);

Jim Keenan


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

Date: Sun, 19 Dec 2004 06:15:57 GMT
From: Joe Smith <joe@inwap.com>
Subject: Re: MS Perl question -- how to use hacked script to work correctly(was Question on loops and return values or sumpin)
Message-Id: <x09xd.681363$mD.677425@attbi_s02>

James wrote:

>>>use lib "$ENV(HOME)/site/lib";
>>
>>What do you think this does?
> 
> I thought it explicitly stated where the library was.

It would have, if it weren't for the two typographical
errors in that statement.  You need to re-read the
docs and look up the difference between parentheses
and curly braces; $ENV(HOME) is not the same a $ENV{HOME}.
	-Joe


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

Date: Sun, 19 Dec 2004 00:40:25 GMT
From: "JayEs" <not@home.net>
Subject: Re: Page can not be displayed...
Message-Id: <Z54xd.2995$iC4.1738@newssvr30.news.prodigy.com>


>>> I get a "Page can not be displayed" error.

What is the actual error message?

> Yes I deed, the only thing I've learned is that the file ib20 was
> created/changed at the moment I tried the link.
> It is in c:\winnt\temp

Does the IIS user executing the script have read/write permessions in that 
directory?





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

Date: Sun, 19 Dec 2004 00:54:08 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: Page can not be displayed...
Message-Id: <Qi4xd.78217$K7.73163@news-server.bigpond.net.au>

"Piet L." <PietLaroy@hotmail.com> wrote in message 
news:c47f81f6.0412180326.185c4e9b@posting.google.com...
: Piet L. wrote:
:
: >> Hey,
: >> I'm working with IIS (Windows 2000).
: >> I've create a virtual directory usr-cgi met link naar e:\cgi
: >> It works all well when I run simple scripts, but with the following
: script
: >> I get a "Page can not be displayed" error.
:
: >> I know the script is working, because when I try it in DOS
: >> e:\cgi\finaal> perl orders.cgi
: >>
: >> I get the right output
: >>
: >> Problem is the http://localhost/usr-cgi/finaal/orders.cgi
:
: >Most web server software will direct STDOUT from CGI scripts to a log
: >file somewhere.  I've hardly ever used IIS but I think I'd remeber if
: it
: >were an exception.  Have you tried looking for such a log.
:
: Yes I deed, the only thing I've learned is that the file ib20 was
: created/changed at the moment I tried the link.
: It is in c:\winnt\temp
:
: That's all I know

With any files you access using Perl in an IIS CGI environment, you should 
specify the full path (on IIS something like d:/inetpub/wwwroot/etc) because 
often the current directory is not what you think it it.  In this case the 
Perl process appears to be running with a current directory of c:\winnt\temp 
where it can create the file, but IIS cannot read it.

For security reasons you don't want your web-server to be able to read 
within your systemroot tree, so you will need to be specific with your data 
locations.

Generally a readable/writeable directory outside the actual web-site itself, 
so the Perl processes can read it, but you cannot specify it by url.

-- 
Wyzelli 




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

Date: Sun, 19 Dec 2004 06:39:28 GMT
From: Joe Smith <joe@inwap.com>
Subject: Re: Some Programing Needed
Message-Id: <Am9xd.783073$8_6.366775@attbi_s04>

Murray J wrote:
> I would like to capture the co-ordinates of
> the mouse at the instant when it is clicked on the first image,

Read up on HTML documentation on the ISMAP attribute of <IMG>.
   <a href="xy.cgi"><img src="first-image.png" ismap></a>

> apply some mathematics based on which 'hot spot' was clicked, and come
> up with a new set of co-ordinates.

That's pretty trivial.  What have you tried?

> When the destination page is opened, I would like the viewport to be
> at those new co-ordinates on the 3200px X 2560px image on the page.

What's a viewport?  Whatever it is, it needs to work with Opera,
Safari, and Netscape/Mozilla/Firefox.
	-Joe


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

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


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