Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: return vars from Perl to Flash - correction
From: Geoff Choo
Date: Tue, 9 May 2000 19:24:39 +0100

Hi,

I made a mistake in the Perl code fragment that I sent previously. I put
"text" instead of "plain"

$string = "This is the string to encode";

# We URL encode the text string here #
$string =~ s/(\W)/sprintf("%%%x", ord($1))/eg;

print "Content-type: text/plain\n\n";
print "list=$string";

In theory, if you use "Content-type: text/plain\n\n" you shouldn't have to
use urlencoding, but anyway you can use this perl encoding example if you
find that you need it.

cheers, geoff


At 16:48 09/05/00 +0100, you wrote:
>Date: Tue, 09 May 2000 09:26:28 -0400
>From: Helen Triolo <designerati-technica [dot] com>
>Subject: FLASH: return vars from Perl to Flash
>
>Any Perl scripters out there? I sent this a couple weeks ago and never
>got a response--thought I'd try one more time just in case someone
>knows...
>
>Could someone give me the correct 2 lines to return two variables to
>Flash from a Perl script. The following doesn't seem to work:
>
>print "Content-type: text/plain\n\n";
>print "ivar=5&svar='string of text'";
>
>Is that the right content-type? And how do you include a string of
>text, especially if it includes non-URL-encoded chars like spaces?
>
>Thanks in advance,
>Helen

Geoff Choo, Chief Engineer
Collective Wisdom Inc.
geoffchooatcollective-wisdom [dot] com

"collective...making the complex clear"
http://www.collective-wisdom.com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]