[24092] in Perl-Users-Digest
Perl-Users Digest, Issue: 6286 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Mar 21 18:10:34 2004
Date: Sun, 21 Mar 2004 15:10:08 -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, 21 Mar 2004 Volume: 10 Number: 6286
Today's topics:
Redirect problem <Tigerhillsideremove@removenetscape.net>
Re: Redirect problem <matthew.garrish@sympatico.ca>
Re: Redirect problem <Tigerhillsideremove@removenetscape.net>
Re: Redirect problem <tadmc@augustmail.com>
Re: Redirect problem <gnari@simnet.is>
Re: regex (pcre) variable number of (captures)* - how? <joerg@objectpark.org>
WIN32 Clipboard set bitmap <GlgAs@netscape.net>
Re: WIN32 Clipboard set bitmap <roel-perl@st2x.net>
Re: WIN32 Clipboard set bitmap <GlgAs@netscape.net>
Re: WIN32 Clipboard set bitmap (Jay Tilton)
Re: WIN32 Clipboard set bitmap <GlgAs@netscape.net>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sun, 21 Mar 2004 13:49:27 GMT
From: Tigerhillside <Tigerhillsideremove@removenetscape.net>
Subject: Redirect problem
Message-Id: <u17r50lmhcbp7s99l65rn6rnnhif885r7s@4ax.com>
Yes, I have walked through the troubleshooting steps. I have
tried everything I can. I am trying to get redirection to work.
Here is a simple script that does not work:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use CGI qw(-debug);
use Carp;
local $SIG{__WARN__} = \&Carp::cluck;
my $q = new CGI;
print $q->redirect('NewURL');
I have two systems, this works fine on system 1, it works from
the command line on system 2 (by fine I mean I get reasonable
output rather than an error). But I get an error from the browser
on system 2. Both are perl 5.008, both Free BSD, both Apache (but
system 2, the non-working system, is Apache 2.0.47, the working
system is Apache 1.3.29). The only other difference is system 2,
the non-working, is a secure server. But I am redirecting inside
the server. I have tried relative redirection, absolute, but not
HTTPS, and the full URI. I have also asked tech support, but
gotten no answer. Anyone have any ideas?
TIA.
------------------------------
Date: Sun, 21 Mar 2004 10:20:51 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: Redirect problem
Message-Id: <hpi7c.1201$re.99847@news20.bellglobal.com>
"Tigerhillside" <Tigerhillsideremove@removenetscape.net> wrote in message
news:u17r50lmhcbp7s99l65rn6rnnhif885r7s@4ax.com...
>
> I have two systems, this works fine on system 1, it works from
> the command line on system 2 (by fine I mean I get reasonable
> output rather than an error). But I get an error from the browser
> on system 2.
>
Let me put on my thunking cap for a second. Nope, still can't thunk why
you're asking this question here. Sounds to me like a *server* configuration
problem, unless you'd care to share this error message so people have some
idea what you're talking about.
Matt
------------------------------
Date: Sun, 21 Mar 2004 19:08:14 GMT
From: Tigerhillside <Tigerhillsideremove@removenetscape.net>
Subject: Re: Redirect problem
Message-Id: <93pr50l10njlctgn96uno36no0v2r780rq@4ax.com>
In comp.lang.perl.misc, "Matt Garrish"
<matthew.garrish@sympatico.ca>, I read and responded
>
>"Tigerhillside" <Tigerhillsideremove@removenetscape.net> wrote in message
>news:u17r50lmhcbp7s99l65rn6rnnhif885r7s@4ax.com...
>>
>> I have two systems, this works fine on system 1, it works from
>> the command line on system 2 (by fine I mean I get reasonable
>> output rather than an error). But I get an error from the browser
>> on system 2.
>>
>
>Let me put on my thunking cap for a second. Nope, still can't thunk why
>you're asking this question here. Sounds to me like a *server* configuration
>problem, unless you'd care to share this error message so people have some
>idea what you're talking about.
I am sorry if this is the wrong place, I have to admit I get a
bit confused by some of the hierarchy issues. And I was not
clear, I don't control either system. Both are hosted systems, I
am just a customer. I asked here because I thought it was some
kind of language issue, that I was supposed to set things up in
my program better. I assumed I was doing something wrong and that
I don't understand the language well enough. Perl seems like a
great language, but I (this is about my issues, I am not trying
to start a big discussion) have trouble wrapping my mind around
some of the concepts. This keeps me from learning it well or
becoming adept at it.
Anyway, sorry if this was the wrong place. OTOH if your point is
that there is not *language* reason for the difference that is
nice to know, I will look for another place for help.
------------------------------
Date: Sun, 21 Mar 2004 13:31:17 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Redirect problem
Message-Id: <slrnc5rrc5.6cs.tadmc@magna.augustmail.com>
Tigerhillside <Tigerhillsideremove@removenetscape.net> wrote:
> In comp.lang.perl.misc, "Matt Garrish"
><matthew.garrish@sympatico.ca>, I read and responded
>>"Tigerhillside" <Tigerhillsideremove@removenetscape.net> wrote in message
>>news:u17r50lmhcbp7s99l65rn6rnnhif885r7s@4ax.com...
>>> But I get an error from the browser
>>> on system 2.
>can't thunk why
>>you're asking this question here.
> I am sorry if this is the wrong place, I have to admit I get a
> bit confused by some of the hierarchy issues.
If the error message you are getting appears in perldiag.pod,
then it is a Perl problem, post here.
Else it is probably not a Perl problem, look elsewhere.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Sun, 21 Mar 2004 23:00:14 -0000
From: "gnari" <gnari@simnet.is>
Subject: Re: Redirect problem
Message-Id: <c3l6nk$h61$1@news.simnet.is>
"Tigerhillside" <Tigerhillsideremove@removenetscape.net> wrote in message
news:u17r50lmhcbp7s99l65rn6rnnhif885r7s@4ax.com...
[problem with redirect]
> ... The only other difference is system 2,
> the non-working, is a secure server. But I am redirecting inside
> the server. I have tried relative redirection, absolute, but not
> HTTPS, and the full URI. I have also asked tech support, but
> gotten no answer. Anyone have any ideas?
I do not know what the problem is, and I don't really understand
what implications are meant by 'secure server', but your
'But I am redirecting inside the server'
comment suggests to me that you do not realize what the redirect
does. it send back instructions to the browser with a new url to
try, so there is no such thing as redirecting inside the server
with this method.
if this is your problem, then you need some other solution, which
could be one of:
using mod_proxy or mod_rewrite with apache
if mod_perl is used, you can use the Apache API to do
an internal_redirect()
proxy the page yourself, using LWP in your cgi
gnari
------------------------------
Date: Sun, 21 Mar 2004 13:49:09 +0000
From: =?ISO-8859-1?Q?J=F6rg?= Westheide <joerg@objectpark.org>
Subject: Re: regex (pcre) variable number of (captures)* - how?
Message-Id: <0403FnDVh1TKlkA/McGOo4F8lQ@objectpark.org>
Hi Ben!
> doesn't look like pcre has a /g equivelent.
That's right, lib pcre doesn't have that.
And I also have not (yet) found a way to implement the g modifier in a=20
full Perl compatible way.
For details on the problematic stuff see the 'Repeated patterns=20
matching zero-length substring' section in the perlre man page. If that=20
doesn't apply to your problem you should be able to solve your problem=20
with a loop
J=F6rg
------------------------------
Date: Sun, 21 Mar 2004 13:34:31 GMT
From: gilgames <GlgAs@netscape.net>
Subject: WIN32 Clipboard set bitmap
Message-Id: <HRg7c.38201$PY.15875@newssvr26.news.prodigy.com>
#!/usr/local/bin/perl
use strict;
use Image::Magick;
use WIN32::Clipboard;
my($image, $x, $clip);
$image = Image::Magick->new(size=>"100x100");
$x = $image->Read('xc:yellow');
#makes a 100 x 100 yellow square
print "err1 = $x" if "$x";
$x = $image->Set('magick'=>'CLIPBOARD');
#converts image to CLIPBOARD format
print "err2 = $x" if "$x";
$clip = Win32::Clipboard();
$clip->Empty();
$clip->Set($image->ImageToBlob());
#save a blob to the clipboard, saves text
#$clip->Set($image);
#save image object, results 'memory could not be read' error
if ($clip->IsBitmap()) {print "Bitmap in clipboard";}
elsif ($clip->IsText()) {print "Text in clipboard";}
else {print "Empty clipboard"}
#output is Text in clipboard, same if I use BMP mode
__END__
I use WIN2K Perl ActiveState build 806 ImageMagick 5.5.7
I can read bitmap from the clipboard as blob, which converts to image.
Is there any way to set bitmap to clipboard from perl?
------------------------------
Date: 21 Mar 2004 17:20:39 GMT
From: Roel van der Steen <roel-perl@st2x.net>
Subject: Re: WIN32 Clipboard set bitmap
Message-Id: <slrnc5rjmc.bk8.roel-perl@195-86-124-242.dsl.easynet.nl>
On Sun, 21 Mar 2004 at 13:34 GMT, gilgames <GlgAs@netscape.net> wrote:
> use WIN32::Clipboard;
. . . . . ^^^^^
Don't type your code in the news message -- use the clipboard :-)
> Is there any way to set bitmap to clipboard from perl?
Not that I'm aware of -- the documentation for Win32::Clipboard
says:
The clipboard contains some text; this is the *only* format you
can use to set clipboard data [..]
and
Set(VALUE)
Set the clipboard content to the specified string.
So it seems that only text string data can be put on the
clipboard using this module.
------------------------------
Date: Sun, 21 Mar 2004 18:55:11 GMT
From: gilgames <GlgAs@netscape.net>
Subject: Re: WIN32 Clipboard set bitmap
Message-Id: <jyl7c.38372$PY.33380@newssvr26.news.prodigy.com>
<<
> use WIN32::Clipboard;
. . . . . ^^^^^
Don't type your code in the news message -- use the clipboard :-)
>>
I pasted it. What is wrong with that statement? It works for me.
------------------------------
Date: Sun, 21 Mar 2004 22:17:30 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: WIN32 Clipboard set bitmap
Message-Id: <405e1328.83587959@news.erols.com>
gilgames <GlgAs@netscape.net> wrote:
: <<
: > use WIN32::Clipboard;
:
: . . . . . ^^^^^
: Don't type your code in the news message -- use the clipboard :-)
: >>
:
: I pasted it. What is wrong with that statement?
The module's name is "Win32::Clipboard". Case matters . . . usually.
> It works for me.
That's a fortunate coincidence of Win32's case-insensitive filenames and
the fact that the object-oriented module doesn't need to export any
symbols.
------------------------------
Date: Sun, 21 Mar 2004 22:28:48 GMT
From: gilgames <GlgAs@netscape.net>
Subject: Re: WIN32 Clipboard set bitmap
Message-Id: <AGo7c.38471$PY.7757@newssvr26.news.prodigy.com>
<<
That's a fortunate coincidence of Win32's case-insensitive filenames and
the fact that the object-oriented module doesn't need to export any
symbols.
>>
You are right.
------------------------------
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 6286
***************************************